
Hi again,
On Fri, Mar 2, 2012 at 9:46 AM, Christian Riesch christian.riesch@omicron.at wrote:
Hi,
On Thu, Mar 1, 2012 at 9:48 PM, Albert ARIBAUD albert.u.boot@aribaud.net wrote:
Le 01/03/2012 14:23, Fabio Estevam a écrit :
Hi,
Currently CONFIG_ARCH_CPU_INIT is used to select arch_cpu_init() function.
arch_cpu_init() does CPU level initialization, so why do we need to include CONFIG_ARCH_CPU_INIT in the include/configs/boardXYZ files, which are board related files ?
For example:
Let's say boards X, Y and Z are based on SoC S:
- If processor S has a arch_cpu_init() defined, then it means that
X,Y,Z need the code from arch_cpu_init() and then we need to define CONFIG_ARCH_CPU_INIT for each of these boards (actually all the boards based on this processor would need CONFIG_ARCH_CPU_INIT)
- If not all boards need the code inside arch_cpu_init() for
processor S, then it means that this code is not really CPU specific and then it should be moved to board code.
... or some of these boards have a kind of preloader that does CPU level inits before U-Boot is loaded, but other have not.
Exactly. da850 based systems have several options to to lowlevel configuration, either in the AIS (a script interpreted by the ROM bootloader of the SoC), or by UBL (a user bootloader from Texas Instruments that does low level init and then loads u-boot) or by u-boot itself in arch_cpu_init(). Which way is used is board specific, but if the initialization is done by u-boot, the code is the same for all boards, it does not make sense to duplicate it.
Boards that use the low level initialization in u-boot define CONFIG_ARCH_CPU_INIT, boards that rely on AIS or UBL do not define it.
So if CONFIG_ARCH_CPU_INIT is removed, what should be done with da850 based boards?
Christian
Sorry, please forget what I wrote above. We already have a CONFIG_DA850_LOWLEVEL option that already solves the problem. So removing CONFIG_ARCH_CPU_INIT is fine for me. Christian