From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 13 Aug 2012 07:57:16 -0700 Subject: [U-Boot] [PATCH 0/2]: arm: Provide lowlevel_init C function wrapper for v7 In-Reply-To: <5028B132.5010003@denx.de> References: <1344528116-13967-1-git-send-email-trini@ti.com> <5028B132.5010003@denx.de> Message-ID: <502915CC.2020605@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/13/2012 12:48 AM, Stefano Babic wrote: > On 09/08/2012 18:01, Tom Rini wrote: >> Hey all, >> > > Hi Tom, > >> As Allen Martin noted, on tegra platforms a bug is exposed when using >> certain toolchains that currently calls to lowlevel_init must be calls >> to another assembly function as the stack is not explicitly setup / >> saved and thus register corruption can occur. Over in TI-land Aneesh V >> wrote a lowlevel_init that sets up the stack and calls s_init which is a >> C function that does what lowlevel_init does on other platforms. The >> code is generic to at least v7, so this series moves it to >> arch/arm/cpu/armv7. > > Then as far as I can see in your patch, other armv7 can profit as well, > such as the i.MX5 and i.MX6 ;-) > > The only issue is to generalize the entry point for the function to > setup PLL and or pinmux. It should be enough to change lowlevel_init to > s_init in i.MX to do the job. Yes, anyone could switch to this (and if it makes their code cleaner, a C rather than asm lowlevel_init). Just don't want to force the issue since it requires that CONFIG_SYS_INIT_SP_ADDR be viable at this point and that's something every platform has to determine for themselves. -- Tom