diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/Kconfig | 8 | ||||
-rw-r--r-- | drivers/usb/host/Makefile | 1 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 90 |
4 files changed, 53 insertions, 52 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 7ac6f482e36f..d77e0286f68b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -162,14 +162,6 @@ config USB_EHCI_HCD_OMAP | |||
162 | Enables support for the on-chip EHCI controller on | 162 | Enables support for the on-chip EHCI controller on |
163 | OMAP3 and later chips. | 163 | OMAP3 and later chips. |
164 | 164 | ||
165 | config USB_EHCI_HCD_ORION | ||
166 | tristate "Support for Marvell Orion on-chip EHCI USB controller" | ||
167 | depends on USB_EHCI_HCD && PLAT_ORION | ||
168 | default y | ||
169 | ---help--- | ||
170 | Enables support for the on-chip EHCI controller on | ||
171 | Morvell Orion chips. | ||
172 | |||
173 | config USB_EHCI_HCD_VT8500 | 165 | config USB_EHCI_HCD_VT8500 |
174 | tristate "Support for VT8500 on-chip EHCI USB controller" | 166 | tristate "Support for VT8500 on-chip EHCI USB controller" |
175 | depends on USB_EHCI_HCD && ARCH_VT8500 | 167 | depends on USB_EHCI_HCD && ARCH_VT8500 |
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 4db3f01fec28..b0da9cf9d035 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile | |||
@@ -30,7 +30,6 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o | |||
30 | 30 | ||
31 | obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o | 31 | obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o |
32 | obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o | 32 | obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o |
33 | obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o | ||
34 | obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o | 33 | obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o |
35 | obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o | 34 | obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o |
36 | obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o | 35 | obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 26154f025a21..487ebb892bc2 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -1272,6 +1272,11 @@ MODULE_LICENSE ("GPL"); | |||
1272 | #define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver | 1272 | #define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver |
1273 | #endif | 1273 | #endif |
1274 | 1274 | ||
1275 | #ifdef CONFIG_PLAT_ORION | ||
1276 | #include "ehci-orion.c" | ||
1277 | #define PLATFORM_DRIVER ehci_orion_driver | ||
1278 | #endif | ||
1279 | |||
1275 | #ifdef CONFIG_USB_W90X900_EHCI | 1280 | #ifdef CONFIG_USB_W90X900_EHCI |
1276 | #include "ehci-w90x900.c" | 1281 | #include "ehci-w90x900.c" |
1277 | #define PLATFORM_DRIVER ehci_hcd_w90x900_driver | 1282 | #define PLATFORM_DRIVER ehci_hcd_w90x900_driver |
@@ -1338,7 +1343,6 @@ MODULE_LICENSE ("GPL"); | |||
1338 | !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \ | 1343 | !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \ |
1339 | !defined(PLATFORM_DRIVER) && \ | 1344 | !defined(PLATFORM_DRIVER) && \ |
1340 | !IS_ENABLED(CONFIG_ARCH_VT8500) && \ | 1345 | !IS_ENABLED(CONFIG_ARCH_VT8500) && \ |
1341 | !IS_ENABLED(CONFIG_PLAT_ORION) && \ | ||
1342 | !defined(PS3_SYSTEM_BUS_DRIVER) && \ | 1346 | !defined(PS3_SYSTEM_BUS_DRIVER) && \ |
1343 | !defined(OF_PLATFORM_DRIVER) && \ | 1347 | !defined(OF_PLATFORM_DRIVER) && \ |
1344 | !defined(XILINX_OF_PLATFORM_DRIVER) | 1348 | !defined(XILINX_OF_PLATFORM_DRIVER) |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index cfc4803da3f3..914a3ecfb5d3 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -17,13 +17,6 @@ | |||
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_device.h> | 18 | #include <linux/of_device.h> |
19 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
20 | #include <linux/usb.h> | ||
21 | #include <linux/usb/hcd.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/dma-mapping.h> | ||
24 | |||
25 | #include "ehci.h" | ||
26 | |||
27 | 20 | ||
28 | #define rdl(off) __raw_readl(hcd->regs + (off)) | 21 | #define rdl(off) __raw_readl(hcd->regs + (off)) |
29 | #define wrl(off, val) __raw_writel((val), hcd->regs + (off)) | 22 | #define wrl(off, val) __raw_writel((val), hcd->regs + (off)) |
@@ -41,17 +34,6 @@ | |||
41 | #define USB_PHY_IVREF_CTRL 0x440 | 34 | #define USB_PHY_IVREF_CTRL 0x440 |
42 | #define USB_PHY_TST_GRP_CTRL 0x450 | 35 | #define USB_PHY_TST_GRP_CTRL 0x450 |
43 | 36 | ||
44 | #define DRIVER_DESC "EHCI orion driver" | ||
45 | |||
46 | static const char hcd_name[] = "ehci-orion"; | ||
47 | |||
48 | static struct hc_driver __read_mostly ehci_orion_hc_driver; | ||
49 | |||
50 | static const struct ehci_driver_overrides orion_overrides __initdata = { | ||
51 | .reset = ehci_setup, | ||
52 | }; | ||
53 | |||
54 | |||
55 | /* | 37 | /* |
56 | * Implement Orion USB controller specification guidelines | 38 | * Implement Orion USB controller specification guidelines |
57 | */ | 39 | */ |
@@ -122,6 +104,51 @@ static void orion_usb_phy_v1_setup(struct usb_hcd *hcd) | |||
122 | wrl(USB_MODE, 0x13); | 104 | wrl(USB_MODE, 0x13); |
123 | } | 105 | } |
124 | 106 | ||
107 | static const struct hc_driver ehci_orion_hc_driver = { | ||
108 | .description = hcd_name, | ||
109 | .product_desc = "Marvell Orion EHCI", | ||
110 | .hcd_priv_size = sizeof(struct ehci_hcd), | ||
111 | |||
112 | /* | ||
113 | * generic hardware linkage | ||
114 | */ | ||
115 | .irq = ehci_irq, | ||
116 | .flags = HCD_MEMORY | HCD_USB2, | ||
117 | |||
118 | /* | ||
119 | * basic lifecycle operations | ||
120 | */ | ||
121 | .reset = ehci_setup, | ||
122 | .start = ehci_run, | ||
123 | .stop = ehci_stop, | ||
124 | .shutdown = ehci_shutdown, | ||
125 | |||
126 | /* | ||
127 | * managing i/o requests and associated device resources | ||
128 | */ | ||
129 | .urb_enqueue = ehci_urb_enqueue, | ||
130 | .urb_dequeue = ehci_urb_dequeue, | ||
131 | .endpoint_disable = ehci_endpoint_disable, | ||
132 | .endpoint_reset = ehci_endpoint_reset, | ||
133 | |||
134 | /* | ||
135 | * scheduling support | ||
136 | */ | ||
137 | .get_frame_number = ehci_get_frame, | ||
138 | |||
139 | /* | ||
140 | * root hub support | ||
141 | */ | ||
142 | .hub_status_data = ehci_hub_status_data, | ||
143 | .hub_control = ehci_hub_control, | ||
144 | .bus_suspend = ehci_bus_suspend, | ||
145 | .bus_resume = ehci_bus_resume, | ||
146 | .relinquish_port = ehci_relinquish_port, | ||
147 | .port_handed_over = ehci_port_handed_over, | ||
148 | |||
149 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, | ||
150 | }; | ||
151 | |||
125 | static void | 152 | static void |
126 | ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | 153 | ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, |
127 | const struct mbus_dram_target_info *dram) | 154 | const struct mbus_dram_target_info *dram) |
@@ -296,6 +323,8 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev) | |||
296 | return 0; | 323 | return 0; |
297 | } | 324 | } |
298 | 325 | ||
326 | MODULE_ALIAS("platform:orion-ehci"); | ||
327 | |||
299 | static const struct of_device_id ehci_orion_dt_ids[] = { | 328 | static const struct of_device_id ehci_orion_dt_ids[] = { |
300 | { .compatible = "marvell,orion-ehci", }, | 329 | { .compatible = "marvell,orion-ehci", }, |
301 | {}, | 330 | {}, |
@@ -307,31 +336,8 @@ static struct platform_driver ehci_orion_driver = { | |||
307 | .remove = __exit_p(ehci_orion_drv_remove), | 336 | .remove = __exit_p(ehci_orion_drv_remove), |
308 | .shutdown = usb_hcd_platform_shutdown, | 337 | .shutdown = usb_hcd_platform_shutdown, |
309 | .driver = { | 338 | .driver = { |
310 | .name = hcd_name, | 339 | .name = "orion-ehci", |
311 | .owner = THIS_MODULE, | 340 | .owner = THIS_MODULE, |
312 | .of_match_table = of_match_ptr(ehci_orion_dt_ids), | 341 | .of_match_table = of_match_ptr(ehci_orion_dt_ids), |
313 | }, | 342 | }, |
314 | }; | 343 | }; |
315 | |||
316 | static int __init ehci_orion_init(void) | ||
317 | { | ||
318 | if (usb_disabled()) | ||
319 | return -ENODEV; | ||
320 | |||
321 | pr_info("%s: " DRIVER_DESC "\n", hcd_name); | ||
322 | |||
323 | ehci_init_driver(&ehci_orion_hc_driver, &orion_overrides); | ||
324 | return platform_driver_register(&ehci_orion_driver); | ||
325 | } | ||
326 | module_init(ehci_orion_init); | ||
327 | |||
328 | static void __exit ehci_orion_cleanup(void) | ||
329 | { | ||
330 | platform_driver_unregister(&ehci_orion_driver); | ||
331 | } | ||
332 | module_exit(ehci_orion_cleanup); | ||
333 | |||
334 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
335 | MODULE_ALIAS("platform:ehci-orion"); | ||
336 | MODULE_AUTHOR("Tzachi Perelstein"); | ||
337 | MODULE_LICENSE("GPL"); | ||