* [PATCH RESEND 0/2] usb: tegra: modifying port reset based on instance number
@ 2013-01-03 7:29 Venu Byravarasu
2013-01-03 7:29 ` [PATCH RESEND 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
2013-01-03 7:29 ` [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu
0 siblings, 2 replies; 6+ messages in thread
From: Venu Byravarasu @ 2013-01-03 7:29 UTC (permalink / raw)
To: gregkh, stern; +Cc: linux-usb, linux-kernel, swarren, Venu Byravarasu
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,
added a new property to USB DT node for this purpose.
Modified host driver to make use of the information passed
through DT to reset the port second time.
Venu Byravarasu (2):
arm: tegra: Add new DT property to USB node.
usb: host: tegra: Resetting PORT0 based on information received via
DT.
.../bindings/usb/nvidia,tegra20-ehci.txt | 2 ++
arch/arm/boot/dts/tegra20.dtsi | 1 +
drivers/usb/host/ehci-tegra.c | 6 +++++-
3 files changed, 8 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH RESEND 1/2] arm: tegra: Add new DT property to USB node.
2013-01-03 7:29 [PATCH RESEND 0/2] usb: tegra: modifying port reset based on instance number Venu Byravarasu
@ 2013-01-03 7:29 ` Venu Byravarasu
2013-01-03 7:29 ` [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu
1 sibling, 0 replies; 6+ messages in thread
From: Venu Byravarasu @ 2013-01-03 7:29 UTC (permalink / raw)
To: gregkh, stern; +Cc: linux-usb, linux-kernel, swarren, Venu Byravarasu
As Tegra USB host driver is using instance number for resetting
PORT0 twice, adding a new DT property for handling this.
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
---
.../bindings/usb/nvidia,tegra20-ehci.txt | 2 ++
arch/arm/boot/dts/tegra20.dtsi | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
index e9b005d..6ea765a 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
@@ -27,3 +27,5 @@ Optional properties:
registers are accessed through the APB_MISC base address instead of
the USB controller. Since this is a legacy issue it probably does not
warrant a compatible string of its own.
+ - nvidia,needs-double-reset : boolean is to be set for some of the Tegra2
+ USB ports, which need reset twice due to hardware issues.
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index fe35c72..7f74339 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -384,6 +384,7 @@
phy_type = "utmi";
nvidia,has-legacy-mode;
status = "disabled";
+ nvidia,needs-double-reset;
};
usb@c5004000 {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT.
2013-01-03 7:29 [PATCH RESEND 0/2] usb: tegra: modifying port reset based on instance number Venu Byravarasu
2013-01-03 7:29 ` [PATCH RESEND 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
@ 2013-01-03 7:29 ` Venu Byravarasu
2013-01-03 20:29 ` Stephen Warren
1 sibling, 1 reply; 6+ messages in thread
From: Venu Byravarasu @ 2013-01-03 7:29 UTC (permalink / raw)
To: gregkh, stern; +Cc: linux-usb, linux-kernel, swarren, Venu Byravarasu
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: Alan Stern <stern@rowland.harvard.edu>
---
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 acf1755..55a9cde 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -43,6 +43,7 @@ struct tegra_ehci_hcd {
struct usb_phy *transceiver;
int host_resumed;
int port_resuming;
+ bool needs_double_reset;
enum tegra_usb_phy_port_speed port_speed;
};
@@ -184,7 +185,7 @@ static int tegra_ehci_hub_control(
}
/* For USB1 port we need to issue Port Reset twice internally */
- if (tegra->phy->instance == 0 &&
+ if (tegra->needs_double_reset &&
(typeReq == SetPortFeature && wValue == USB_PORT_FEAT_RESET)) {
spin_unlock_irqrestore(&ehci->lock, flags);
return tegra_ehci_internal_port_reset(ehci, status_reg);
@@ -666,6 +667,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
clk_prepare_enable(tegra->emc_clk);
clk_set_rate(tegra->emc_clk, 400000000);
+ tegra->needs_double_reset = of_property_read_bool(pdev->dev.of_node,
+ "nvidia,needs-double-reset");
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "Failed to get I/O memory\n");
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT.
2013-01-03 7:29 ` [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu
@ 2013-01-03 20:29 ` Stephen Warren
2013-01-12 0:14 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2013-01-03 20:29 UTC (permalink / raw)
To: gregkh; +Cc: Venu Byravarasu, stern, linux-usb, linux-kernel
On 01/03/2013 12:29 AM, Venu Byravarasu wrote:
> 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: Alan Stern <stern@rowland.harvard.edu>
Greg, recall that I'm hoping to take this series through the Tegra tree
in order to manage EHCI/PHY/clock dependencies. I'm hoping to get your
ack if required, or is Alan's sufficient for this? Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT.
2013-01-03 20:29 ` Stephen Warren
@ 2013-01-12 0:14 ` Greg KH
2013-01-12 0:43 ` Stephen Warren
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2013-01-12 0:14 UTC (permalink / raw)
To: Stephen Warren; +Cc: Venu Byravarasu, stern, linux-usb, linux-kernel
On Thu, Jan 03, 2013 at 01:29:32PM -0700, Stephen Warren wrote:
> On 01/03/2013 12:29 AM, Venu Byravarasu wrote:
> > 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: Alan Stern <stern@rowland.harvard.edu>
>
> Greg, recall that I'm hoping to take this series through the Tegra tree
> in order to manage EHCI/PHY/clock dependencies. I'm hoping to get your
> ack if required, or is Alan's sufficient for this? Thanks.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT.
2013-01-12 0:14 ` Greg KH
@ 2013-01-12 0:43 ` Stephen Warren
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2013-01-12 0:43 UTC (permalink / raw)
To: Greg KH; +Cc: Venu Byravarasu, stern, linux-usb, linux-kernel
On 01/11/2013 05:14 PM, Greg KH wrote:
> On Thu, Jan 03, 2013 at 01:29:32PM -0700, Stephen Warren wrote:
>> On 01/03/2013 12:29 AM, Venu Byravarasu wrote:
>>> 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: Alan Stern <stern@rowland.harvard.edu>
>>
>> Greg, recall that I'm hoping to take this series through the Tegra tree
>> in order to manage EHCI/PHY/clock dependencies. I'm hoping to get your
>> ack if required, or is Alan's sufficient for this? Thanks.
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thanks, applied to Tegra's for-3.9/usb branch.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-12 0:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 7:29 [PATCH RESEND 0/2] usb: tegra: modifying port reset based on instance number Venu Byravarasu
2013-01-03 7:29 ` [PATCH RESEND 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
2013-01-03 7:29 ` [PATCH RESEND 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu
2013-01-03 20:29 ` Stephen Warren
2013-01-12 0:14 ` Greg KH
2013-01-12 0:43 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox