Skip to contentSkip to conversation

sh: Add migor specific memory pre/post sleep code

PATCH In review Magnus Damm 1 participant 1 message Oct 29, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 7/7 sh: Add migor specific memory pre/post sleep code

From: Magnus Damm <[email protected]>

Add self-refresh handling code for the Migo-R board.

---

 arch/sh/boards/mach-migor/Makefile |    2 -
 arch/sh/boards/mach-migor/sdram.S  |   69 ++++++++++++++++++++++++++++++++++++
 arch/sh/boards/mach-migor/setup.c  |   13 ++++++
 3 files changed, 82 insertions(+), 2 deletions(-)
arch/sh/boards/mach-migor/Makefile +1 -1
@@ -1,2 +1,2 @@
-obj-y	 := setup.o
+obj-y	 := setup.o sdram.o
 obj-$(CONFIG_SH_MIGOR_QVGA)	+=  lcd_qvga.o
arch/sh/boards/mach-migor/sdram.S new file +69 -0

69 lines not on this page · raw message

arch/sh/boards/mach-migor/setup.c +12 -1
@@ -26,6 +26,7 @@
 #include <asm/machvec.h>
 #include <asm/io.h>
 #include <asm/sh_keysc.h>
+#include <asm/suspend.h>
 #include <mach/migor.h>
 #include <cpu/sh7722.h>
 
@@ -478,9 +479,19 @@ static struct platform_device *migor_dev
 	&migor_camera[1],
 };
 
+extern char migor_sdram_enter_start;
+extern char migor_sdram_enter_end;
+extern char migor_sdram_leave_start;
+extern char migor_sdram_leave_end;
+
 static int __init migor_devices_setup(void)
 {
-
+	/* register board specific self-refresh code */
+	sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
+					&migor_sdram_enter_start,
+					&migor_sdram_enter_end,
+					&migor_sdram_leave_start,
+					&migor_sdram_leave_end);
 #ifdef CONFIG_PM
 	/* Let D11 LED show STATUS0 */
 	gpio_request(GPIO_FN_STATUS0, NULL);