public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: host: tegra: Reset Tegra USB controller before init
@ 2013-02-28  6:36 Venu Byravarasu
  2013-02-28 15:09 ` Alan Stern
  2013-02-28 18:16 ` Stephen Warren
  0 siblings, 2 replies; 13+ messages in thread
From: Venu Byravarasu @ 2013-02-28  6:36 UTC (permalink / raw)
  To: gregkh, stern; +Cc: linux-usb, linux-kernel, swarren, Venu Byravarasu

To clear any configurations made by U-Boot on Tegra USB controller,
reset it before init in probe.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
---
When U-Boot configures a Tegra USB controller in device mode and if the EHCI
driver of kernel tries to set it to HOST mode, message "irq 52: nobody cared"
appears and IRQ gets disabled.

This issue was initially reported with: http://marc.info/?l=linux-tegra&m=136110175423601&w=2

To avoid such issues, due to configurations made by U-Boot driver, reset the
Tegra USB controller, before configuring it by kernel.


 drivers/usb/host/ehci-tegra.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 568aecc..83d190a 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -28,6 +28,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/usb/ehci_def.h>
 #include <linux/usb/tegra_usb_phy.h>
+#include <linux/clk/tegra.h>
 
 #define TEGRA_USB_BASE			0xC5000000
 #define TEGRA_USB2_BASE			0xC5004000
@@ -691,6 +692,10 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 	if (err)
 		goto fail_clk;
 
+	tegra_periph_reset_assert(tegra->clk);
+	udelay(1);
+	tegra_periph_reset_deassert(tegra->clk);
+
 	tegra->needs_double_reset = of_property_read_bool(pdev->dev.of_node,
 		"nvidia,needs-double-reset");
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-03 10:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-28  6:36 [PATCH] usb: host: tegra: Reset Tegra USB controller before init Venu Byravarasu
2013-02-28 15:09 ` Alan Stern
2013-02-28 18:10   ` Stephen Warren
2013-02-28 18:16 ` Stephen Warren
2013-02-28 18:52   ` Alan Stern
2013-02-28 19:11     ` Stephen Warren
2013-03-04  7:55   ` Venu Byravarasu
2013-03-04 16:55     ` Stephen Warren
2013-03-04 17:38       ` Alan Stern
2013-03-05  0:34       ` gregkh
2013-04-02  7:12         ` Venu Byravarasu
2013-04-02 15:31           ` Stephen Warren
2013-04-03 10:48             ` Venu Byravarasu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox