From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Fri, 01 Oct 2010 10:27:53 +0200 Subject: [U-Boot] ARM relocation, probably trivial mistake - back to original problem In-Reply-To: <4CA590E6.6070701@emk-elektronik.de> References: <4CA49746.2050301@emk-elektronik.de> <4CA4AEFF.3050101@denx.de> <20100930174308.070ECD2B48C@gemini.denx.de> <4CA570D3.9040406@denx.de> <4CA57468.6090702@free.fr> <4CA57762.3000201@denx.de> <4CA5821E.3070108@emk-elektronik.de> <4CA5873B.6040907@free.fr> <4CA590E6.6070701@emk-elektronik.de> Message-ID: <4CA59B89.6090207@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 Hello Reinhard, Reinhard Meyer wrote: > it seems, that with relocation enabled, some > data does not seem to get initialized properly: > > w/o relocation: > > mmci > mci: setting clock 194000 Hz, block size 512 > mci: setting clock 194000 Hz, block size 512 > mci: setting clock 194000 Hz, block size 512 > mci: setting clock 194000 Hz, block size 512 > mci: setting clock 24832000 Hz, block size 512 > Device: mci > Manufacturer ID: 89 > OEM: 303 > Name: NCard > Tran Speed: 25000000 > Rd Block Len: 512 > SD version 2.0 > High Capacity: No > Capacity: 2006974464 > Bus Width: 4-bit > > with relocation: > > mmci > mci: setting clock 0 Hz, block size 512 Hmm.. mabe something with at91_clock_init() This is called in arch_cpu_init(), and at the end, clocks are stored in arch/arm/cpu/arm926ejs/at91/clock.c in "static unsigned long" vars ... as this code runs before relocation, this seems to me as it could be the reason for your problems ... but I can;t try it here ... can you check this? > mci: setting clock 0 Hz, block size 512 > mci: setting clock 0 Hz, block size 512 > mci: setting clock 0 Hz, block size 512 > mci: setting clock 0 Hz, block size 512 > Device: mci > Manufacturer ID: 89 > OEM: 303 > Name: NCard > Tran Speed: 25000000 > Rd Block Len: 512 > SD version 2.0 > High Capacity: No > Capacity: 2006974464 > Bus Width: 4-bit > > Do I understand right what the required changes are: > > 1. change dram_init Yep. > 2. make sure TEXT_BASE is correct as to where u-boot is loaded > by a preloader and is NOT pointing near top of RAM. Yep. > 3. I do not have a board specific .lds - should I now have one? No. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany