summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2010-01-21 15:33:53 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:38 -0800
commit8573e6a673fc99bd89a6c08ef9841d8b52f9d3c5 (patch)
tree9391da4310d3b6c188aedc33e19cca412409c3ca /drivers/usb/musb/omap2430.c
parent4f712e010b2da1cc01c178922f2eb5aaeae461b6 (diff)
downloadlinux-3.10-8573e6a673fc99bd89a6c08ef9841d8b52f9d3c5.tar.gz
linux-3.10-8573e6a673fc99bd89a6c08ef9841d8b52f9d3c5.tar.bz2
linux-3.10-8573e6a673fc99bd89a6c08ef9841d8b52f9d3c5.zip
USB: musb: get rid of omap_readl/writel
we have those addresses already ioremaped, so let's use our __raw_readl/writel wrappers. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 15a3f27b574..3fe16867b5a 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -220,7 +220,7 @@ int __init musb_platform_init(struct musb *musb)
musb_platform_resume(musb);
- l = omap_readl(OTG_SYSCONFIG);
+ l = musb_readl(musb->mregs, OTG_SYSCONFIG);
l &= ~ENABLEWAKEUP; /* disable wakeup */
l &= ~NOSTDBY; /* remove possible nostdby */
l |= SMARTSTDBY; /* enable smart standby */
@@ -233,17 +233,19 @@ int __init musb_platform_init(struct musb *musb)
*/
if (!cpu_is_omap3430())
l |= AUTOIDLE; /* enable auto idle */
- omap_writel(l, OTG_SYSCONFIG);
+ musb_writel(musb->mregs, OTG_SYSCONFIG, l);
- l = omap_readl(OTG_INTERFSEL);
+ l = musb_readl(musb->mregs, OTG_INTERFSEL);
l |= ULPI_12PIN;
- omap_writel(l, OTG_INTERFSEL);
+ musb_writel(musb->mregs, OTG_INTERFSEL, l);
pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, "
"sysstatus 0x%x, intrfsel 0x%x, simenable 0x%x\n",
- omap_readl(OTG_REVISION), omap_readl(OTG_SYSCONFIG),
- omap_readl(OTG_SYSSTATUS), omap_readl(OTG_INTERFSEL),
- omap_readl(OTG_SIMENABLE));
+ musb_readl(musb->mregs, OTG_REVISION),
+ musb_readl(musb->mregs, OTG_SYSCONFIG),
+ musb_readl(musb->mregs, OTG_SYSSTATUS),
+ musb_readl(musb->mregs, OTG_INTERFSEL),
+ musb_readl(musb->mregs, OTG_SIMENABLE));
omap_vbus_power(musb, musb->board_mode == MUSB_HOST, 1);
@@ -256,18 +258,18 @@ int __init musb_platform_init(struct musb *musb)
}
#ifdef CONFIG_PM
-void musb_platform_save_context(struct musb_context_registers
- *musb_context)
+void musb_platform_save_context(struct musb *musb,
+ struct musb_context_registers *musb_context)
{
- musb_context->otg_sysconfig = omap_readl(OTG_SYSCONFIG);
- musb_context->otg_forcestandby = omap_readl(OTG_FORCESTDBY);
+ musb_context->otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG);
+ musb_context->otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY);
}
-void musb_platform_restore_context(struct musb_context_registers
- *musb_context)
+void musb_platform_restore_context(struct musb *musb,
+ struct musb_context_registers *musb_context)
{
- omap_writel(musb_context->otg_sysconfig, OTG_SYSCONFIG);
- omap_writel(musb_context->otg_forcestandby, OTG_FORCESTDBY);
+ musb_writel(musb->mregs, OTG_SYSCONFIG, musb_context->otg_sysconfig);
+ musb_writel(musb->mregs, OTG_FORCESTDBY, musb_context->otg_forcestandby);
}
#endif
@@ -279,13 +281,13 @@ int musb_platform_suspend(struct musb *musb)
return 0;
/* in any role */
- l = omap_readl(OTG_FORCESTDBY);
+ l = musb_readl(musb->mregs, OTG_FORCESTDBY);
l |= ENABLEFORCE; /* enable MSTANDBY */
- omap_writel(l, OTG_FORCESTDBY);
+ musb_writel(musb->mregs, OTG_FORCESTDBY, l);
- l = omap_readl(OTG_SYSCONFIG);
+ l = musb_readl(musb->mregs, OTG_SYSCONFIG);
l |= ENABLEWAKEUP; /* enable wakeup */
- omap_writel(l, OTG_SYSCONFIG);
+ musb_writel(musb->mregs, OTG_SYSCONFIG, l);
otg_set_suspend(musb->xceiv, 1);
@@ -311,13 +313,13 @@ static int musb_platform_resume(struct musb *musb)
else
clk_enable(musb->clock);
- l = omap_readl(OTG_SYSCONFIG);
+ l = musb_readl(musb->mregs, OTG_SYSCONFIG);
l &= ~ENABLEWAKEUP; /* disable wakeup */
- omap_writel(l, OTG_SYSCONFIG);
+ musb_writel(musb->mregs, OTG_SYSCONFIG, l);
- l = omap_readl(OTG_FORCESTDBY);
+ l = musb_readl(musb->mregs, OTG_FORCESTDBY);
l &= ~ENABLEFORCE; /* disable MSTANDBY */
- omap_writel(l, OTG_FORCESTDBY);
+ musb_writel(musb->mregs, OTG_FORCESTDBY, l);
return 0;
}