Patch by Steven Scholz, 4 Apr 2005:
- remove all references to CONFIG_INIT_CRITICAL for ARM based boards
- introduce two new configuration options instead:
CONFIG_SKIP_LOWLEVEL_INIT and CONFIG_SKIP_RELOCATE_UBOOT
diff --git a/cpu/arm1136/start.S b/cpu/arm1136/start.S
index 27fcc89..c3bf6e3 100644
--- a/cpu/arm1136/start.S
+++ b/cpu/arm1136/start.S
@@ -129,8 +129,11 @@
bl cpy_clk_code /* put dpll adjust code behind vectors */
#endif
/* the mask ROM code should have PLL and others stable */
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
+#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -147,6 +150,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/arm720t/start.S b/cpu/arm720t/start.S
index 0e15965..3695465 100644
--- a/cpu/arm720t/start.S
+++ b/cpu/arm720t/start.S
@@ -119,10 +119,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -150,6 +151,8 @@
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
+
/* Set up the stack */
stack_setup:
ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
index a7cabf8..afe654b 100644
--- a/cpu/arm920t/start.S
+++ b/cpu/arm920t/start.S
@@ -156,10 +156,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -176,6 +177,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/arm925t/start.S b/cpu/arm925t/start.S
index f74064b..2389259 100644
--- a/cpu/arm925t/start.S
+++ b/cpu/arm925t/start.S
@@ -164,10 +164,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -184,6 +185,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/arm926ejs/start.S b/cpu/arm926ejs/start.S
index cd728c5..d62940b 100644
--- a/cpu/arm926ejs/start.S
+++ b/cpu/arm926ejs/start.S
@@ -139,10 +139,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -159,6 +160,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/at91rm9200/lowlevel.S b/cpu/at91rm9200/lowlevel.S
index 5521e5d..05887ad 100644
--- a/cpu/at91rm9200/lowlevel.S
+++ b/cpu/at91rm9200/lowlevel.S
@@ -30,7 +30,7 @@
#include <config.h>
#include <version.h>
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
/*
* some parameters for the board
*
@@ -197,4 +197,4 @@
.word SDRAM
.word SDRAM_VAL
/* SMRDATA1 is 176 bytes long */
-#endif /* CONFIG_INIT_CRITICAL */
+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
diff --git a/cpu/at91rm9200/start.S b/cpu/at91rm9200/start.S
index 89a0aa5..62315fe 100644
--- a/cpu/at91rm9200/start.S
+++ b/cpu/at91rm9200/start.S
@@ -115,7 +115,7 @@
orr r0,r0,#0xd3 /* was 13 */
msr cpsr,r0
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
/* scratch stack */
/**** ldr r1, =0x00204000 ****/
/* Insure word alignment */
@@ -141,7 +141,7 @@
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
orr r0, r0, #0xC0000000 @ set bits 31:30 (iA, nF)
mcr p15, 0, r0, c1, c0, 0 @ write r0 in cp15 control register (cp15 r1)
-#endif /* CONFIG_INIT_CRITICAL */
+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
/*
* relocate exeception table
*/
@@ -158,9 +158,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -177,7 +179,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
-#endif /* CONFIG_INIT_CRITICAL */
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/ixp/start.S b/cpu/ixp/start.S
index 3b3c868..2726f65 100644
--- a/cpu/ixp/start.S
+++ b/cpu/ixp/start.S
@@ -261,6 +261,7 @@
orr r0,r0,#0x13
msr cpsr,r0
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -277,6 +278,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/lh7a40x/start.S b/cpu/lh7a40x/start.S
index 5dca773..fb748cf 100644
--- a/cpu/lh7a40x/start.S
+++ b/cpu/lh7a40x/start.S
@@ -145,10 +145,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -166,6 +167,7 @@
cmp r0, r2 /* until source end addreee [r2] */
blt copy_loop /* a 'ble' here actually copies */
/* four bytes of bss */
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/pxa/start.S b/cpu/pxa/start.S
index da753a1..a8cc080 100644
--- a/cpu/pxa/start.S
+++ b/cpu/pxa/start.S
@@ -108,10 +108,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit /* we do sys-critical inits */
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -128,6 +129,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/s3c44b0/start.S b/cpu/s3c44b0/start.S
index fc7f592..7affe87 100644
--- a/cpu/s3c44b0/start.S
+++ b/cpu/s3c44b0/start.S
@@ -112,7 +112,7 @@
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
/*
* before relocating, we have to setup RAM timing
@@ -122,6 +122,7 @@
bl lowlevel_init
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -151,6 +152,7 @@
stmia r1!, {r3-r10}
cmp r0, r2
ble vector_copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup:
diff --git a/cpu/sa1100/start.S b/cpu/sa1100/start.S
index 08e41c7..431ee65 100644
--- a/cpu/sa1100/start.S
+++ b/cpu/sa1100/start.S
@@ -121,10 +121,11 @@
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_crit
#endif
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
@@ -141,6 +142,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
/* Set up the stack */
stack_setup: