[U-Boot] [PATCH] arm: Tegra2: add support for A9 CPU init

Albert ARIBAUD albert.aribaud at free.fr
Sun Mar 13 18:46:06 CET 2011


Le 16/02/2011 21:26, Tom Warren a écrit :
> Signed-off-by: Tom Warren<twarren at nvidia.com>
> ---
>   arch/arm/cpu/armv7/start.S                 |    6 +
>   arch/arm/cpu/armv7/tegra2/Makefile         |    2 +-

>   arch/arm/cpu/armv7/tegra2/ap20.c           |  490 ++++++++++++++++++++++++++++
This one has an extra empty line at end of file.

> +void cold_boot(void)
> +{
> +	asm volatile(
> +
> +	"msr     cpsr_c, #0xd3            \n"
> +	/*
> +	* Check current processor: CPU or AVP?
> +	* If AVP, go to AVP boot code, else continue on.
> +	*/
> +	"mov     r0, %0                   \n"
> +	"ldrb    r2, [r0, %1]             \n"
> +	/* are we the CPU? */
> +	"cmp     r2, %2                   \n"
> +	"mov     sp, %3                   \n"
> +	/* leave in some symbols for release debugging */
> +	"mov     r3, %6                   \n"
> +	"str     r3, [sp, #-4]!           \n"
> +	"str     r3, [sp, #-4]!           \n"
> +	/*  yep, we are the CPU */
> +	"bxeq     %4                      \n"
> +	/* AVP Initialization follows this path */
> +	"mov     sp, %5                   \n"
> +	/* leave in some symbols for release debugging */
> +	"mov     r3, %6                   \n"
> +	"str     r3, [sp, #-4]!           \n"
> +	"str     r3, [sp, #-4]!           \n"
> +
> +	/* Init and Start CPU */
> +	"b       startup_cpu              \n"
> +	:
> +	: "i"(NV_PA_PG_UP_BASE),

If I'm not mistaken, NV_PA_PG_UP_BASE could be used just as well 
directly in the asm statement instead of via %0 and i(), as anyway the 
asm will be preprocessed and the macro will turn to a number. That would 
simplify the asm instruction as a whole and make the asm statement more 
understandable (also applies to other macros used similarly).

Apart from that, I must admit I don't know the Tegra2/A9 well enough to 
comment further.

amicalement,
Amicalement,
-- 
Albert.


More information about the U-Boot mailing list