aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 27ac6ad53c3d..7ef00ecb0da1 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -509,8 +509,31 @@ static struct platform_driver tegra_ehci_driver = {
509 } 509 }
510}; 510};
511 511
512static int tegra_ehci_reset(struct usb_hcd *hcd)
513{
514 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
515 int retval;
516 int txfifothresh;
517
518 retval = ehci_setup(hcd);
519 if (retval)
520 return retval;
521
522 /*
523 * We should really pull this value out of tegra_ehci_soc_config, but
524 * to avoid needing access to it, make use of the fact that Tegra20 is
525 * the only one so far that needs a value of 10, and Tegra20 is the
526 * only one which doesn't set has_hostpc.
527 */
528 txfifothresh = ehci->has_hostpc ? 0x10 : 10;
529 ehci_writel(ehci, txfifothresh << 16, &ehci->regs->txfill_tuning);
530
531 return 0;
532}
533
512static const struct ehci_driver_overrides tegra_overrides __initconst = { 534static const struct ehci_driver_overrides tegra_overrides __initconst = {
513 .extra_priv_size = sizeof(struct tegra_ehci_hcd), 535 .extra_priv_size = sizeof(struct tegra_ehci_hcd),
536 .reset = tegra_ehci_reset,
514}; 537};
515 538
516static int __init ehci_tegra_init(void) 539static int __init ehci_tegra_init(void)