diff options
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/chipidea/ci13xxx_imx.c | 8 | ||||
-rw-r--r-- | drivers/usb/chipidea/ci13xxx_msm.c | 6 | ||||
-rw-r--r-- | drivers/usb/chipidea/ci13xxx_pci.c | 6 | ||||
-rw-r--r-- | drivers/usb/chipidea/core.c | 9 | ||||
-rw-r--r-- | drivers/usb/chipidea/debug.c | 3 | ||||
-rw-r--r-- | drivers/usb/chipidea/host.c | 67 | ||||
-rw-r--r-- | drivers/usb/chipidea/usbmisc_imx6q.c | 6 |
8 files changed, 24 insertions, 82 deletions
diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index 1ea932a13685..608a2aeb400c 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig | |||
@@ -20,6 +20,7 @@ config USB_CHIPIDEA_UDC | |||
20 | config USB_CHIPIDEA_HOST | 20 | config USB_CHIPIDEA_HOST |
21 | bool "ChipIdea host controller" | 21 | bool "ChipIdea host controller" |
22 | depends on USB=y || USB=USB_CHIPIDEA | 22 | depends on USB=y || USB=USB_CHIPIDEA |
23 | depends on USB_EHCI_HCD | ||
23 | select USB_EHCI_ROOT_HUB_TT | 24 | select USB_EHCI_ROOT_HUB_TT |
24 | help | 25 | help |
25 | Say Y here to enable host controller functionality of the | 26 | Say Y here to enable host controller functionality of the |
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c index 0f5ca4bea17f..8c291220be7f 100644 --- a/drivers/usb/chipidea/ci13xxx_imx.c +++ b/drivers/usb/chipidea/ci13xxx_imx.c | |||
@@ -85,7 +85,7 @@ EXPORT_SYMBOL_GPL(usbmisc_get_init_data); | |||
85 | 85 | ||
86 | /* End of common functions shared by usbmisc drivers*/ | 86 | /* End of common functions shared by usbmisc drivers*/ |
87 | 87 | ||
88 | static struct ci13xxx_platform_data ci13xxx_imx_platdata __devinitdata = { | 88 | static struct ci13xxx_platform_data ci13xxx_imx_platdata = { |
89 | .name = "ci13xxx_imx", | 89 | .name = "ci13xxx_imx", |
90 | .flags = CI13XXX_REQUIRE_TRANSCEIVER | | 90 | .flags = CI13XXX_REQUIRE_TRANSCEIVER | |
91 | CI13XXX_PULLUP_ON_VBUS | | 91 | CI13XXX_PULLUP_ON_VBUS | |
@@ -93,7 +93,7 @@ static struct ci13xxx_platform_data ci13xxx_imx_platdata __devinitdata = { | |||
93 | .capoffset = DEF_CAPOFFSET, | 93 | .capoffset = DEF_CAPOFFSET, |
94 | }; | 94 | }; |
95 | 95 | ||
96 | static int __devinit ci13xxx_imx_probe(struct platform_device *pdev) | 96 | static int ci13xxx_imx_probe(struct platform_device *pdev) |
97 | { | 97 | { |
98 | struct ci13xxx_imx_data *data; | 98 | struct ci13xxx_imx_data *data; |
99 | struct platform_device *plat_ci, *phy_pdev; | 99 | struct platform_device *plat_ci, *phy_pdev; |
@@ -220,7 +220,7 @@ put_np: | |||
220 | return ret; | 220 | return ret; |
221 | } | 221 | } |
222 | 222 | ||
223 | static int __devexit ci13xxx_imx_remove(struct platform_device *pdev) | 223 | static int ci13xxx_imx_remove(struct platform_device *pdev) |
224 | { | 224 | { |
225 | struct ci13xxx_imx_data *data = platform_get_drvdata(pdev); | 225 | struct ci13xxx_imx_data *data = platform_get_drvdata(pdev); |
226 | 226 | ||
@@ -252,7 +252,7 @@ MODULE_DEVICE_TABLE(of, ci13xxx_imx_dt_ids); | |||
252 | 252 | ||
253 | static struct platform_driver ci13xxx_imx_driver = { | 253 | static struct platform_driver ci13xxx_imx_driver = { |
254 | .probe = ci13xxx_imx_probe, | 254 | .probe = ci13xxx_imx_probe, |
255 | .remove = __devexit_p(ci13xxx_imx_remove), | 255 | .remove = ci13xxx_imx_remove, |
256 | .driver = { | 256 | .driver = { |
257 | .name = "imx_usb", | 257 | .name = "imx_usb", |
258 | .owner = THIS_MODULE, | 258 | .owner = THIS_MODULE, |
diff --git a/drivers/usb/chipidea/ci13xxx_msm.c b/drivers/usb/chipidea/ci13xxx_msm.c index b01feb3be92e..7d16681fd3d2 100644 --- a/drivers/usb/chipidea/ci13xxx_msm.c +++ b/drivers/usb/chipidea/ci13xxx_msm.c | |||
@@ -55,7 +55,7 @@ static struct ci13xxx_platform_data ci13xxx_msm_platdata = { | |||
55 | .notify_event = ci13xxx_msm_notify_event, | 55 | .notify_event = ci13xxx_msm_notify_event, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static int __devinit ci13xxx_msm_probe(struct platform_device *pdev) | 58 | static int ci13xxx_msm_probe(struct platform_device *pdev) |
59 | { | 59 | { |
60 | struct platform_device *plat_ci; | 60 | struct platform_device *plat_ci; |
61 | 61 | ||
@@ -77,7 +77,7 @@ static int __devinit ci13xxx_msm_probe(struct platform_device *pdev) | |||
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
79 | 79 | ||
80 | static int __devexit ci13xxx_msm_remove(struct platform_device *pdev) | 80 | static int ci13xxx_msm_remove(struct platform_device *pdev) |
81 | { | 81 | { |
82 | struct platform_device *plat_ci = platform_get_drvdata(pdev); | 82 | struct platform_device *plat_ci = platform_get_drvdata(pdev); |
83 | 83 | ||
@@ -89,7 +89,7 @@ static int __devexit ci13xxx_msm_remove(struct platform_device *pdev) | |||
89 | 89 | ||
90 | static struct platform_driver ci13xxx_msm_driver = { | 90 | static struct platform_driver ci13xxx_msm_driver = { |
91 | .probe = ci13xxx_msm_probe, | 91 | .probe = ci13xxx_msm_probe, |
92 | .remove = __devexit_p(ci13xxx_msm_remove), | 92 | .remove = ci13xxx_msm_remove, |
93 | .driver = { .name = "msm_hsusb", }, | 93 | .driver = { .name = "msm_hsusb", }, |
94 | }; | 94 | }; |
95 | 95 | ||
diff --git a/drivers/usb/chipidea/ci13xxx_pci.c b/drivers/usb/chipidea/ci13xxx_pci.c index 918e14971f2b..9b227e39299a 100644 --- a/drivers/usb/chipidea/ci13xxx_pci.c +++ b/drivers/usb/chipidea/ci13xxx_pci.c | |||
@@ -48,7 +48,7 @@ struct ci13xxx_platform_data penwell_pci_platdata = { | |||
48 | * Allocates basic PCI resources for this USB device controller, and then | 48 | * Allocates basic PCI resources for this USB device controller, and then |
49 | * invokes the udc_probe() method to start the UDC associated with it | 49 | * invokes the udc_probe() method to start the UDC associated with it |
50 | */ | 50 | */ |
51 | static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev, | 51 | static int ci13xxx_pci_probe(struct pci_dev *pdev, |
52 | const struct pci_device_id *id) | 52 | const struct pci_device_id *id) |
53 | { | 53 | { |
54 | struct ci13xxx_platform_data *platdata = (void *)id->driver_data; | 54 | struct ci13xxx_platform_data *platdata = (void *)id->driver_data; |
@@ -107,7 +107,7 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev, | |||
107 | * first invoking the udc_remove() and then releases | 107 | * first invoking the udc_remove() and then releases |
108 | * all PCI resources allocated for this USB device controller | 108 | * all PCI resources allocated for this USB device controller |
109 | */ | 109 | */ |
110 | static void __devexit ci13xxx_pci_remove(struct pci_dev *pdev) | 110 | static void ci13xxx_pci_remove(struct pci_dev *pdev) |
111 | { | 111 | { |
112 | struct platform_device *plat_ci = pci_get_drvdata(pdev); | 112 | struct platform_device *plat_ci = pci_get_drvdata(pdev); |
113 | 113 | ||
@@ -147,7 +147,7 @@ static struct pci_driver ci13xxx_pci_driver = { | |||
147 | .name = UDC_DRIVER_NAME, | 147 | .name = UDC_DRIVER_NAME, |
148 | .id_table = ci13xxx_pci_id_table, | 148 | .id_table = ci13xxx_pci_id_table, |
149 | .probe = ci13xxx_pci_probe, | 149 | .probe = ci13xxx_pci_probe, |
150 | .remove = __devexit_p(ci13xxx_pci_remove), | 150 | .remove = ci13xxx_pci_remove, |
151 | }; | 151 | }; |
152 | 152 | ||
153 | module_pci_driver(ci13xxx_pci_driver); | 153 | module_pci_driver(ci13xxx_pci_driver); |
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index f69d029b4607..aebf695a9344 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
@@ -385,12 +385,13 @@ EXPORT_SYMBOL_GPL(ci13xxx_add_device); | |||
385 | 385 | ||
386 | void ci13xxx_remove_device(struct platform_device *pdev) | 386 | void ci13xxx_remove_device(struct platform_device *pdev) |
387 | { | 387 | { |
388 | int id = pdev->id; | ||
388 | platform_device_unregister(pdev); | 389 | platform_device_unregister(pdev); |
389 | ida_simple_remove(&ci_ida, pdev->id); | 390 | ida_simple_remove(&ci_ida, id); |
390 | } | 391 | } |
391 | EXPORT_SYMBOL_GPL(ci13xxx_remove_device); | 392 | EXPORT_SYMBOL_GPL(ci13xxx_remove_device); |
392 | 393 | ||
393 | static int __devinit ci_hdrc_probe(struct platform_device *pdev) | 394 | static int ci_hdrc_probe(struct platform_device *pdev) |
394 | { | 395 | { |
395 | struct device *dev = &pdev->dev; | 396 | struct device *dev = &pdev->dev; |
396 | struct ci13xxx *ci; | 397 | struct ci13xxx *ci; |
@@ -508,7 +509,7 @@ rm_wq: | |||
508 | return ret; | 509 | return ret; |
509 | } | 510 | } |
510 | 511 | ||
511 | static int __devexit ci_hdrc_remove(struct platform_device *pdev) | 512 | static int ci_hdrc_remove(struct platform_device *pdev) |
512 | { | 513 | { |
513 | struct ci13xxx *ci = platform_get_drvdata(pdev); | 514 | struct ci13xxx *ci = platform_get_drvdata(pdev); |
514 | 515 | ||
@@ -523,7 +524,7 @@ static int __devexit ci_hdrc_remove(struct platform_device *pdev) | |||
523 | 524 | ||
524 | static struct platform_driver ci_hdrc_driver = { | 525 | static struct platform_driver ci_hdrc_driver = { |
525 | .probe = ci_hdrc_probe, | 526 | .probe = ci_hdrc_probe, |
526 | .remove = __devexit_p(ci_hdrc_remove), | 527 | .remove = ci_hdrc_remove, |
527 | .driver = { | 528 | .driver = { |
528 | .name = "ci_hdrc", | 529 | .name = "ci_hdrc", |
529 | }, | 530 | }, |
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index c6f50a257565..3bc244d2636a 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c | |||
@@ -160,9 +160,6 @@ static ssize_t show_device(struct device *dev, struct device_attribute *attr, | |||
160 | gadget->speed); | 160 | gadget->speed); |
161 | n += scnprintf(buf + n, PAGE_SIZE - n, "max_speed = %d\n", | 161 | n += scnprintf(buf + n, PAGE_SIZE - n, "max_speed = %d\n", |
162 | gadget->max_speed); | 162 | gadget->max_speed); |
163 | /* TODO: Scheduled for removal in 3.8. */ | ||
164 | n += scnprintf(buf + n, PAGE_SIZE - n, "is_dualspeed = %d\n", | ||
165 | gadget_is_dualspeed(gadget)); | ||
166 | n += scnprintf(buf + n, PAGE_SIZE - n, "is_otg = %d\n", | 163 | n += scnprintf(buf + n, PAGE_SIZE - n, "is_otg = %d\n", |
167 | gadget->is_otg); | 164 | gadget->is_otg); |
168 | n += scnprintf(buf + n, PAGE_SIZE - n, "is_a_peripheral = %d\n", | 165 | n += scnprintf(buf + n, PAGE_SIZE - n, "is_a_peripheral = %d\n", |
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index ebff9f4f56ec..caecad9213f5 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c | |||
@@ -20,77 +20,18 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/io.h> | ||
23 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
24 | #include <linux/usb/hcd.h> | 25 | #include <linux/usb/hcd.h> |
25 | #include <linux/usb/chipidea.h> | 26 | #include <linux/usb/chipidea.h> |
26 | 27 | ||
27 | #define CHIPIDEA_EHCI | 28 | #include "../host/ehci.h" |
28 | #include "../host/ehci-hcd.c" | ||
29 | 29 | ||
30 | #include "ci.h" | 30 | #include "ci.h" |
31 | #include "bits.h" | 31 | #include "bits.h" |
32 | #include "host.h" | 32 | #include "host.h" |
33 | 33 | ||
34 | static int ci_ehci_setup(struct usb_hcd *hcd) | 34 | static struct hc_driver __read_mostly ci_ehci_hc_driver; |
35 | { | ||
36 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
37 | int ret; | ||
38 | |||
39 | hcd->has_tt = 1; | ||
40 | |||
41 | ret = ehci_setup(hcd); | ||
42 | if (ret) | ||
43 | return ret; | ||
44 | |||
45 | ehci_port_power(ehci, 0); | ||
46 | |||
47 | return ret; | ||
48 | } | ||
49 | |||
50 | static const struct hc_driver ci_ehci_hc_driver = { | ||
51 | .description = "ehci_hcd", | ||
52 | .product_desc = "ChipIdea HDRC EHCI", | ||
53 | .hcd_priv_size = sizeof(struct ehci_hcd), | ||
54 | |||
55 | /* | ||
56 | * generic hardware linkage | ||
57 | */ | ||
58 | .irq = ehci_irq, | ||
59 | .flags = HCD_MEMORY | HCD_USB2, | ||
60 | |||
61 | /* | ||
62 | * basic lifecycle operations | ||
63 | */ | ||
64 | .reset = ci_ehci_setup, | ||
65 | .start = ehci_run, | ||
66 | .stop = ehci_stop, | ||
67 | .shutdown = ehci_shutdown, | ||
68 | |||
69 | /* | ||
70 | * managing i/o requests and associated device resources | ||
71 | */ | ||
72 | .urb_enqueue = ehci_urb_enqueue, | ||
73 | .urb_dequeue = ehci_urb_dequeue, | ||
74 | .endpoint_disable = ehci_endpoint_disable, | ||
75 | .endpoint_reset = ehci_endpoint_reset, | ||
76 | |||
77 | /* | ||
78 | * scheduling support | ||
79 | */ | ||
80 | .get_frame_number = ehci_get_frame, | ||
81 | |||
82 | /* | ||
83 | * root hub support | ||
84 | */ | ||
85 | .hub_status_data = ehci_hub_status_data, | ||
86 | .hub_control = ehci_hub_control, | ||
87 | .bus_suspend = ehci_bus_suspend, | ||
88 | .bus_resume = ehci_bus_resume, | ||
89 | .relinquish_port = ehci_relinquish_port, | ||
90 | .port_handed_over = ehci_port_handed_over, | ||
91 | |||
92 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, | ||
93 | }; | ||
94 | 35 | ||
95 | static irqreturn_t host_irq(struct ci13xxx *ci) | 36 | static irqreturn_t host_irq(struct ci13xxx *ci) |
96 | { | 37 | { |
@@ -157,5 +98,7 @@ int ci_hdrc_host_init(struct ci13xxx *ci) | |||
157 | rdrv->name = "host"; | 98 | rdrv->name = "host"; |
158 | ci->roles[CI_ROLE_HOST] = rdrv; | 99 | ci->roles[CI_ROLE_HOST] = rdrv; |
159 | 100 | ||
101 | ehci_init_driver(&ci_ehci_hc_driver, NULL); | ||
102 | |||
160 | return 0; | 103 | return 0; |
161 | } | 104 | } |
diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c b/drivers/usb/chipidea/usbmisc_imx6q.c index 416e3fc58fd0..845efe29e6b9 100644 --- a/drivers/usb/chipidea/usbmisc_imx6q.c +++ b/drivers/usb/chipidea/usbmisc_imx6q.c | |||
@@ -82,7 +82,7 @@ static const struct of_device_id usbmisc_imx6q_dt_ids[] = { | |||
82 | { /* sentinel */ } | 82 | { /* sentinel */ } |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static int __devinit usbmisc_imx6q_probe(struct platform_device *pdev) | 85 | static int usbmisc_imx6q_probe(struct platform_device *pdev) |
86 | { | 86 | { |
87 | struct resource *res; | 87 | struct resource *res; |
88 | struct imx6q_usbmisc *data; | 88 | struct imx6q_usbmisc *data; |
@@ -127,7 +127,7 @@ static int __devinit usbmisc_imx6q_probe(struct platform_device *pdev) | |||
127 | return 0; | 127 | return 0; |
128 | } | 128 | } |
129 | 129 | ||
130 | static int __devexit usbmisc_imx6q_remove(struct platform_device *pdev) | 130 | static int usbmisc_imx6q_remove(struct platform_device *pdev) |
131 | { | 131 | { |
132 | usbmisc_unset_ops(&imx6q_usbmisc_ops); | 132 | usbmisc_unset_ops(&imx6q_usbmisc_ops); |
133 | clk_disable_unprepare(usbmisc->clk); | 133 | clk_disable_unprepare(usbmisc->clk); |
@@ -136,7 +136,7 @@ static int __devexit usbmisc_imx6q_remove(struct platform_device *pdev) | |||
136 | 136 | ||
137 | static struct platform_driver usbmisc_imx6q_driver = { | 137 | static struct platform_driver usbmisc_imx6q_driver = { |
138 | .probe = usbmisc_imx6q_probe, | 138 | .probe = usbmisc_imx6q_probe, |
139 | .remove = __devexit_p(usbmisc_imx6q_remove), | 139 | .remove = usbmisc_imx6q_remove, |
140 | .driver = { | 140 | .driver = { |
141 | .name = "usbmisc_imx6q", | 141 | .name = "usbmisc_imx6q", |
142 | .owner = THIS_MODULE, | 142 | .owner = THIS_MODULE, |