From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sun, 13 Mar 2011 18:46:06 +0100 Subject: [U-Boot] [PATCH] arm: Tegra2: add support for A9 CPU init In-Reply-To: <1297887964-25207-2-git-send-email-twarren@nvidia.com> References: <1297887964-25207-1-git-send-email-twarren@nvidia.com> <1297887964-25207-2-git-send-email-twarren@nvidia.com> Message-ID: <4D7D02DE.3040101@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 16/02/2011 21:26, Tom Warren a ?crit : > Signed-off-by: Tom Warren > --- > 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.