From: Eric Bénard <hidden> Date: 2011-01-13 09:06:15
commit 711669e5b80b6f2d88f61ed8a9681f83d8cbd201 fixed port 0 support
for i.MX51 but broke it for (at least) i.MX27 which doesn't have
a usb_phy1 clock but has a pdev->id 0.
Signed-off-by: Eric B?nard <redacted>
Cc: Arnaud Patard <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/host/ehci-mxc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
@@ -178,7 +178,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)}/* "dr" device has its own clock */-if(pdev->id==0){+if((cpu_is_mx51())&(pdev->id==0)){priv->phy1clk=clk_get(dev,"usb_phy1");if(IS_ERR(priv->phy1clk)){ret=PTR_ERR(priv->phy1clk);
On Thu, Jan 13, 2011 at 10:06:15AM +0100, Eric B?nard wrote:
commit 711669e5b80b6f2d88f61ed8a9681f83d8cbd201 fixed port 0 support
for i.MX51 but broke it for (at least) i.MX27 which doesn't have
a usb_phy1 clock but has a pdev->id 0.
Shame on me for not reviewing the patch properly :(
@@ -178,7 +178,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)}/* "dr" device has its own clock */-if(pdev->id==0){+if((cpu_is_mx51())&(pdev->id==0)){
should be && and please remove the unnecessary braces around
cpu_is_mx51(). Otherwise ok.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
From: Sergei Shtylyov <hidden> Date: 2011-01-13 12:17:43
Hello.
On 13-01-2011 12:06, Eric B?nard wrote:
commit 711669e5b80b6f2d88f61ed8a9681f83d8cbd201 fixed port 0 support
for i.MX51 but broke it for (at least) i.MX27 which doesn't have
a usb_phy1 clock but has a pdev->id 0.
@@ -178,7 +178,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)}/* "dr" device has its own clock */-if(pdev->id==0){+if((cpu_is_mx51())&(pdev->id==0)){
Why enclose the function call in parens at all? You also don't need parens
around 'pdev->id == 0'...
WBR, Sergei
@@ -178,7 +178,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)}/* "dr" device has its own clock */-if(pdev->id==0){+if((cpu_is_mx51())&(pdev->id==0)){
From: Eric Bénard <hidden> Date: 2011-01-13 13:53:17
commit 711669e5b80b6f2d88f61ed8a9681f83d8cbd201 fixed port 0 support
for i.MX51 but broke it for (at least) i.MX27 which doesn't have
a usb_phy1 clock but has a pdev->id 0.
Signed-off-by: Eric B?nard <redacted>
Cc: Arnaud Patard <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
v2: fix missing &, remove parenthesis and add i.MX51 in the comment
drivers/usb/host/ehci-mxc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
@@ -177,8 +177,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)clk_enable(priv->ahbclk);}-/* "dr" device has its own clock */-if(pdev->id==0){+/* "dr" device has its own clock on i.MX51 */+if(cpu_is_mx51()&&(pdev->id==0)){priv->phy1clk=clk_get(dev,"usb_phy1");if(IS_ERR(priv->phy1clk)){ret=PTR_ERR(priv->phy1clk);