[U-Boot] [PATCH] zynq: Use arch_cpu_init() instead of lowlevel_init()

Michal Simek
2013-09-23T14:19:52Z

On 09/23/2013 02:31 PM, Albert ARIBAUD wrote:
> Hi Michal,
>
> On Thu, 22 Aug 2013 14:52:02 +0200, Michal Simek
> <michal.simek@xilinx.com> wrote:
>
>> Zynq lowlevel_init() was implemented in C but stack
>> pointer is setup after function call in _main().
>> Move architecture setup to arch_cpu_init() which is call
>> as the first function in board_init_f() which
>> already have correct stack pointer.
>>
>> Reported-by: Sven Schwermer <sven.schwermer@tuhh.de>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>> I can't see any problem to call zynq setup a little
>> bit later. There is already expectation that u-boot
>> runs from DDR.
>> Moving lowlevel_init from C to ASM is possible but
>> I will have to introduce new macros with hardcoded
>> values. Using structures is much nicer.
>>
>> ---
>> arch/arm/cpu/armv7/zynq/cpu.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm/cpu/armv7/zynq/cpu.c b/arch/arm/cpu/armv7/zynq/cpu.c
>> index 4367d1a..8846f30 100644
>> --- a/arch/arm/cpu/armv7/zynq/cpu.c
>> +++ b/arch/arm/cpu/armv7/zynq/cpu.c
>> @@ -11,6 +11,10 @@
>>
>> void lowlevel_init(void)
>> {
>> +}
>
> I'd rather you deleted lowlevel_init() as a C function with this
> name should not exist.

Ok. Do you want me to create almost empty low_level.S or just use
arch/arm/cpu/arvm7/lowlevel_init.S and define empty s_init()?

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130923/2f3e0ad4/attachment.pgp>