From: Venu Byravarasu <vbyravarasu@nvidia.com>
To: <gregkh@linuxfoundation.org>, <stern@rowland.harvard.edu>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<swarren@wwwdotorg.org>, Venu Byravarasu <vbyravarasu@nvidia.com>
Subject: [PATCH] usb: host: tegra: Reset Tegra USB controller before init
Date: Thu, 28 Feb 2013 12:06:58 +0530 [thread overview]
Message-ID: <1362033418-7332-1-git-send-email-vbyravarasu@nvidia.com> (raw)
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
next reply other threads:[~2013-02-28 6:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 6:36 Venu Byravarasu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362033418-7332-1-git-send-email-vbyravarasu@nvidia.com \
--to=vbyravarasu@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome