On Wed, 11 Apr 2012, Steven J. Hill wrote: > From: "Steven J. Hill" <sjhill@xxxxxxxx> > > Add EHCI driver for MIPS SEAD-3 development platform. > > Signed-off-by: Chris Dearman <chris@xxxxxxxx> > Signed-off-by: Steven J. Hill <sjhill@xxxxxxxx> Even better than before. But... > +const struct hc_driver ehci_sead3_hc_driver = { > + .description = hcd_name, > + .product_desc = "SEAD-3 EHCI", > + .hcd_priv_size = sizeof(struct ehci_hcd), > + > + /* > + * generic hardware linkage > + */ > + .irq = ehci_irq, > + .flags = HCD_MEMORY | HCD_USB2, > + > + /* > + * basic lifecycle operations > + * > + */ > + .reset = ehci_setup, You no longer care about the ehci->need_io_watchdog setting? > +static int ehci_hcd_sead3_drv_probe(struct platform_device *pdev) > +{ > + struct usb_hcd *hcd; > + struct ehci_hcd *ehci; > + struct resource *res; > + int ret; > + > + if (usb_disabled()) > + return -ENODEV; > + > + if (pdev->resource[1].flags != IORESOURCE_IRQ) { > + pr_debug("resource[1] is not IORESOURCE_IRQ"); > + return -ENOMEM; > + } > + hcd = usb_create_hcd(&ehci_sead3_hc_driver, &pdev->dev, "SEAD-3"); > + if (!hcd) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + hcd->rsrc_start = res->start; > + hcd->rsrc_len = resource_size(res); > + > + if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { > + pr_debug("request_mem_region failed"); > + ret = -EBUSY; > + goto err1; > + } > + > + hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); > + if (!hcd->regs) { > + pr_debug("ioremap failed"); > + ret = -ENOMEM; > + goto err2; > + } > + > + ehci = hcd_to_ehci(hcd); > + ehci->caps = hcd->regs + 0x100; > + ehci->regs = hcd->regs + 0x100 + > + HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); > + /* cache this readonly data; minimize chip reads */ > + ehci->hcs_params = readl(&ehci->caps->hcs_params); The last four lines above are duplicates of code that is already present in ehci_setup. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html