[U-Boot-Users] can't light led after flash restrict to preliminary range

hello all: I am new for U-boot and try to port uboot base one TQM866M to my board. I meet a problem and I don't know how to sovle it. Here is the situation: I light a led in cup_init.c -> cpu_init_f( ) as flow:
[174] led_init(0x7); /* here is my light led function*/ [175] /* now restrict to preliminary range */ [176] memctl->memc_br0 = CFG_BR0_PRELIM; [177] memctl->memc_or0 = CFG_OR0_PRELIM;
And I succeed. But when i move the led function down to line 177 or even to 176, the led doesn't work, as flows:
[174] /* now restrict to preliminary range */ [175] memctl->memc_br0 = CFG_BR0_PRELIM; [176] led_init(0x7); /* here is my light led function*/ [177] memctl->memc_or0 = CFG_OR0_PRELIM;
Here is the short discription of my board: MPC859DSL OSCLK AM29lv320mb * 1, CS0, 4MByte IC42S16800-t *2, CS1, 32Mbyte
I didn't change any words of the tqm866.h, because I thing that: 1. althoung I have only one flash chip, while tqm866m has tow and memc_or1 was set in line 168, but it doesn't take into use. 2. the or and br belong to ram don't take into use at this moment, too.
i don't have a debuger like IDE2000, so i was so confused. hope you can help me.
regards.

In message E1DyRGb-00046C-9I@mail.sourceforge.net you wrote:
And I succeed. But when i move the led function down to line 177 or even to 176, the led doesn't work, as flows:
Please use shorter lines!
[174] /* now restrict to preliminary range */ [175] memctl->memc_br0 = CFG_BR0_PRELIM; [176] led_init(0x7); /* here is my light led function*/ [177] memctl->memc_or0 = CFG_OR0_PRELIM;
Please read the processor manual, memory controller section. Try to understand what happens when you write to the BR and OR registers, and why strange things may result if you change one but not the other (like you see when you add code right between these two statements).
Best regards,
Wolfgang Denk
participants (2)
-
Wolfgang Denk
-
刘辉