Port-arm archive

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

USB fix



Hi -
could someone please test this patch? It should
update the ohci driver frontend for the device/softc split.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
Index: arm/s3c2xx0/ohci_s3c24x0.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c,v
retrieving revision 1.4
diff -u -p -r1.4 ohci_s3c24x0.c
--- arm/s3c2xx0/ohci_s3c24x0.c  31 Mar 2008 02:39:40 -0000      1.4
+++ arm/s3c2xx0/ohci_s3c24x0.c  3 Apr 2008 14:58:10 -0000
@@ -73,7 +73,7 @@ struct ohci_ssio_softc {
        void                    *sc_ih;         /* interrupt vectoring */
 };
 
-CFATTACH_DECL(ohci_ssio, sizeof(struct ohci_ssio_softc),
+CFATTACH_DECL_NEW(ohci_ssio, sizeof(struct ohci_ssio_softc),
     ohci_ssio_match, ohci_ssio_attach, ohci_ssio_detach, ohci_activate);
 
 int
@@ -93,13 +93,16 @@ ohci_ssio_match(struct device *parent, s
 void
 ohci_ssio_attach(struct device *parent, struct device *self, void *aux)
 {
-       struct ohci_ssio_softc *sc = (struct ohci_ssio_softc *)self;
+       struct ohci_ssio_softc *sc = device_private(self);
        struct s3c2xx0_attach_args *sa = (struct s3c2xx0_attach_args *)aux;
 
        usbd_status r;
 
        aprint_normal("\n");
 
+       sc->sc.sc_dev = self;
+       sc->sc.sc_bus.hci_private = sc;
+
        sc->sc.iot = sa->sa_iot;
        /*ohcidebug=15;*/
 
@@ -134,8 +137,7 @@ ohci_ssio_attach(struct device *parent, 
        }
 
        /* Attach usb device. */
-       sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus,
-                                      usbctlprint);
+       sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint);
 }
 
 int


Home | Main Index | Thread Index | Old Index