diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2010-01-21 08:33:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:54:38 -0500 |
commit | 8573e6a673fc99bd89a6c08ef9841d8b52f9d3c5 (patch) | |
tree | 9391da4310d3b6c188aedc33e19cca412409c3ca /drivers/usb/musb/omap2430.c | |
parent | 4f712e010b2da1cc01c178922f2eb5aaeae461b6 (diff) |
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.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 15a3f27b5747..3fe16867b5a8 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) | |||
220 | 220 | ||
221 | musb_platform_resume(musb); | 221 | musb_platform_resume(musb); |
222 | 222 | ||
223 | l = omap_readl(OTG_SYSCONFIG); | 223 | l = musb_readl(musb->mregs, OTG_SYSCONFIG); |
224 | l &= ~ENABLEWAKEUP; /* disable wakeup */ | 224 | l &= ~ENABLEWAKEUP; /* disable wakeup */ |
225 | l &= ~NOSTDBY; /* remove possible nostdby */ | 225 | l &= ~NOSTDBY; /* remove possible nostdby */ |
226 | l |= SMARTSTDBY; /* enable smart standby */ | 226 | l |= SMARTSTDBY; /* enable smart standby */ |
@@ -233,17 +233,19 @@ int __init musb_platform_init(struct musb *musb) | |||
233 | */ | 233 | */ |
234 | if (!cpu_is_omap3430()) | 234 | if (!cpu_is_omap3430()) |
235 | l |= AUTOIDLE; /* enable auto idle */ | 235 | l |= AUTOIDLE; /* enable auto idle */ |
236 | omap_writel(l, OTG_SYSCONFIG); | 236 | musb_writel(musb->mregs, OTG_SYSCONFIG, l); |
237 | 237 | ||
238 | l = omap_readl(OTG_INTERFSEL); | 238 | l = musb_readl(musb->mregs, OTG_INTERFSEL); |
239 | l |= ULPI_12PIN; | 239 | l |= ULPI_12PIN; |
240 | omap_writel(l, OTG_INTERFSEL); | 240 | musb_writel(musb->mregs, OTG_INTERFSEL, l); |
241 | 241 | ||
242 | pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, " | 242 | pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, " |
243 | "sysstatus 0x%x, intrfsel 0x%x, simenable 0x%x\n", | 243 | "sysstatus 0x%x, intrfsel 0x%x, simenable 0x%x\n", |
244 | omap_readl(OTG_REVISION), omap_readl(OTG_SYSCONFIG), | 244 | musb_readl(musb->mregs, OTG_REVISION), |
245 | omap_readl(OTG_SYSSTATUS), omap_readl(OTG_INTERFSEL), | 245 | musb_readl(musb->mregs, OTG_SYSCONFIG), |
246 | omap_readl(OTG_SIMENABLE)); | 246 | musb_readl(musb->mregs, OTG_SYSSTATUS), |
247 | musb_readl(musb->mregs, OTG_INTERFSEL), | ||
248 | musb_readl(musb->mregs, OTG_SIMENABLE)); | ||
247 | 249 | ||
248 | omap_vbus_power(musb, musb->board_mode == MUSB_HOST, 1); | 250 | omap_vbus_power(musb, musb->board_mode == MUSB_HOST, 1); |
249 | 251 | ||
@@ -256,18 +258,18 @@ int __init musb_platform_init(struct musb *musb) | |||
256 | } | 258 | } |
257 | 259 | ||
258 | #ifdef CONFIG_PM | 260 | #ifdef CONFIG_PM |
259 | void musb_platform_save_context(struct musb_context_registers | 261 | void musb_platform_save_context(struct musb *musb, |
260 | *musb_context) | 262 | struct musb_context_registers *musb_context) |
261 | { | 263 | { |
262 | musb_context->otg_sysconfig = omap_readl(OTG_SYSCONFIG); | 264 | musb_context->otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG); |
263 | musb_context->otg_forcestandby = omap_readl(OTG_FORCESTDBY); | 265 | musb_context->otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY); |
264 | } | 266 | } |
265 | 267 | ||
266 | void musb_platform_restore_context(struct musb_context_registers | 268 | void musb_platform_restore_context(struct musb *musb, |
267 | *musb_context) | 269 | struct musb_context_registers *musb_context) |
268 | { | 270 | { |
269 | omap_writel(musb_context->otg_sysconfig, OTG_SYSCONFIG); | 271 | musb_writel(musb->mregs, OTG_SYSCONFIG, musb_context->otg_sysconfig); |
270 | omap_writel(musb_context->otg_forcestandby, OTG_FORCESTDBY); | 272 | musb_writel(musb->mregs, OTG_FORCESTDBY, musb_context->otg_forcestandby); |
271 | } | 273 | } |
272 | #endif | 274 | #endif |
273 | 275 | ||
@@ -279,13 +281,13 @@ int musb_platform_suspend(struct musb *musb) | |||
279 | return 0; | 281 | return 0; |
280 | 282 | ||
281 | /* in any role */ | 283 | /* in any role */ |
282 | l = omap_readl(OTG_FORCESTDBY); | 284 | l = musb_readl(musb->mregs, OTG_FORCESTDBY); |
283 | l |= ENABLEFORCE; /* enable MSTANDBY */ | 285 | l |= ENABLEFORCE; /* enable MSTANDBY */ |
284 | omap_writel(l, OTG_FORCESTDBY); | 286 | musb_writel(musb->mregs, OTG_FORCESTDBY, l); |
285 | 287 | ||
286 | l = omap_readl(OTG_SYSCONFIG); | 288 | l = musb_readl(musb->mregs, OTG_SYSCONFIG); |
287 | l |= ENABLEWAKEUP; /* enable wakeup */ | 289 | l |= ENABLEWAKEUP; /* enable wakeup */ |
288 | omap_writel(l, OTG_SYSCONFIG); | 290 | musb_writel(musb->mregs, OTG_SYSCONFIG, l); |
289 | 291 | ||
290 | otg_set_suspend(musb->xceiv, 1); | 292 | otg_set_suspend(musb->xceiv, 1); |
291 | 293 | ||
@@ -311,13 +313,13 @@ static int musb_platform_resume(struct musb *musb) | |||
311 | else | 313 | else |
312 | clk_enable(musb->clock); | 314 | clk_enable(musb->clock); |
313 | 315 | ||
314 | l = omap_readl(OTG_SYSCONFIG); | 316 | l = musb_readl(musb->mregs, OTG_SYSCONFIG); |
315 | l &= ~ENABLEWAKEUP; /* disable wakeup */ | 317 | l &= ~ENABLEWAKEUP; /* disable wakeup */ |
316 | omap_writel(l, OTG_SYSCONFIG); | 318 | musb_writel(musb->mregs, OTG_SYSCONFIG, l); |
317 | 319 | ||
318 | l = omap_readl(OTG_FORCESTDBY); | 320 | l = musb_readl(musb->mregs, OTG_FORCESTDBY); |
319 | l &= ~ENABLEFORCE; /* disable MSTANDBY */ | 321 | l &= ~ENABLEFORCE; /* disable MSTANDBY */ |
320 | omap_writel(l, OTG_FORCESTDBY); | 322 | musb_writel(musb->mregs, OTG_FORCESTDBY, l); |
321 | 323 | ||
322 | return 0; | 324 | return 0; |
323 | } | 325 | } |