usb: musb: Add context save and restore support

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@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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 @@
 	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);
+}
+
+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;