aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-05-10 02:47:14 -0400
committerOlof Johansson <olof@lixom.net>2012-05-10 02:47:14 -0400
commitbd69e27304e754b18dd6be8d8575af37afbbd095 (patch)
treea3c549bf42531ecaaccf6ecc3b5200ff41f31f2f /drivers/usb/host/ehci-tegra.c
parentf7269a825cde879355bd15778012d2c3fb2ff778 (diff)
parent563da21b1d1878736905bbff0f096fcd960d57c5 (diff)
Merge branch 'for-3.5/usb-ulpi' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/drivers
By Stephen Warren (30) and others via Stephen Warren * 'for-3.5/usb-ulpi' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (7 commits) ARM: dt: tegra: pinmux changes for USB ULPI ARM: tegra: add USB ULPI PHY reset GPIO to device tree ARM: tegra: don't hard-code USB ULPI PHY reset_gpio ARM: tegra: change pll_p_out4's rate to 24MHz ARM: tegra: fix pclk rate ARM: tegra: reparent sclk to pll_c_out1 ARM: tegra: Add pllc clock init table + depends/pinctrl/mergebase branch Pinctrl mergebase has a conflict in drivers/pinctrl/core.c that was resolved. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 86183366647..10bb3ea276f 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -581,15 +581,16 @@ static const struct hc_driver tegra_ehci_hc_driver = {
581 .port_handed_over = ehci_port_handed_over, 581 .port_handed_over = ehci_port_handed_over,
582}; 582};
583 583
584static int setup_vbus_gpio(struct platform_device *pdev) 584static int setup_vbus_gpio(struct platform_device *pdev,
585 struct tegra_ehci_platform_data *pdata)
585{ 586{
586 int err = 0; 587 int err = 0;
587 int gpio; 588 int gpio;
588 589
589 if (!pdev->dev.of_node) 590 gpio = pdata->vbus_gpio;
590 return 0; 591 if (!gpio_is_valid(gpio))
591 592 gpio = of_get_named_gpio(pdev->dev.of_node,
592 gpio = of_get_named_gpio(pdev->dev.of_node, "nvidia,vbus-gpio", 0); 593 "nvidia,vbus-gpio", 0);
593 if (!gpio_is_valid(gpio)) 594 if (!gpio_is_valid(gpio))
594 return 0; 595 return 0;
595 596
@@ -633,7 +634,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
633 if (!pdev->dev.dma_mask) 634 if (!pdev->dev.dma_mask)
634 pdev->dev.dma_mask = &tegra_ehci_dma_mask; 635 pdev->dev.dma_mask = &tegra_ehci_dma_mask;
635 636
636 setup_vbus_gpio(pdev); 637 setup_vbus_gpio(pdev, pdata);
637 638
638 tegra = kzalloc(sizeof(struct tegra_ehci_hcd), GFP_KERNEL); 639 tegra = kzalloc(sizeof(struct tegra_ehci_hcd), GFP_KERNEL);
639 if (!tegra) 640 if (!tegra)
@@ -707,8 +708,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
707 } 708 }
708 } 709 }
709 710
710 tegra->phy = tegra_usb_phy_open(instance, hcd->regs, pdata->phy_config, 711 tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
711 TEGRA_USB_PHY_MODE_HOST); 712 pdata->phy_config,
713 TEGRA_USB_PHY_MODE_HOST);
712 if (IS_ERR(tegra->phy)) { 714 if (IS_ERR(tegra->phy)) {
713 dev_err(&pdev->dev, "Failed to open USB phy\n"); 715 dev_err(&pdev->dev, "Failed to open USB phy\n");
714 err = -ENXIO; 716 err = -ENXIO;