[U-Boot-Users] [Patch] U-Boot-V2: Replace CONFIG_SKIP_LOWLEVEL_INIT with CONFIG_MACH_HAS_INIT_LOWLEVEL

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

On Thu, May 08, 2008 at 11:49:37AM -0500, Menon, Nishanth wrote:
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.
This has the same problems as stated in my last mail about ARCH_HAS_INIT_LOWLEVEL, although the situation is slightly different here. The user cannot decide whether the machine actually _has_ a lowlevel init function, it simply has or has not. The user only can decide whether he wants to use it after reading the help text (which describes the situation the wrong way around btw).
I have a feeling that this option is unnessecary anyway because when you look at the board_init_lowlevel functions you'll see that the board code detects at runtime whether or not they run from SDRAM and thus have to skip initialization. This way you can start the same U-Boot binary from SDRAM Flash or whatever which is a convenient thing to have.
I tend to remove these two options completely. Architectures and boards which do not need lowlevel init functions can just provide an empty function here. If we end up introducing many similar options on a board or architecture level we can still decide to turn them into common options.
So far arch_init_lowlevel is unused. I only introduced it because the original start.S had some S3C2400 #ifdefs here and I did not want to encourage anyone to put more architecture dependent stuff here.
BTW you can skip the defconfig bits in your patches. It's probably better when I regenerate them from time to time myself because otherwise we'll increase the risk of merge conflicts.
Regards, Sascha

Sascha,
-----Original Message----- From: Sascha Hauer [mailto:s.hauer@pengutronix.de] Sent: Friday, May 09, 2008 3:08 AM To: Menon, Nishanth Cc: u-boot-users@lists.sourceforge.net Subject: Re: [Patch] U-Boot-V2: Replace CONFIG_SKIP_LOWLEVEL_INIT withCONFIG_MACH_HAS_INIT_LOWLEVEL
This has the same problems as stated in my last mail about ARCH_HAS_INIT_LOWLEVEL, although the situation is slightly different here. The user cannot decide whether the machine actually _has_ a lowlevel init function, it simply has or has not.
You are missing the requirement of having to do a second level boot. I may choose not to enable board level initialization in a specific configuration for the same platform. The requirement I have in OMAP is this: boot up tiny u-boot (very minimal functionality, which needs to be less than 32K) which does SDRAM init (among other things), load the normal u-boot (around 200-400K) from UART, USB, NAND or ONENAND to SDRAM, and give control to it. In the "Normal functionality" U-Boot I'd not want to do a SDRAM and additional arch and board initialization - something that is redundant as it is already done by the tiny u-boot. Now I can also have a configuration for U-Boot booting from NOR. In that case, I'd want SDRAM initialization to be done. In such a case, the user should have the flexibility to be able to enable/disable board low level initialization while creating multiple configurations. All of these configurations are for the same board and same architecture.
The user only can decide whether he wants to use it after reading the help text (which describes the situation the wrong way around btw).
Yep. will fix it.
I have a feeling that this option is unnessecary anyway because when you look at the board_init_lowlevel functions you'll see that the board code detects at runtime whether or not they run from SDRAM and thus have to skip initialization. This way you can start the same U-Boot binary from SDRAM Flash or whatever which is a convenient thing to have.
It may not just be SDRAM initialization that I'd choose to do in a board level initialization. This could be a sizeable code in some cases. There is no need to duplicate functionality (in the case of two stage boot) if we can provide a method for a board developer to isolate his/her code out in the required configurations.
I tend to remove these two options completely. Architectures and boards which do not need lowlevel init functions can just provide an empty function here. If we end up introducing many similar options on a board or architecture level we can still decide to turn them into common options.
I do not agree to it. ARCH_INIT_LOWLEVEL makes complete sense in terms of a config option. Why would we want to force 50 odd ARM based developers to write dummy functions when just one or two folks need it? On MACH_INIT_LOWLEVEL I have explained above.
So far arch_init_lowlevel is unused. I only introduced it because the original start.S had some S3C2400 #ifdefs here and I did not want to encourage anyone to put more architecture dependent stuff here.
BTW you can skip the defconfig bits in your patches. It's probably better when I regenerate them from time to time myself because otherwise we'll increase the risk of merge conflicts.
I provided it to handle the inverted case of SKIP_LOWLEVEL Vs HAS_LOWLEVEL. Just trying to be helpful ;)..
Regards, Nishanth Menon

On Fri, May 09, 2008 at 07:08:12AM -0500, Menon, Nishanth wrote:
Sascha,
-----Original Message----- From: Sascha Hauer [mailto:s.hauer@pengutronix.de] Sent: Friday, May 09, 2008 3:08 AM To: Menon, Nishanth Cc: u-boot-users@lists.sourceforge.net Subject: Re: [Patch] U-Boot-V2: Replace CONFIG_SKIP_LOWLEVEL_INIT withCONFIG_MACH_HAS_INIT_LOWLEVEL
This has the same problems as stated in my last mail about ARCH_HAS_INIT_LOWLEVEL, although the situation is slightly different here. The user cannot decide whether the machine actually _has_ a lowlevel init function, it simply has or has not.
You are missing the requirement of having to do a second level boot. I may choose not to enable board level initialization in a specific configuration for the same platform. The requirement I have in OMAP is this: boot up tiny u-boot (very minimal functionality, which needs to be less than 32K) which does SDRAM init (among other things), load the normal u-boot (around 200-400K) from UART, USB, NAND or ONENAND to SDRAM, and give control to it. In the "Normal functionality" U-Boot I'd not want to do a SDRAM and additional arch and board initialization - something that is redundant as it is already done by the tiny u-boot. Now I can also have a configuration for U-Boot booting from NOR. In that case, I'd want SDRAM initialization to be done. In such a case, the user should have the flexibility to be able to enable/disable board low level initialization while creating multiple configurations. All of these configurations are for the same board and same architecture.
OK, can we agree on the following then?
config MACH_DO_LOWLEVEL_INIT bool "run machine lowlevel init" depends on MACH_HAS_LOWLEVEL_INIT default y
I tend to remove these two options completely. Architectures and boards which do not need lowlevel init functions can just provide an empty function here. If we end up introducing many similar options on a board or architecture level we can still decide to turn them into common options.
I do not agree to it. ARCH_INIT_LOWLEVEL makes complete sense in terms of a config option. Why would we want to force 50 odd ARM based developers to write dummy functions when just one or two folks need it? On MACH_INIT_LOWLEVEL I have explained above.
You're right.
Sascha

Sascha,
-----Original Message----- From: Sascha Hauer [mailto:s.hauer@pengutronix.de] Sent: Friday, May 09, 2008 10:13 AM To: Menon, Nishanth Cc: u-boot-users@lists.sourceforge.net Subject: Re: [Patch] U-Boot-V2: Replace CONFIG_SKIP_LOWLEVEL_INIT withCONFIG_MACH_HAS_INIT_LOWLEVEL
You are missing the requirement of having to do a second level boot. I may choose not to enable board level initialization in a specific configuration for the same platform. The requirement I have in OMAP is this: boot up tiny u-boot (very minimal functionality, which needs to be less than 32K) which does SDRAM init (among other things), load the normal u-boot (around 200-400K) from UART, USB, NAND or ONENAND to SDRAM, and give control to it. In the "Normal functionality" U-Boot I'd not want to do a SDRAM and additional arch and board initialization - something that is redundant as it is already done by the tiny u-boot. Now I can also have a configuration for U-Boot booting from NOR. In that case, I'd want SDRAM initialization to be done. In such a case, the user should have the flexibility to be able to enable/disable board low level initialization while creating multiple configurations. All of these configurations are for the same board and same architecture.
OK, can we agree on the following then?
config MACH_DO_LOWLEVEL_INIT bool "run machine lowlevel init" depends on MACH_HAS_LOWLEVEL_INIT default y
Yes. It is a good idea. I have searched thru the boards and have the following revisited patch:
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-09 10:33:46.000000000 -0500 +++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-09 10:35:30.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_DO_LOWLEVEL_INIT 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-09 10:33:46.000000000 -0500 +++ u-boot-v2.git/arch/m68k/cpu/start-mcfv4e.S 2008-05-09 10:36:49.000000000 -0500 @@ -448,7 +448,7 @@ * * Do not jump/call other u-boot code here! */ -#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT bsr.l board_init_lowlevel nop #endif @@ -512,7 +512,7 @@ nop #endif
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT /* * Call other half of initcode in relocated code * Index: u-boot-v2.git/common/Kconfig =================================================================== --- u-boot-v2.git.orig/common/Kconfig 2008-05-09 10:33:46.000000000 -0500 +++ u-boot-v2.git/common/Kconfig 2008-05-09 10:34:25.000000000 -0500 @@ -68,6 +68,18 @@ config ARCH_HAS_INIT_LOWLEVEL bool
+config MACH_HAS_INIT_LOWLEVEL + bool + +config MACH_DO_LOWLEVEL_INIT + bool "run machine low-level init" + depends on MACH_HAS_LOWLEVEL_INIT + default y + help + This entry enables SDRAM and other board low level initialization + on many platforms. Disabling this option allows configurations to use + U-boot as a second stage boot loader. + config PROMPT string prompt "U-Boot command prompt" @@ -219,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 initializing on many ARM based boards. - It enables using U-boot as a second stage boot loader. - config ENABLE_FLASH_NOISE bool prompt "verbose flash handling" Index: u-boot-v2.git/arch/arm/Kconfig =================================================================== --- u-boot-v2.git.orig/arch/arm/Kconfig 2008-05-09 17:40:32.000000000 -0500 +++ u-boot-v2.git/arch/arm/Kconfig 2008-05-09 18:06:44.000000000 -0500 @@ -89,6 +89,7 @@ select HAS_DM9000 select HAS_CFI select ARCH_IMX1 + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the Synertronixx scb9328 board
@@ -96,6 +97,7 @@ bool "phyCORE-i.MX27" select HAS_CFI select ARCH_IMX27 + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using Phytec's phyCORE-i.MX27 (pcm038) equipped with a Freescale i.MX27 Processor @@ -104,6 +106,7 @@ bool "Freescale i.MX27ADS" select HAS_CFI select ARCH_IMX27 + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the Freescale i.MX27ads board equipped with a Freescale i.MX27 Processor @@ -121,6 +124,7 @@ select HAS_NETX_ETHER select HAS_CFI select ARCH_NETX + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the Hilscher Netx nxdb500 board
Index: u-boot-v2.git/arch/m68k/Kconfig =================================================================== --- u-boot-v2.git.orig/arch/m68k/Kconfig 2008-05-09 18:07:01.000000000 -0500 +++ u-boot-v2.git/arch/m68k/Kconfig 2008-05-09 18:09:48.000000000 -0500 @@ -84,6 +84,7 @@ bool "konzeptpark UKD R1 + phyCore MCF5475 NUM" select HAS_CFI select ARCH_MCF54xx + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the konzeptpark UKD R1 with a Phytec Phycore PCM-024-NUM equipped with a Freescale MC5475 Processor @@ -108,6 +109,7 @@ bool "Phytec pcm982 + phyCore MCF5485" select HAS_CFI select ARCH_MCF54xx + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the Phytec Phycore PCM-024 equipped with a Freescale MC5485 Processor @@ -116,6 +118,7 @@ bool "Phytec pcm982 + phyCore MCF5475" select HAS_CFI select ARCH_MCF54xx + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the Phytec Phycore PCM-024 equipped with a Freescale MC5475 Processor @@ -124,6 +127,7 @@ bool "Phytec pcm982 + phyCore MCF5475 NUM" select HAS_CFI select ARCH_MCF54xx + select MACH_HAS_INIT_LOWLEVEL help Say Y here if you are using the Phytec Phycore PCM-024 equipped with a Freescale MC5475 Processor (NUM Variant)

On Fri, May 09, 2008 at 06:19:35PM -0500, Menon, Nishanth wrote:
Sascha,
-----Original Message----- From: Sascha Hauer [mailto:s.hauer@pengutronix.de] Sent: Friday, May 09, 2008 10:13 AM To: Menon, Nishanth Cc: u-boot-users@lists.sourceforge.net Subject: Re: [Patch] U-Boot-V2: Replace CONFIG_SKIP_LOWLEVEL_INIT withCONFIG_MACH_HAS_INIT_LOWLEVEL
You are missing the requirement of having to do a second level boot. I may choose not to enable board level initialization in a specific configuration for the same platform. The requirement I have in OMAP is this: boot up tiny u-boot (very minimal functionality, which needs to be less than 32K) which does SDRAM init (among other things), load the normal u-boot (around 200-400K) from UART, USB, NAND or ONENAND to SDRAM, and give control to it. In the "Normal functionality" U-Boot I'd not want to do a SDRAM and additional arch and board initialization - something that is redundant as it is already done by the tiny u-boot. Now I can also have a configuration for U-Boot booting from NOR. In that case, I'd want SDRAM initialization to be done. In such a case, the user should have the flexibility to be able to enable/disable board low level initialization while creating multiple configurations. All of these configurations are for the same board and same architecture.
OK, can we agree on the following then?
config MACH_DO_LOWLEVEL_INIT bool "run machine lowlevel init" depends on MACH_HAS_LOWLEVEL_INIT default y
Yes. It is a good idea. I have searched thru the boards and have the following revisited patch:
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-09 10:33:46.000000000 -0500 +++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-09 10:35:30.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_DO_LOWLEVEL_INIT 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-09 10:33:46.000000000 -0500 +++ u-boot-v2.git/arch/m68k/cpu/start-mcfv4e.S 2008-05-09 10:36:49.000000000 -0500 @@ -448,7 +448,7 @@ * * Do not jump/call other u-boot code here! */ -#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT bsr.l board_init_lowlevel nop #endif @@ -512,7 +512,7 @@ nop #endif
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT /* * Call other half of initcode in relocated code * Index: u-boot-v2.git/common/Kconfig =================================================================== --- u-boot-v2.git.orig/common/Kconfig 2008-05-09 10:33:46.000000000 -0500 +++ u-boot-v2.git/common/Kconfig 2008-05-09 10:34:25.000000000 -0500 @@ -68,6 +68,18 @@ config ARCH_HAS_INIT_LOWLEVEL bool
+config MACH_HAS_INIT_LOWLEVEL
- bool
+config MACH_DO_LOWLEVEL_INIT
- bool "run machine low-level init"
- depends on MACH_HAS_LOWLEVEL_INIT
Please test your patches next time. You add MACH_HAS_INIT_LOWLEVEL but depend on MACH_HAS_LOWLEVEL_INIT here. Fixed and applied.
Thanks, Sascha
participants (2)
-
Menon, Nishanth
-
Sascha Hauer