diff options
author | Venu Byravarasu <vbyravarasu@nvidia.com> | 2012-12-13 15:59:08 -0500 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-01-28 13:20:05 -0500 |
commit | 585355c5b54e2ecdcd6463aec264d907bc416727 (patch) | |
tree | 0075632f3eb22e27b59902ff4153d96ae4f21882 /drivers/usb/host/ehci-tegra.c | |
parent | b4e074788a4a461431e25906358c6e62cb8daf9d (diff) |
usb: host: tegra: Resetting PORT0 based on information received via DT.
Tegra USB host driver is using port instance number,
to handle some of the hardware issues on SOC e.g. reset PORT0
twice etc. As instance number based handling looks ugly,
making use of information passed through DT for achieving this.
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index acf17556bd87..55a9cdee2949 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -43,6 +43,7 @@ struct tegra_ehci_hcd { | |||
43 | struct usb_phy *transceiver; | 43 | struct usb_phy *transceiver; |
44 | int host_resumed; | 44 | int host_resumed; |
45 | int port_resuming; | 45 | int port_resuming; |
46 | bool needs_double_reset; | ||
46 | enum tegra_usb_phy_port_speed port_speed; | 47 | enum tegra_usb_phy_port_speed port_speed; |
47 | }; | 48 | }; |
48 | 49 | ||
@@ -184,7 +185,7 @@ static int tegra_ehci_hub_control( | |||
184 | } | 185 | } |
185 | 186 | ||
186 | /* For USB1 port we need to issue Port Reset twice internally */ | 187 | /* For USB1 port we need to issue Port Reset twice internally */ |
187 | if (tegra->phy->instance == 0 && | 188 | if (tegra->needs_double_reset && |
188 | (typeReq == SetPortFeature && wValue == USB_PORT_FEAT_RESET)) { | 189 | (typeReq == SetPortFeature && wValue == USB_PORT_FEAT_RESET)) { |
189 | spin_unlock_irqrestore(&ehci->lock, flags); | 190 | spin_unlock_irqrestore(&ehci->lock, flags); |
190 | return tegra_ehci_internal_port_reset(ehci, status_reg); | 191 | return tegra_ehci_internal_port_reset(ehci, status_reg); |
@@ -666,6 +667,9 @@ static int tegra_ehci_probe(struct platform_device *pdev) | |||
666 | clk_prepare_enable(tegra->emc_clk); | 667 | clk_prepare_enable(tegra->emc_clk); |
667 | clk_set_rate(tegra->emc_clk, 400000000); | 668 | clk_set_rate(tegra->emc_clk, 400000000); |
668 | 669 | ||
670 | tegra->needs_double_reset = of_property_read_bool(pdev->dev.of_node, | ||
671 | "nvidia,needs-double-reset"); | ||
672 | |||
669 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 673 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
670 | if (!res) { | 674 | if (!res) { |
671 | dev_err(&pdev->dev, "Failed to get I/O memory\n"); | 675 | dev_err(&pdev->dev, "Failed to get I/O memory\n"); |