From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 29 Mar 2013 16:43:45 -0600 Subject: [U-Boot] [PATCH] Tegra: Configure L2 cache control reg properly. In-Reply-To: <1364589490-2759-1-git-send-email-twarren@nvidia.com> References: <1364589490-2759-1-git-send-email-twarren@nvidia.com> Message-ID: <51561921.2040709@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 03/29/2013 02:38 PM, Tom Warren wrote: > Without this change, kernel fails at calling function cache_clean_flush > during kernel early boot. > > Aprocryphally, intended for T114 only, so I check for a T114 SoC. > Works (i.e. dalmore 3.8 kernel now starts printing to console). I don't know enough about the caches to really review this, but I have no particular objection to it. My one comment is ... > diff --git a/arch/arm/cpu/tegra-common/cache.c b/arch/arm/cpu/tegra-common/cache.c > +void config_cache(void) > + /* Currently, only T114 needs this L2 cache change to boot Linux */ > + reg = (readl(&gp->hidrev) & HIDREV_CHIPID_MASK); > + if (reg != (CHIPID_TEGRA114 << HIDREV_CHIPID_SHIFT)) > + return; Can we introduce a standard function for that instead? We already have tegra_get_chip_type() which returns a SKU-based ID. I think we need to introduce a tegra_get_soc_type() that returns a pure Tegra20/30/114 value, and probably use this in most places we currently use the result of tegra_get_chip_type(), since most care about SW-compatibility of features rather than SKU which drivers performance levels instead typically. Then, perhaps rename tegra_get_chip_type() to tegra_get_soc_sku() and re-write it to use tegra_get_soc_type()?