aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-mxc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 16:16:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 16:16:28 -0500
commit3e5b08cbbf78bedd316904ab0cf3b27119433ee5 (patch)
tree0365745c1b7441c1868551c024410c829c3accc6 /drivers/usb/host/ehci-mxc.c
parentda40d036fd716f0efb2917076220814b1e927ae1 (diff)
parent2af10844eb6ed104f9505bf3a7ba3ceb02264f31 (diff)
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits) USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004) USB: serial: ftdi_sio: add support for TIOCSERGETLSR USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() usb: ehci-omap: fix tll channel enable mask usb: ohci-omap3: fix trivial typo USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096 USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's USB: gadget: update ci13xxx to work with g_ether USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers Revert "USB: musb: pm: don't rely fully on clock support" Revert "USB: musb: blackfin: pm: make it work" USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added ... Manually fix up trivial conflicts in USB Kconfig changes in: arch/arm/mach-omap2/Kconfig arch/sh/Kconfig drivers/usb/Kconfig drivers/usb/host/ehci-hcd.c and annoying chip clock data conflicts in: arch/arm/mach-omap2/clock3xxx_data.c arch/arm/mach-omap2/clock44xx_data.c
Diffstat (limited to 'drivers/usb/host/ehci-mxc.c')
-rw-r--r--drivers/usb/host/ehci-mxc.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index a22d2df769a..fa59b26fc5b 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -36,14 +36,8 @@ struct ehci_mxc_priv {
36static int ehci_mxc_setup(struct usb_hcd *hcd) 36static int ehci_mxc_setup(struct usb_hcd *hcd)
37{ 37{
38 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 38 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
39 struct device *dev = hcd->self.controller;
40 struct mxc_usbh_platform_data *pdata = dev_get_platdata(dev);
41 int retval; 39 int retval;
42 40
43 /* EHCI registers start at offset 0x100 */
44 ehci->caps = hcd->regs + 0x100;
45 ehci->regs = hcd->regs + 0x100 +
46 HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
47 dbg_hcs_params(ehci, "reset"); 41 dbg_hcs_params(ehci, "reset");
48 dbg_hcc_params(ehci, "reset"); 42 dbg_hcc_params(ehci, "reset");
49 43
@@ -65,12 +59,6 @@ static int ehci_mxc_setup(struct usb_hcd *hcd)
65 59
66 ehci_reset(ehci); 60 ehci_reset(ehci);
67 61
68 /* set up the PORTSCx register */
69 ehci_writel(ehci, pdata->portsc, &ehci->regs->port_status[0]);
70
71 /* is this really needed? */
72 msleep(10);
73
74 ehci_port_power(ehci, 0); 62 ehci_port_power(ehci, 0);
75 return 0; 63 return 0;
76} 64}
@@ -100,6 +88,7 @@ static const struct hc_driver ehci_mxc_hc_driver = {
100 .urb_enqueue = ehci_urb_enqueue, 88 .urb_enqueue = ehci_urb_enqueue,
101 .urb_dequeue = ehci_urb_dequeue, 89 .urb_dequeue = ehci_urb_dequeue,
102 .endpoint_disable = ehci_endpoint_disable, 90 .endpoint_disable = ehci_endpoint_disable,
91 .endpoint_reset = ehci_endpoint_reset,
103 92
104 /* 93 /*
105 * scheduling support 94 * scheduling support
@@ -115,6 +104,8 @@ static const struct hc_driver ehci_mxc_hc_driver = {
115 .bus_resume = ehci_bus_resume, 104 .bus_resume = ehci_bus_resume,
116 .relinquish_port = ehci_relinquish_port, 105 .relinquish_port = ehci_relinquish_port,
117 .port_handed_over = ehci_port_handed_over, 106 .port_handed_over = ehci_port_handed_over,
107
108 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
118}; 109};
119 110
120static int ehci_mxc_drv_probe(struct platform_device *pdev) 111static int ehci_mxc_drv_probe(struct platform_device *pdev)
@@ -125,6 +116,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
125 int irq, ret; 116 int irq, ret;
126 struct ehci_mxc_priv *priv; 117 struct ehci_mxc_priv *priv;
127 struct device *dev = &pdev->dev; 118 struct device *dev = &pdev->dev;
119 struct ehci_hcd *ehci;
128 120
129 dev_info(&pdev->dev, "initializing i.MX USB Controller\n"); 121 dev_info(&pdev->dev, "initializing i.MX USB Controller\n");
130 122
@@ -212,6 +204,19 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
212 if (ret < 0) 204 if (ret < 0)
213 goto err_init; 205 goto err_init;
214 206
207 ehci = hcd_to_ehci(hcd);
208
209 /* EHCI registers start at offset 0x100 */
210 ehci->caps = hcd->regs + 0x100;
211 ehci->regs = hcd->regs + 0x100 +
212 HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
213
214 /* set up the PORTSCx register */
215 ehci_writel(ehci, pdata->portsc, &ehci->regs->port_status[0]);
216
217 /* is this really needed? */
218 msleep(10);
219
215 /* Initialize the transceiver */ 220 /* Initialize the transceiver */
216 if (pdata->otg) { 221 if (pdata->otg) {
217 pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET; 222 pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET;