2011-04-14 07:31:57

by Juergen Kilb

[permalink] [raw]
Subject: [PATCH] Fixed gpio polarity of gpio USB-phy reset.

With commit 19403165 a main part of ehci-omap.c moved to
drivers/mfd/omap-usb-host.c created by commit 17cdd29d.
Due to this reorganisation the polarity used to reset the
external USB phy changed and USB host doesn't recognize
any devices.

Signed-off-by: Juergen Kilb <[email protected]>
---
drivers/mfd/omap-usb-host.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 53450f4..491cac5 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -719,14 +719,14 @@ static int usbhs_enable(struct device *dev)
gpio_request(pdata->ehci_data->reset_gpio_port[0],
"USB1 PHY reset");
gpio_direction_output
- (pdata->ehci_data->reset_gpio_port[0], 1);
+ (pdata->ehci_data->reset_gpio_port[0], 0);
}

if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) {
gpio_request(pdata->ehci_data->reset_gpio_port[1],
"USB2 PHY reset");
gpio_direction_output
- (pdata->ehci_data->reset_gpio_port[1], 1);
+ (pdata->ehci_data->reset_gpio_port[1], 0);
}

/* Hold the PHY in RESET for enough time till DIR is high */
@@ -906,11 +906,11 @@ static int usbhs_enable(struct device *dev)

if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
gpio_set_value
- (pdata->ehci_data->reset_gpio_port[0], 0);
+ (pdata->ehci_data->reset_gpio_port[0], 1);

if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
gpio_set_value
- (pdata->ehci_data->reset_gpio_port[1], 0);
+ (pdata->ehci_data->reset_gpio_port[1], 1);
}

end_count:
--
1.7.0.4


2011-04-14 08:56:30

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] Fixed gpio polarity of gpio USB-phy reset.

Hi Juergen,

On Thu, Apr 14, 2011 at 09:31:43AM +0200, Juergen Kilb wrote:
> With commit 19403165 a main part of ehci-omap.c moved to
> drivers/mfd/omap-usb-host.c created by commit 17cdd29d.
> Due to this reorganisation the polarity used to reset the
> external USB phy changed and USB host doesn't recognize
> any devices.
If that fix is correct, it looks like it should make its way to 2.6.39.
Felipe, are you ok with this fix ?

Cheers,
Samuel.

> Signed-off-by: Juergen Kilb <[email protected]>
> ---
> drivers/mfd/omap-usb-host.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 53450f4..491cac5 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -719,14 +719,14 @@ static int usbhs_enable(struct device *dev)
> gpio_request(pdata->ehci_data->reset_gpio_port[0],
> "USB1 PHY reset");
> gpio_direction_output
> - (pdata->ehci_data->reset_gpio_port[0], 1);
> + (pdata->ehci_data->reset_gpio_port[0], 0);
> }
>
> if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) {
> gpio_request(pdata->ehci_data->reset_gpio_port[1],
> "USB2 PHY reset");
> gpio_direction_output
> - (pdata->ehci_data->reset_gpio_port[1], 1);
> + (pdata->ehci_data->reset_gpio_port[1], 0);
> }
>
> /* Hold the PHY in RESET for enough time till DIR is high */
> @@ -906,11 +906,11 @@ static int usbhs_enable(struct device *dev)
>
> if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
> gpio_set_value
> - (pdata->ehci_data->reset_gpio_port[0], 0);
> + (pdata->ehci_data->reset_gpio_port[0], 1);
>
> if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
> gpio_set_value
> - (pdata->ehci_data->reset_gpio_port[1], 0);
> + (pdata->ehci_data->reset_gpio_port[1], 1);
> }
>
> end_count:
> --
> 1.7.0.4
>

--
Intel Open Source Technology Centre
http://oss.intel.com/

2011-04-14 10:33:03

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH] Fixed gpio polarity of gpio USB-phy reset.

On Thu, Apr 14, 2011 at 09:31:43AM +0200, Juergen Kilb wrote:
> With commit 19403165 a main part of ehci-omap.c moved to
> drivers/mfd/omap-usb-host.c created by commit 17cdd29d.
> Due to this reorganisation the polarity used to reset the
> external USB phy changed and USB host doesn't recognize
> any devices.
>
> Signed-off-by: Juergen Kilb <[email protected]>

Judging by how ehci-omap.c was before moving the code:

Acked-by: Felipe Balbi <[email protected]>

--
balbi

2011-04-14 11:03:39

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH] Fixed gpio polarity of gpio USB-phy reset.

Hello.

On 14-04-2011 11:31, Juergen Kilb wrote:

> With commit 19403165 a main part of ehci-omap.c moved to
> drivers/mfd/omap-usb-host.c created by commit 17cdd29d.

Pelase also specify the summaries of those commits -- for the human readers.

> Due to this reorganisation the polarity used to reset the
> external USB phy changed and USB host doesn't recognize
> any devices.

> Signed-off-by: Juergen Kilb <[email protected]>

WBR, Sergei

2011-04-15 13:17:54

by Steve Sakoman

[permalink] [raw]
Subject: Re: [PATCH] Fixed gpio polarity of gpio USB-phy reset.

On Thu, Apr 14, 2011 at 3:32 AM, Felipe Balbi <[email protected]> wrote:
> On Thu, Apr 14, 2011 at 09:31:43AM +0200, Juergen Kilb wrote:
>> With commit 19403165 a main part of ehci-omap.c moved to
>> drivers/mfd/omap-usb-host.c created by commit 17cdd29d.
>> Due to this reorganisation the polarity used to reset the
>> external USB phy changed and USB host doesn't recognize
>> any devices.
>>
>> Signed-off-by: Juergen Kilb <[email protected]>
>
> Judging by how ehci-omap.c was before moving the code:
>
> Acked-by: Felipe Balbi <[email protected]>

This fixes the issue on Overo:

Tested-by: Steve Sakoman <[email protected]>

Steve

2011-04-18 08:56:00

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] Fixed gpio polarity of gpio USB-phy reset.

Hi Juergen,

On Thu, Apr 14, 2011 at 09:31:43AM +0200, Juergen Kilb wrote:
> With commit 19403165 a main part of ehci-omap.c moved to
> drivers/mfd/omap-usb-host.c created by commit 17cdd29d.
> Due to this reorganisation the polarity used to reset the
> external USB phy changed and USB host doesn't recognize
> any devices.
Patch applied to my for-linus branch, thanks a lot.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/