From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikram Narayanan Date: Thu, 27 Dec 2012 18:21:46 +0530 Subject: [U-Boot] [PATCH] arm/bootstage: Move the bootstage call after gd init In-Reply-To: <20121227112203.42b59591@lilith> References: <50D6EA9C.30809@gmail.com> <20121227104106.392a328d@lilith> <20121227112203.42b59591@lilith> Message-ID: <50DC4462.4040207@gmail.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 12/27/2012 3:52 PM, Albert ARIBAUD wrote: > On Thu, 27 Dec 2012 10:41:06 +0100, Albert ARIBAUD > wrote: >> Hi Simon, >> >> On Wed, 26 Dec 2012 12:39:32 -0800, Simon Glass >> wrote: >>> Hi Vikram, >>> >>> On Sun, Dec 23, 2012 at 3:27 AM, Vikram Narayanan wrote: >>>> bootstage_mark_name calls timer_get_boot_us which inturn calls >>>> the arch timer. The arch timer uses the gd pointer to save the >>>> lastinc count. A call to bootstage_mark_name here results in a >>>> data abort as gd is uninitialized. >>>> >>>> Signed-off-by: Vikram Narayanan >>>> Cc: Simon Glass >>>> Cc: Wolfgang Denk >>>> Cc: Albert Aribaud >>> >>> Acked-by: Simon Glass >>> >>> This bug will affect boards which don't have their own >>> timer_get_boot_us() function. >>> >>> Albert, I think we should try to get this in as a bug fix in the >>> upcoming release. >>> >>> Thanks for the fix Vikram. >> >> Thanks Vikram and Simon; I'll pull this in today. > > ... actually, this will depend on whether my crt0 change gets in for > 2013.01, as with this change, gd is already initialized when > entering board_init_f(). Yes. You are right. If your patch goes in, my patch need not be applied. Regards, Vikram