Ajay/Felipe
Off usb list not to interfere with your merge req to Gregkh
>-----Original Message-----
>From: [email protected] [mailto:[email protected]]
>On Behalf Of Felipe
>Balbi
>Sent: Thursday, January 21, 2010 7:34 AM
>To: Greg KH
>Cc: Linux USB Mailing List; Linux OMAP Mailing List; Gupta, Ajay Kumar;
>Gadiyar, Anand; Felipe Balbi
>Subject: [PATCH 1/7] usb: musb: Add context save and restore support
>Importance: High
>
>From: Ajay Kumar Gupta <[email protected]>
>
>Adding support for MUSB register save and restore during system
>suspend and resume.
>
>Changes:
> - Added musb_save/restore_context() functions
> - Added platform specific musb_platform_save/restore_context()
> to handle platform specific jobs.
> - Maintaining BlackFin compatibility by adding read/write
> functions for registers which are not available in BlackFin
>
>Tested system suspend and resume on OMAP3EVM board.
>
>Signed-off-by: Anand Gadiyar <[email protected]>
>Signed-off-by: Ajay Kumar Gupta <[email protected]>
>Signed-off-by: Felipe Balbi <[email protected]>
>---
> drivers/usb/musb/musb_core.c | 146 ++++++++++++++++++++++++++++++++++++++++++
> drivers/usb/musb/musb_core.h | 39 +++++++++++
> drivers/usb/musb/musb_regs.h | 90 ++++++++++++++++++++++++++
> drivers/usb/musb/omap2430.c | 16 +++++
> 4 files changed, 291 insertions(+), 0 deletions(-)
>
<snip>
>diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>index 83beeac..15a3f27 100644
>--- a/drivers/usb/musb/omap2430.c
>+++ b/drivers/usb/musb/omap2430.c
>@@ -255,6 +255,22 @@ int __init musb_platform_init(struct musb *musb)
> return 0;
> }
>
>+#ifdef CONFIG_PM
>+void musb_platform_save_context(struct musb_context_registers
>+ *musb_context)
>+{
>+ musb_context->otg_sysconfig = omap_readl(OTG_SYSCONFIG);
>+ musb_context->otg_forcestandby = omap_readl(OTG_FORCESTDBY);
Any reason not to store: OTG_INTERFSEL
Depending on reset value is not a good idea.
>+}
>+
>+void musb_platform_restore_context(struct musb_context_registers
>+ *musb_context)
>+{
>+ omap_writel(musb_context->otg_sysconfig, OTG_SYSCONFIG);
>+ omap_writel(musb_context->otg_forcestandby, OTG_FORCESTDBY);
>+}
>+#endif
>+
> int musb_platform_suspend(struct musb *musb)
> {
> u32 l;
>--
>1.6.6.rc0
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-usb" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html