X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fehci-au1xxx.c;h=5d1b12aad7766acc39d338c9200dfc4ca6b86601;hb=refs%2Fheads%2Fvserver;hp=63eadeec132440d4e7b29c531fa483e85d539903;hpb=16cf0ec7408f389279d413869e94c1a351392f97;p=linux-2.6.git diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 63eadeec1..5d1b12aad 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c @@ -16,10 +16,6 @@ #include #include -#ifndef CONFIG_SOC_AU1200 -#error "this Alchemy chip doesn't have EHCI" -#else /* Au1200 */ - #define USB_HOST_CONFIG (USB_MSR_BASE + USB_MSR_MCFG) #define USB_MCFG_PFEN (1<<31) #define USB_MCFG_RDCOMB (1<<30) @@ -45,8 +41,6 @@ #endif #define USBH_DISABLE (USB_MCFG_EBMEN | USB_MCFG_EMEMEN) -#endif /* Au1200 */ - extern int usb_disabled(void); /*-------------------------------------------------------------------------*/ @@ -111,9 +105,9 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver, /* Au1200 AB USB does not support coherent memory */ if (!(read_c0_prid() & 0xff)) { - pr_info("%s: this is chip revision AB!\n", dev->dev.name); + pr_info("%s: this is chip revision AB!\n", dev->name); pr_info("%s: update your board or re-configure the kernel\n", - dev->dev.name); + dev->name); return -ENODEV; } #endif @@ -152,7 +146,7 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver, /* ehci_hcd_init(hcd_to_ehci(hcd)); */ retval = - usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); + usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED); if (retval == 0) return retval; @@ -206,6 +200,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { .reset = ehci_init, .start = ehci_run, .stop = ehci_stop, + .shutdown = ehci_shutdown, /* * managing i/o requests and associated device resources @@ -232,9 +227,8 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { /*-------------------------------------------------------------------------*/ -static int ehci_hcd_au1xxx_drv_probe(struct device *dev) +static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev) { - struct platform_device *pdev = to_platform_device(dev); struct usb_hcd *hcd = NULL; int ret; @@ -247,10 +241,9 @@ static int ehci_hcd_au1xxx_drv_probe(struct device *dev) return ret; } -static int ehci_hcd_au1xxx_drv_remove(struct device *dev) +static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev) { - struct platform_device *pdev = to_platform_device(dev); - struct usb_hcd *hcd = dev_get_drvdata(dev); + struct usb_hcd *hcd = platform_get_drvdata(pdev); usb_ehci_au1xxx_remove(hcd, pdev); return 0; @@ -272,26 +265,15 @@ static int ehci_hcd_au1xxx_drv_resume(struct device *dev) return 0; } */ -static struct device_driver ehci_hcd_au1xxx_driver = { - .name = "au1xxx-ehci", - .bus = &platform_bus_type, +MODULE_ALIAS("au1xxx-ehci"); +static struct platform_driver ehci_hcd_au1xxx_driver = { .probe = ehci_hcd_au1xxx_drv_probe, .remove = ehci_hcd_au1xxx_drv_remove, + .shutdown = usb_hcd_platform_shutdown, /*.suspend = ehci_hcd_au1xxx_drv_suspend, */ /*.resume = ehci_hcd_au1xxx_drv_resume, */ + .driver = { + .name = "au1xxx-ehci", + .bus = &platform_bus_type + } }; - -static int __init ehci_hcd_au1xxx_init(void) -{ - pr_debug(DRIVER_INFO " (Au1xxx)\n"); - - return driver_register(&ehci_hcd_au1xxx_driver); -} - -static void __exit ehci_hcd_au1xxx_cleanup(void) -{ - driver_unregister(&ehci_hcd_au1xxx_driver); -} - -module_init(ehci_hcd_au1xxx_init); -module_exit(ehci_hcd_au1xxx_cleanup);