
Hi Sascha, Based on http://sourceforge.net/mailarchive/forum.php?thread_name=20080508151609.GB94... This is the second separate patch which introducing Machine dependent init lowlevel config.
Regards, Nishanth Menon
This introduces CONFIG_MACH_HAS_INIT_LOWLEVEL which is the opposite of the current CONFIG_SKIP_LOWLEVEL_INIT. CONFIG_SKIP_LOWLEVEL_INIT which was used by ARM platform configurations previously, is made platform independent configuration.
CONFIG_MACH_HAS_INIT_LOWLEVEL can be enabled to do board level initialization and disabled to allow U-Boot to function as the second level boot loader in certain scenarios by skipping SDRAM initialization.
Signed-off-by: Nishanth Menon x0nishan@ti.com
Index: u-boot-v2.git/arch/arm/cpu/start-arm.S =================================================================== --- u-boot-v2.git.orig/arch/arm/cpu/start-arm.S 2008-05-08 11:22:08.000000000 -0500 +++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-08 11:23:16.000000000 -0500 @@ -156,7 +156,7 @@ * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ -#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_HAS_INIT_LOWLEVEL bl board_init_lowlevel #endif
Index: u-boot-v2.git/arch/m68k/cpu/start-mcfv4e.S =================================================================== --- u-boot-v2.git.orig/arch/m68k/cpu/start-mcfv4e.S 2008-05-08 11:23:17.000000000 -0500 +++ u-boot-v2.git/arch/m68k/cpu/start-mcfv4e.S 2008-05-08 11:23:38.000000000 -0500 @@ -448,7 +448,7 @@ * * Do not jump/call other u-boot code here! */ -#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_HAS_INIT_LOWLEVEL bsr.l board_init_lowlevel nop #endif @@ -512,7 +512,7 @@ nop #endif
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_HAS_INIT_LOWLEVEL /* * Call other half of initcode in relocated code * Index: u-boot-v2.git/common/Kconfig =================================================================== --- u-boot-v2.git.orig/common/Kconfig 2008-05-08 11:24:02.000000000 -0500 +++ u-boot-v2.git/common/Kconfig 2008-05-08 11:27:07.000000000 -0500 @@ -72,6 +72,14 @@ Architectures that have additional initialization can enable this functionality.
+config MACH_HAS_INIT_LOWLEVEL + bool + default y + prompt "Board has low level init" + help + This entry skips the SDRAM initialising on many platforms. + It enables using U-boot as a second stage bootloader. + config PROMPT string prompt "U-Boot command prompt" @@ -223,14 +231,6 @@ help Enable build of u-boot with -g.
-config SKIP_LOWLEVEL_INIT - bool - depends on ARM - prompt "Skip lowlevel init" - help - This entry skips the SDRAM initialising on many ARM based boards. - It enables using U-boot as a second stage bootloader. - config ENABLE_FLASH_NOISE bool prompt "verbose flash handling" Index: u-boot-v2.git/arch/arm/configs/netx_nxdb500_defconfig =================================================================== --- u-boot-v2.git.orig/arch/arm/configs/netx_nxdb500_defconfig 2008-05-08 11:21:34.000000000 -0500 +++ u-boot-v2.git/arch/arm/configs/netx_nxdb500_defconfig 2008-05-08 11:28:42.000000000 -0500 @@ -29,6 +29,7 @@ # General Settings # CONFIG_BROKEN=y +# CONFIG_MACH_HAS_INIT_LOWLEVEL is not set CONFIG_PROMPT="uboot:" CONFIG_BAUDRATE=115200 CONFIG_CMDLINE_EDITING=y @@ -48,7 +49,6 @@ # # Debugging # -CONFIG_SKIP_LOWLEVEL_INIT=y
# # Commands Index: u-boot-v2.git/arch/arm/configs/pcm037_defconfig =================================================================== --- u-boot-v2.git.orig/arch/arm/configs/pcm037_defconfig 2008-05-08 11:22:01.000000000 -0500 +++ u-boot-v2.git/arch/arm/configs/pcm037_defconfig 2008-05-08 11:28:51.000000000 -0500 @@ -33,6 +33,7 @@ CONFIG_TEXT_BASE=0x87f00000 # CONFIG_BROKEN is not set # CONFIG_EXPERIMENTAL is not set +# CONFIG_MACH_HAS_INIT_LOWLEVEL is not set CONFIG_PROMPT="uboot:" CONFIG_BAUDRATE=115200 CONFIG_CMDLINE_EDITING=y @@ -54,7 +55,6 @@ # # Debugging # -CONFIG_SKIP_LOWLEVEL_INIT=y # CONFIG_ENABLE_FLASH_NOISE is not set # CONFIG_ENABLE_PARTITION_NOISE is not set # CONFIG_ENABLE_DEVICE_NOISE is not set Index: u-boot-v2.git/arch/arm/configs/pcm038_defconfig =================================================================== --- u-boot-v2.git.orig/arch/arm/configs/pcm038_defconfig 2008-05-08 11:22:04.000000000 -0500 +++ u-boot-v2.git/arch/arm/configs/pcm038_defconfig 2008-05-08 11:29:37.000000000 -0500 @@ -36,6 +36,7 @@ CONFIG_TEXT_BASE=0xa7f00000 # CONFIG_BROKEN is not set # CONFIG_EXPERIMENTAL is not set +CONFIG_MACH_HAS_INIT_LOWLEVEL=y CONFIG_PROMPT="uboot:" CONFIG_BAUDRATE=115200 CONFIG_CMDLINE_EDITING=y @@ -58,7 +59,6 @@ # Debugging # # CONFIG_DEBUG_INFO is not set -# CONFIG_SKIP_LOWLEVEL_INIT is not set # CONFIG_ENABLE_FLASH_NOISE is not set # CONFIG_ENABLE_PARTITION_NOISE is not set # CONFIG_ENABLE_DEVICE_NOISE is not set Index: u-boot-v2.git/arch/arm/configs/scb9328_defconfig =================================================================== --- u-boot-v2.git.orig/arch/arm/configs/scb9328_defconfig 2008-05-08 11:22:06.000000000 -0500 +++ u-boot-v2.git/arch/arm/configs/scb9328_defconfig 2008-05-08 11:29:49.000000000 -0500 @@ -34,6 +34,7 @@ CONFIG_TEXT_BASE=0x08f80000 # CONFIG_BROKEN is not set # CONFIG_EXPERIMENTAL is not set +# CONFIG_MACH_HAS_INIT_LOWLEVEL is not set CONFIG_PROMPT="uboot:" CONFIG_BAUDRATE=115200 CONFIG_CMDLINE_EDITING=y @@ -55,7 +56,6 @@ # # Debugging # -CONFIG_SKIP_LOWLEVEL_INIT=y # CONFIG_ENABLE_FLASH_NOISE is not set # CONFIG_ENABLE_PARTITION_NOISE is not set # CONFIG_ENABLE_DEVICE_NOISE is not set