RE: [PATCH 1/7] usb: musb: Add context save and restore support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ajay/Felipe
Off usb list not to interfere with your merge req to Gregkh

>-----Original Message-----
>From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] 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 <ajay.gupta@xxxxxx>
>
>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 <gadiyar@xxxxxx>
>Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
>Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
>---
> 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 majordomo@xxxxxxxxxxxxxxx
>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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux