Skip to contentSkip to conversation

can't light led after flash restrict to preliminary range

U-Boot-Users 刘辉 2 participants 2 messages Jul 29, 2005

lore
Share & tools
lore

刘辉

author
#0 lore raw

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.

#1 lore raw
Quoted 2 lines · In message <[email protected]> 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!

Quoted 4 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

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only way you could make a happy  marriage  is  by  cuttin'  their
heads  off  as  soon  as  they say `I do', yes? You can't make happi-
ness...                           - Terry Pratchett, _Witches Abroad_