From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 05 Dec 2012 13:37:27 -0700 Subject: [U-Boot] [PATCH V2 4/7] Tegra30: Add common CPU (shared) files In-Reply-To: <1354578322-1834-5-git-send-email-twarren@nvidia.com> References: <1354578322-1834-1-git-send-email-twarren@nvidia.com> <1354578322-1834-5-git-send-email-twarren@nvidia.com> Message-ID: <50BFB087.5010402@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 12/03/2012 04:45 PM, Tom Warren wrote: > These files are used by both SPL and main U-Boot. > Also made minor changes to shared Tegra code to support > T30 differences. > diff --git a/arch/arm/cpu/tegra-common/ap.c b/arch/arm/cpu/tegra-common/ap.c > + case CHIPID_TEGRA30: > + switch (tegra_sku_id) { > + case SKU_ID_T30: > + /* > + * T30 has two options. We will return TEGRA_SOC_T30 > + * until we have the fdt set up when it may change to > + * TEGRA_SOC_T30_408MHZ depending on the PLLP freq. > + */ > + if (clock_get_rate(CLOCK_ID_PERIPH) == 408000000) > + return TEGRA_SOC_T30_408MHZ; > + else > + return TEGRA_SOC_T30; Just for completeness, I'm going to mention again that I think this should just return TEGRA_SOC_T30 all the time. Sorry if that's belaboring the point! I just noticed your recent email saying you got 408MHz working, so I guess my comment is moot anyway:-) > diff --git a/arch/arm/cpu/tegra-common/sys_info.c b/arch/arm/cpu/tegra-common/sys_info.c > /* Print CPU information */ > int print_cpuinfo(void) > { > +#if defined(CONFIG_TEGRA20) > puts("TEGRA20\n"); > - > +#else /* Tegra30 */ > + puts("TEGRA30\n"); > +#endif This is fine, but the following wouldn't require editing again for future chips: puts(CONFIG_SYS_SOC); puts("\n"); (although it ends up being all lower-case; perhaps there's some other variable that is upper-case?)