Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227040
b: refs/heads/master
c: 0247a7b
h: refs/heads/master
v: v3
  • Loading branch information
Fabio Estevam authored and Greg Kroah-Hartman committed Dec 16, 2010
1 parent d90c959 commit 2703631
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c8245c4990e75d86ab30bb0af9bb90cbe04985d
refs/heads/master: 0247a7bcd4273fa10c4aba9b3f567c659bab2d2b
26 changes: 14 additions & 12 deletions trunk/drivers/usb/host/ehci-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,8 @@ struct ehci_mxc_priv {
static int ehci_mxc_setup(struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct device *dev = hcd->self.controller;
struct mxc_usbh_platform_data *pdata = dev_get_platdata(dev);
int retval;

/* EHCI registers start at offset 0x100 */
ehci->caps = hcd->regs + 0x100;
ehci->regs = hcd->regs + 0x100 +
HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
dbg_hcs_params(ehci, "reset");
dbg_hcc_params(ehci, "reset");

Expand All @@ -65,12 +59,6 @@ static int ehci_mxc_setup(struct usb_hcd *hcd)

ehci_reset(ehci);

/* set up the PORTSCx register */
ehci_writel(ehci, pdata->portsc, &ehci->regs->port_status[0]);

/* is this really needed? */
msleep(10);

ehci_port_power(ehci, 0);
return 0;
}
Expand Down Expand Up @@ -128,6 +116,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
int irq, ret;
struct ehci_mxc_priv *priv;
struct device *dev = &pdev->dev;
struct ehci_hcd *ehci;

dev_info(&pdev->dev, "initializing i.MX USB Controller\n");

Expand Down Expand Up @@ -204,6 +193,19 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
if (ret < 0)
goto err_init;

ehci = hcd_to_ehci(hcd);

/* EHCI registers start at offset 0x100 */
ehci->caps = hcd->regs + 0x100;
ehci->regs = hcd->regs + 0x100 +
HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));

/* set up the PORTSCx register */
ehci_writel(ehci, pdata->portsc, &ehci->regs->port_status[0]);

/* is this really needed? */
msleep(10);

/* Initialize the transceiver */
if (pdata->otg) {
pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET;
Expand Down

0 comments on commit 2703631

Please sign in to comment.