Skip to contentSkip to conversation

sh: Add Ecovec24 specific memory pre/post sleep code

PATCH Applied Magnus Damm 1 participant 1 message Oct 30, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 3/9 sh: Add Ecovec24 specific memory pre/post sleep code

From: Magnus Damm <[email protected]>

Add self-refresh handling code for the Ecovec24 board.

---

 arch/sh/boards/mach-ecovec24/Makefile |    1 
 arch/sh/boards/mach-ecovec24/sdram.S  |   52 +++++++++++++++++++++++++++++++++
 arch/sh/boards/mach-ecovec24/setup.c  |   14 ++++++++
 3 files changed, 66 insertions(+), 1 deletion(-)
arch/sh/boards/mach-ecovec24/Makefile +1 -1
@@ -6,4 +6,4 @@
 # for more details.
 #
 
-obj-y	 := setup.o
\ No newline at end of file
+obj-y	 := setup.o sdram.o
\ No newline at end of file
arch/sh/boards/mach-ecovec24/sdram.S new file +52 -0

52 lines not on this page · raw message

arch/sh/boards/mach-ecovec24/setup.c +14 -0
@@ -26,6 +26,7 @@
 #include <asm/sh_eth.h>
 #include <asm/sh_keysc.h>
 #include <asm/clock.h>
+#include <asm/suspend.h>
 #include <cpu/sh7724.h>
 
 /*
@@ -526,8 +527,21 @@ static void __init sh_eth_init(struct sh
 
 #define PORT_HIZA 0xA4050158
 #define IODRIVEA  0xA405018A
+
+extern char ecovec24_sdram_enter_start;
+extern char ecovec24_sdram_enter_end;
+extern char ecovec24_sdram_leave_start;
+extern char ecovec24_sdram_leave_end;
+
 static int __init arch_setup(void)
 {
+	/* register board specific self-refresh code */
+	sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
+					&ecovec24_sdram_enter_start,
+					&ecovec24_sdram_enter_end,
+					&ecovec24_sdram_leave_start,
+					&ecovec24_sdram_leave_end);
+
 	/* enable STATUS0, STATUS2 and PDSTATUS */
 	gpio_request(GPIO_FN_STATUS0, NULL);
 	gpio_request(GPIO_FN_STATUS2, NULL);