From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 5 Oct 2012 18:23:08 +0200 Subject: [U-Boot] [PATCH] arm: rmobile: bugfix: wrong register saving in lowlevel_init In-Reply-To: <1349411962-29202-1-git-send-email-koba@kmckk.co.jp> References: <20121004183155.GA1809@bill-the-cat> <1349411962-29202-1-git-send-email-koba@kmckk.co.jp> Message-ID: <20121005182308.475b3406@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tetsuyuki, On Fri, 5 Oct 2012 13:39:22 +0900, Tetsuyuki Kobayashi wrote: > lowlevel_init() of rmobile badly assumed that ip register holds return address. > The commit "63ee53a7 armv7 cpu_init_crit: Simplify code" breaks this assumption. > This patch removes this bad assumption and simplify code. > > Signed-off-by: Tetsuyuki Kobayashi > --- > Hello, Albert > Hello, Tom > Thank you for merging my patches. > > I checked current u-boot-master and found kzm9g board fails to boot because bug. > This bugfix patch solves it. > I think 2012.10 release should have this bugfix. > > Iwamatsu-san, could you double check this patch? > > > arch/arm/cpu/armv7/rmobile/lowlevel_init.S | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/arch/arm/cpu/armv7/rmobile/lowlevel_init.S b/arch/arm/cpu/armv7/rmobile/lowlevel_init.S > index 1bd391e..4fdca06 100644 > --- a/arch/arm/cpu/armv7/rmobile/lowlevel_init.S > +++ b/arch/arm/cpu/armv7/rmobile/lowlevel_init.S > @@ -76,17 +76,7 @@ loop0: > bne loop0 > > ldr sp, MERAM_STACK Is this load of sp still needed? > - str ip, [sp] /* stash old link register */ > - mov ip, lr /* save link reg across call */ > - > - bl s_init > - > - ldr ip, [sp] /* restore save ip */ > - mov lr, ip /* restore link reg */ > - > - /* back to arch calling code */ > - mov pc, lr > + b s_init > > .pool > .align 4 Amicalement, -- Albert.