From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Retanubun Date: Fri, 15 Jan 2010 11:57:02 -0500 Subject: [U-Boot] [PATCH] PPC: Record uboot's relocated address in RAM and show in bdinfo. In-Reply-To: References: <4B508900.70400@RuggedCom.com> Message-ID: <4B509E5E.8090002@RuggedCom.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Detlev Zundel wrote: > > Please excuse my ignorance, but why not simply remove the #ifdef > CONFIG_AMIGAONEG3SE in board_init_f? Actually I was hoping to remove > the Amigaone special case. > > Cheers > Detlev > I prefer getting the data from board_init_r because we really are running from RAM at that point; dest_addr is a passed in function param. In board_init_f, the addr variable is just what the calculated address is. If we must do the copy there I'd like to move the gd->relocaddr = addr to just before the call to relocate_code, that way if the calculation code got reworked/refactored, we always copy the correct addr variable. Plus the line: debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); in board_init_r Is the de-facto place where documentations that I've seen refer to for figuring out where u-boot is relocated, so making the assignment there makes it clearer. All these leads to my preference of getting it from board_init_r. I'll be happy to submit a V2 that takes out the CONFIG_AMIGAONEG3SE copy operation in board_init_f as well, but I can't confirm if that does not break the AMIGAONE board. - Richard