diff options
author | Hema HK <hemahk@ti.com> | 2011-03-24 07:38:42 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-05-18 06:39:51 -0400 |
commit | 8cfc67f0740cede2a6aec94b8513285d00c46d5f (patch) | |
tree | 5bb67d5bed8845c9ae6e80170098de2f513dc168 /arch/arm/mach-omap2/omap_phy_internal.c | |
parent | a6d28523dbe6dc5bf3fc6a9078a69de6873c511e (diff) |
usb: otg: OMAP4430: Fixing the omap4430_phy_init function
omap4430_phy_init() function can be called with no device pointer,
to powerdown the PHY during board init when USB is disabled.
Fix the function accordingly.
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_phy_internal.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_phy_internal.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index eff6e248b562..f47813edd951 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
@@ -50,13 +50,16 @@ int omap4430_phy_init(struct device *dev) | |||
50 | { | 50 | { |
51 | ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K); | 51 | ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K); |
52 | if (!ctrl_base) { | 52 | if (!ctrl_base) { |
53 | dev_err(dev, "control module ioremap failed\n"); | 53 | pr_err("control module ioremap failed\n"); |
54 | return -ENOMEM; | 54 | return -ENOMEM; |
55 | } | 55 | } |
56 | /* Power down the phy */ | 56 | /* Power down the phy */ |
57 | __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); | 57 | __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); |
58 | phyclk = clk_get(dev, "ocp2scp_usb_phy_ick"); | ||
59 | 58 | ||
59 | if (!dev) | ||
60 | return 0; | ||
61 | |||
62 | phyclk = clk_get(dev, "ocp2scp_usb_phy_ick"); | ||
60 | if (IS_ERR(phyclk)) { | 63 | if (IS_ERR(phyclk)) { |
61 | dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n"); | 64 | dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n"); |
62 | iounmap(ctrl_base); | 65 | iounmap(ctrl_base); |