Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/arch/arm/xscale Pull up revision 1.4 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/6dcf0bba08e6
branches:  netbsd-1-6
changeset: 529324:6dcf0bba08e6
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 11 22:45:23 2002 +0000

description:
Pull up revision 1.4 (requested by thorpej in ticket #571):
  Add support for attaching IOP built-in sub-devices (aau,
  dma, ssp, watchdog, etc.)

diffstat:

 sys/arch/arm/xscale/files.i80321 |   4 +-
 sys/arch/arm/xscale/i80321.c     |  45 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 3 deletions(-)

diffs (100 lines):

diff -r b23d8826bfe8 -r 6dcf0bba08e6 sys/arch/arm/xscale/files.i80321
--- a/sys/arch/arm/xscale/files.i80321  Mon Nov 11 22:32:13 2002 +0000
+++ b/sys/arch/arm/xscale/files.i80321  Mon Nov 11 22:45:23 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i80321,v 1.2 2002/04/12 19:02:30 thorpej Exp $
+#      $NetBSD: files.i80321,v 1.2.4.1 2002/11/11 22:45:23 he Exp $
 #
 # Configuration info for Intel i80321 XScale I/O Processor support
 #
@@ -8,7 +8,7 @@
 file   arch/arm/xscale/i80321_mcu.c
 file   arch/arm/xscale/i80321_timer.c
 
-device iopxs: pcibus, bus_space_generic
+device iopxs {}: pcibus, bus_space_generic
 # Board-specific front-end provides attachment.
 file   arch/arm/xscale/i80321.c                iopxs
 file   arch/arm/xscale/i80321_pci.c            iopxs
diff -r b23d8826bfe8 -r 6dcf0bba08e6 sys/arch/arm/xscale/i80321.c
--- a/sys/arch/arm/xscale/i80321.c      Mon Nov 11 22:32:13 2002 +0000
+++ b/sys/arch/arm/xscale/i80321.c      Mon Nov 11 22:45:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321.c,v 1.2 2002/05/16 01:01:34 thorpej Exp $       */
+/*     $NetBSD: i80321.c,v 1.2.2.1 2002/11/11 22:45:48 he Exp $        */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -61,8 +61,22 @@
  */
 struct i80321_softc *i80321_softc;
 
+int    i80321_iopxs_print(void *, const char *);
 int    i80321_pcibus_print(void *, const char *);
 
+/* Built-in devices. */
+static const struct iopxs_device {
+       const char *id_name;
+       bus_addr_t id_offset;
+       bus_size_t id_size;
+} iopxs_devices[] = {
+       { "iopaau",     VERDE_AAU_BASE,         VERDE_AAU_SIZE },
+       { "iopdma",     VERDE_DMA_BASE,         VERDE_DMA_SIZE },
+       { "iopssp",     VERDE_SSP_BASE,         VERDE_SSP_SIZE },
+       { "iopwdog",    0,                      0 },
+       { NULL,         0,                      0 }
+};
+
 /*
  * i80321_attach:
  *
@@ -72,6 +86,8 @@
 i80321_attach(struct i80321_softc *sc)
 {
        struct pcibus_attach_args pba;
+       const struct iopxs_device *id;
+       struct iopxs_attach_args ia;
        pcireg_t preg;
 
        i80321_softc = sc;
@@ -189,6 +205,20 @@
        i80321_pci_init(&sc->sc_pci_chipset, sc);
 
        /*
+        * Attach all the IOP built-ins.
+        */
+       for (id = iopxs_devices; id->id_name != NULL; id++) {
+               ia.ia_name = id->id_name;
+               ia.ia_st = sc->sc_st;
+               ia.ia_sh = sc->sc_sh;
+               ia.ia_dmat = &sc->sc_local_dmat;
+               ia.ia_offset = id->id_offset;
+               ia.ia_size = id->id_size;
+
+               (void) config_found(&sc->sc_dev, &ia, i80321_iopxs_print);
+       }
+
+       /*
         * Attach the PCI bus.
         */
        preg = bus_space_read_4(sc->sc_st, sc->sc_atu_sh, ATU_PCIXSR);
@@ -210,6 +240,19 @@
 }
 
 /*
+ * i80321_iopxs_print:
+ *
+ *     Autoconfiguration cfprint routine when attaching
+ *     to the "iopxs" device.
+ */
+int
+i80321_iopxs_print(void *aux, const char *pnp)
+{
+
+       return (QUIET);
+}
+
+/*
  * i80321_pcibus_print:
  *
  *     Autoconfiguration cfprint routine when attaching



Home | Main Index | Thread Index | Old Index