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.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index dde518969798..80634292efee 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -34,11 +34,6 @@
34#define TEGRA_USB2_BASE 0xC5004000 34#define TEGRA_USB2_BASE 0xC5004000
35#define TEGRA_USB3_BASE 0xC5008000 35#define TEGRA_USB3_BASE 0xC5008000
36 36
37/* PORTSC registers */
38#define TEGRA_USB_PORTSC1 0x184
39#define TEGRA_USB_PORTSC1_PTS(x) (((x) & 0x3) << 30)
40#define TEGRA_USB_PORTSC1_PHCD (1 << 23)
41
42#define TEGRA_USB_DMA_ALIGN 32 37#define TEGRA_USB_DMA_ALIGN 32
43 38
44struct tegra_ehci_hcd { 39struct tegra_ehci_hcd {
@@ -380,37 +375,6 @@ static int setup_vbus_gpio(struct platform_device *pdev,
380 return err; 375 return err;
381} 376}
382 377
383/* Bits of PORTSC1, which will get cleared by writing 1 into them */
384#define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
385
386void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
387{
388 unsigned long val;
389 struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
390 void __iomem *base = hcd->regs;
391
392 val = readl(base + TEGRA_USB_PORTSC1) & ~TEGRA_PORTSC1_RWC_BITS;
393 val &= ~TEGRA_USB_PORTSC1_PTS(3);
394 val |= TEGRA_USB_PORTSC1_PTS(pts_val & 3);
395 writel(val, base + TEGRA_USB_PORTSC1);
396}
397EXPORT_SYMBOL_GPL(tegra_ehci_set_pts);
398
399void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
400{
401 unsigned long val;
402 struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
403 void __iomem *base = hcd->regs;
404
405 val = readl(base + TEGRA_USB_PORTSC1) & ~TEGRA_PORTSC1_RWC_BITS;
406 if (enable)
407 val |= TEGRA_USB_PORTSC1_PHCD;
408 else
409 val &= ~TEGRA_USB_PORTSC1_PHCD;
410 writel(val, base + TEGRA_USB_PORTSC1);
411}
412EXPORT_SYMBOL_GPL(tegra_ehci_set_phcd);
413
414static int tegra_ehci_probe(struct platform_device *pdev) 378static int tegra_ehci_probe(struct platform_device *pdev)
415{ 379{
416 struct resource *res; 380 struct resource *res;