From: Wolfgang Denk Date: Sun, 14 Nov 2010 01:35:01 +0100 Subject: [U-Boot] RFC: Aligning arch initialisation sequences In-Reply-To: <4CDF2C8B.3060401@gmail.com> References: <4CD67A22.9040802@gmail.com> <201011091835.38581.vapier@gentoo.org> <4CDE1107.80108@gmail.com> <4CDE30CF.9010509@emk-elektronik.de> <20101113081712.C5D85150ADD@gemini.denx.de> <4CDF04A8.4050802@emk-elektronik.de> <20101113215302.6BEA3CEA55B@gemini.denx.de> <4CDF137E.2000902@emk-elektronik.de> <20101113224554.64D72CEA55B@gemini.denx.de> <4CDF15BB.1090107@emk-elektronik.de> <20101114000758.51B6ED302CB@gemini.denx.de> <4CDF2C8B.3060401@gmail.com> Message-ID: <20101114003501.82985CEA55B@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Graeme Russ, In message <4CDF2C8B.3060401@gmail.com> you wrote: > > > You cannot and must not touch SDRAM in board_early_init_f(). And even > > more, you must not at all run relocate_code() there! > > > > See: > arch/powerpc/lib/board.c > arch/m68k/lib/board.c > arch/arm/lib/board.c > > They all malloc the final global data structure, memcpy the temporary > global data to the malloc'd global data, and call relocate_code passing a > pointer to the new global data all at the very end board_init_f() and > therefore after SDRAM has been initialised Yes, and this is correct. board_init_f != board_early_init_f Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de We, the unwilling, led by the unknowing, are doing the impossible for the ungrateful. We have done so much, for so long, with so little, we are now qualified to do anything with nothing.