aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-11-02 12:34:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-02 13:03:50 -0400
commit09f6ffde2ecef4cc4e2a5edaa303210cabd96f57 (patch)
tree89d6018a4f34afe645720b2321f37da73deb213e /drivers/usb/chipidea
parent57465109ce6c62e57b98788496c823c2067253c0 (diff)
USB: EHCI: fix build error by making ChipIdea host a normal EHCI driver
This patch (as1627) splits the ehci-hcd core code, which has become a separate library module, out from the ChipIdea host driver. Instead of #include-ing ehci-hcd.c directly, the ChipIdea module will now use the ehci-hcd library in a normal fashion. This fixes a build error caused by commit 3e0232039967d7a1a06c013d097458b4d5892af1 (USB: EHCI: prepare to make ehci-hcd a library module); I had forgotten about the unorthodox way the ChipIdea driver uses the ehci-hcd code. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/Kconfig1
-rw-r--r--drivers/usb/chipidea/host.c51
2 files changed, 8 insertions, 44 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
20config USB_CHIPIDEA_HOST 20config 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/host.c b/drivers/usb/chipidea/host.c
index ebc041ff9cd5..30b17ae5aa22 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -25,57 +25,18 @@
25#include <linux/usb/chipidea.h> 25#include <linux/usb/chipidea.h>
26 26
27#define CHIPIDEA_EHCI 27#define CHIPIDEA_EHCI
28#include "../host/ehci-hcd.c" 28#include "../host/ehci.h"
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
34static const struct hc_driver ci_ehci_hc_driver = { 34static const struct ehci_driver_overrides ci_overrides = {
35 .description = "ehci_hcd", 35 .product_desc = "ChipIdea HDRC EHCI host controller",
36 .product_desc = "ChipIdea HDRC EHCI",
37 .hcd_priv_size = sizeof(struct ehci_hcd),
38
39 /*
40 * generic hardware linkage
41 */
42 .irq = ehci_irq,
43 .flags = HCD_MEMORY | HCD_USB2,
44
45 /*
46 * basic lifecycle operations
47 */
48 .reset = ehci_setup,
49 .start = ehci_run,
50 .stop = ehci_stop,
51 .shutdown = ehci_shutdown,
52
53 /*
54 * managing i/o requests and associated device resources
55 */
56 .urb_enqueue = ehci_urb_enqueue,
57 .urb_dequeue = ehci_urb_dequeue,
58 .endpoint_disable = ehci_endpoint_disable,
59 .endpoint_reset = ehci_endpoint_reset,
60
61 /*
62 * scheduling support
63 */
64 .get_frame_number = ehci_get_frame,
65
66 /*
67 * root hub support
68 */
69 .hub_status_data = ehci_hub_status_data,
70 .hub_control = ehci_hub_control,
71 .bus_suspend = ehci_bus_suspend,
72 .bus_resume = ehci_bus_resume,
73 .relinquish_port = ehci_relinquish_port,
74 .port_handed_over = ehci_port_handed_over,
75
76 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
77}; 36};
78 37
38static struct hc_driver __read_mostly ci_ehci_hc_driver;
39
79static irqreturn_t host_irq(struct ci13xxx *ci) 40static irqreturn_t host_irq(struct ci13xxx *ci)
80{ 41{
81 return usb_hcd_irq(ci->irq, ci->hcd); 42 return usb_hcd_irq(ci->irq, ci->hcd);
@@ -141,5 +102,7 @@ int ci_hdrc_host_init(struct ci13xxx *ci)
141 rdrv->name = "host"; 102 rdrv->name = "host";
142 ci->roles[CI_ROLE_HOST] = rdrv; 103 ci->roles[CI_ROLE_HOST] = rdrv;
143 104
105 ehci_init_driver(&ci_ehci_hc_driver, &ci_overrides);
106
144 return 0; 107 return 0;
145} 108}