summaryrefslogtreecommitdiffstats
path: root/meta/packages/uboot/u-boot-mkimage-openmoko-native/wakeup-reason-nand-only.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/wakeup-reason-nand-only.patch')
-rw-r--r--meta/packages/uboot/u-boot-mkimage-openmoko-native/wakeup-reason-nand-only.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/wakeup-reason-nand-only.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/wakeup-reason-nand-only.patch
deleted file mode 100644
index 132a9f8da5..0000000000
--- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/wakeup-reason-nand-only.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1This patch should get rid of spurious poweroff after booting from RAM.
2Experimental.
3
4cpu/arm920t/start.S: record in global variable "booted_from_nand" whether we
5 booted from NAND or not
6board/neo1973/neo1973.c (board_late_init): if booted from RAM, assume that
7 wakeup cause was "reset", and skip poweroff check
8
9- Werner Almesberger <werner@openmoko.org>
10
11Index: u-boot/board/neo1973/gta01/gta01.c
12===================================================================
13--- u-boot.orig/board/neo1973/gta01/gta01.c
14+++ u-boot/board/neo1973/gta01/gta01.c
15@@ -226,12 +226,16 @@
16
17 int board_late_init(void)
18 {
19+ extern unsigned char booted_from_nand;
20 unsigned char tmp;
21 char buf[32];
22
23 /* Initialize the Power Management Unit with a safe register set */
24 pcf50606_init();
25
26+ if (!booted_from_nand)
27+ goto woken_by_reset;
28+
29 /* obtain wake-up reason, save INT1 in environment */
30 tmp = pcf50606_reg_read(PCF50606_REG_INT1);
31 sprintf(buf, "0x%02x", tmp);
32@@ -274,6 +278,7 @@
33 neo1973_poweroff();
34 }
35
36+woken_by_reset:
37 /* if there's no other reason, must be regular reset */
38 neo1973_wakeup_cause = NEO1973_WAKEUP_RESET;
39
40Index: u-boot/cpu/arm920t/start.S
41===================================================================
42--- u-boot.orig/cpu/arm920t/start.S
43+++ u-boot/cpu/arm920t/start.S
44@@ -77,6 +77,14 @@
45 *************************************************************************
46 */
47
48+#ifdef CONFIG_S3C2410_NAND_BOOT
49+.globl booted_from_nand
50+booted_from_nand:
51+ .word 0
52+_booted_from_nand:
53+ .word booted_from_nand
54+#endif /* CONFIG_S3C2410_NAND_BOOT */
55+
56 _TEXT_BASE:
57 .word TEXT_BASE
58
59@@ -281,6 +289,9 @@
60 #endif
61 1: b 1b
62 done_nand_read:
63+ ldr r0, _booted_from_nand
64+ mov r1, #1
65+ strb r1, [r0]
66 #endif /* CONFIG_S3C2410_NAND_BOOT */
67 done_relocate:
68 #endif /* CONFIG_SKIP_RELOCATE_UBOOT */