From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 06 Jun 2012 10:39:57 -0600 Subject: [U-Boot] [PATCH v2 06/10] ARM: add tegra20 support to arm720t In-Reply-To: <1338931225-12246-7-git-send-email-amartin@nvidia.com> References: <1338931225-12246-1-git-send-email-amartin@nvidia.com> <1338931225-12246-7-git-send-email-amartin@nvidia.com> Message-ID: <4FCF87DD.7080203@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/05/2012 03:20 PM, Allen Martin wrote: > Add support for tegra20 arm7 boot processor. This processor is used > to power on the Cortex A9 and transfer control to it. > diff --git a/arch/arm/cpu/arm720t/cpu.c b/arch/arm/cpu/arm720t/cpu.c > #elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR) > /* No cleanup before linux for IntegratorAP/CM720T as yet */ > +#elif defined (CONFIG_MACH_TEGRA_GENERIC) > + /* No cleanup before linux for tegra as yet */ > #else > #error No cleanup_before_linux() defined for this CPU type > #endif Wouldn't CONFIG_TEGRA2 be a better define to use? Same comment throughout. > diff --git a/arch/arm/cpu/arm720t/tegra20/cpu.c b/arch/arm/cpu/arm720t/tegra20/cpu.c > +/* Returns 1 if the current CPU executing is a Cortex-A9, else 0 */ > +int ap20_cpu_is_cortexa9(void) > +{ > + u32 id = readb(NV_PA_PG_UP_BASE + PG_UP_TAG_0); > + return id == (PG_UP_TAG_0_PID_CPU & 0xff); > +} Doesn't the SPL always run on the AVP, and the regular U-Boot build always run on the main CPUs - I'm not sure why this runtime API would be needed. > +void init_pllx(void) I assume a lot of the code in this file is copied from the armv7/tegra20/*.c files. Shouldn't this patch remove the ARMv7 versions since presumably it's no longer needed - doesn't the non-SPL U-Boot rely on the SPL U-Boot always having run first in order to start the main U-Boot executing? If not, then shouldn't this code be in tegra20-common so it can be shared? > diff --git a/arch/arm/cpu/arm720t/tegra20/cpu.h b/arch/arm/cpu/arm720t/tegra20/cpu.h Similarly, this file seems like it'd be in tegra20-common/include or somewhere like that.