]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/s3c44b0/start.S
rename CFG_ macros to CONFIG_SYS
[karo-tx-uboot.git] / cpu / s3c44b0 / start.S
index ce31ec935d263288a51ccb73de76f30234f92a82..f5a3d3ac386ceabe492e91c8ba6bab56a6938cec 100644 (file)
@@ -71,16 +71,15 @@ _armboot_start:
        .word _start
 
 /*
- * Note: _armboot_end_data and _armboot_end are defined
- * by the (board-dependent) linker script.
- * _armboot_end_data is the first usable FLASH address after armboot
+ * These are defined in the board-specific linker script.
  */
-.globl _armboot_end_data
-_armboot_end_data:
-       .word armboot_end_data
-.globl _armboot_end
-_armboot_end:
-       .word armboot_end
+.globl _bss_start
+_bss_start:
+       .word __bss_start
+
+.globl _bss_end
+_bss_end:
+       .word _end
 
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
@@ -113,16 +112,17 @@ reset:
         * 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
         * because memory timing is board-dependend, you will
-        * find a memsetup.S in your board directory.
+        * find a lowlevel_init.S in your board directory.
         */
-       bl      memsetup
+       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 */
@@ -130,7 +130,7 @@ relocate:                           /* relocate U-Boot to RAM           */
        beq     stack_setup
 
        ldr     r2, _armboot_start
-       ldr     r3, _armboot_end
+       ldr     r3, _bss_start
        sub     r2, r3, r2              /* r2 <- size of armboot            */
        add     r2, r0, r2              /* r2 <- source end address         */
 
@@ -152,12 +152,13 @@ vector_copy_loop:
        stmia   r1!, {r3-r10}
        cmp     r0, r2
        ble     vector_copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
 
        /* Set up the stack                                                 */
 stack_setup:
        ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
-       sub     r0, r0, #CFG_MALLOC_LEN /* malloc area                      */
-       sub     r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo                        */
+       sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
+       sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
 #ifdef CONFIG_USE_IRQ
        sub     r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
 #endif
@@ -187,7 +188,7 @@ _start_armboot:     .word start_armboot
 #define WTCON (0x01c00000+0x130000)
 cpu_init_crit:
        /* disable watch dog */
-       ldr     r0, =WTCON
+       ldr     r0, =WTCON
        ldr     r1, =0x0
        str     r1, [r0]
 
@@ -210,7 +211,7 @@ cpu_init_crit:
        ldr     r1, =PLLCON
 
 #if CONFIG_S3C44B0_CLOCK_SPEED==66
-       ldr     r0, =0x34031    /* 66MHz (Quartz=11MHz) */
+       ldr     r0, =0x34031    /* 66MHz (Quartz=11MHz) */
 #elif CONFIG_S3C44B0_CLOCK_SPEED==75
        ldr     r0, =0x610c1 /*B2: Xtal=20mhz Fclk=75MHz  */
 #else