[U-Boot-Users] u-boot hangs in ./cpu/mpc8xx/cpu_init.c when changing br0

I am working on fixing a u-boot board port on a MPC866 processor.
my problem is that U-boot hangs when initializing the CPU at line 180: 180 memctl->memc_or1 = CFG_OR1_PRELIM; 181 memctl->memc_br1 = CFG_BR1_PRELIM;
but in debugging (bdi2000, DDD), I find that the failure really occurs at line 118: 118 reg = memctl->memc_br0; 119 reg &= BR_PS_MSK; /* Clear everything except Port Size bits */ 120 reg |= BR_V; /* then add just the "Bank Valid" bit */ 121 memctl->memc_br0 = reg;
reg does not get the value of br0 at line 118, like it should. In fact, DDD acts like the variable does not even exist. So at line 121, br0 is being set to 0x00000001 instead of 0xXXXX0001. U-boot keeps running after this, but only for a few more lines. It appears as though the program is running out of cache before dying at 180 (because flash is now located at memory location 0x00000000 instead of 0xff000000, it cannot find the next program word). When I modify br0 to 0xff000001 after it fails, u-boot can continue on.
I am compiling on ELDK 4.0.0.
Any suggestions? Thanks, JM

In message 1628E43D99629C46988BE46087A3FBB95C57DD@ep-01.EmbeddedPlanet.local you wrote:
reg does not get the value of br0 at line 118, like it should. In fact, DDD acts like the variable does not even exist. So at line 121, br0 is
...
Any suggestions?
You did read http://www.denx.de/wiki/view/DULG/DebuggingTricks , didn't you?
Best regards,
Wolfgang Denk
participants (2)
-
Jeff Mann
-
Wolfgang Denk