diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2011-06-24 08:09:54 +0200 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2011-06-24 09:48:03 +0200 |
commit | 7b611cd5ba31d9f49e1b2ea70c48f22110125ea5 (patch) | |
tree | 7ef3e76598bc4a4aad44f4f8a8c5cd31705c0d89 | |
parent | a4317221de1a18411fa84bf9d72641e3f59eb064 (diff) | |
download | linux-2.6-rsc-tuxrail.tar.gz linux-2.6-rsc-tuxrail.tar.xz |
ARM: mxc usb: remove mx51 dependencyrsc-tuxrail
This driver is now used not only for mxc, but also for mxs. In that
case, the cpu_is_*() definitions from mxc are not available. In order to
make the driver more generic, we provide the clock from the platform
code and remove the platform dependency here.
[This patch will have to be squashed]
Not-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-rw-r--r-- | drivers/usb/host/ehci-mxc.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 13a8d9a975b..14c214f493e 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -177,16 +177,9 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) else priv->ahbclk = NULL; - /* "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); - goto err_clk_phy; - } + priv->phy1clk = clk_get(dev, "usb_phy1"); + if (!IS_ERR(priv->phy1clk)) clk_enable(priv->phy1clk); - } - /* call platform specific init function */ if (pdata->init) { @@ -258,11 +251,10 @@ err_add: if (pdata && pdata->exit) pdata->exit(pdev); err_init: - if (priv->phy1clk) { + if (!IS_ERR(priv->phy1clk)) { clk_disable(priv->phy1clk); clk_put(priv->phy1clk); } -err_clk_phy: if (priv->ahbclk) { clk_disable(priv->ahbclk); clk_put(priv->ahbclk); @@ -305,7 +297,7 @@ static int __exit ehci_mxc_drv_remove(struct platform_device *pdev) clk_disable(priv->ahbclk); clk_put(priv->ahbclk); } - if (priv->phy1clk) { + if (!IS_ERR(priv->phy1clk)) { clk_disable(priv->phy1clk); clk_put(priv->phy1clk); } |