Skip to contentSkip to conversation

write_via_fpu() doesn't work?

U-Boot-Users Shawn 1 participant 2 messages Jul 1, 2004

lore
Share & tools
lore

Shawn

author
#0 lore raw

Hi,

I'm debugging the flash_init(), which is ported from SL8245. Through the following three lines of code, it always gets wrong result.

	write_via_fpu (&addr[0xaaa8], precmd0);
	write_via_fpu (&addr[0x5550], precmd1);
	write_via_fpu (&addr[0xaaa8], cmdid);

But if I manually write to flash via BDI, it always returns correct result. Doesn't write_via_fpu() work?

(gdb) n
137 write_via_fpu (&addr[0xaaa8], cmdid);
(gdb) n
139 DEBUGF ("Flash bank # %d:\n"
(gdb) p *addr
$6 = 0xffffffff
(gdb) mon mmd 0xff80aaa8 000000aa000000aa
(gdb) mon mmd 0xff805550 0000005500000055
(gdb) mon mmd 0xff80aaa8 0000009000000090
(gdb) mon mdd 0xff800000
ff800000 : 0000000100000001 ........
ff800008 : 2222227e2222227e """~"""~

Thanks,
-Shawn.

__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

author
#1 lore raw

OK, I found the reason.

Quoted 6 lines

I'm debugging the flash_init(), which is ported from SL8245. Through the
following three lines of code, it always gets wrong result.

	write_via_fpu (&addr[0xaaa8], precmd0);
	write_via_fpu (&addr[0x5550], precmd1);
	write_via_fpu (&addr[0xaaa8], cmdid);

It should be 0x2aaa because the pointer is long type.

-Shawn.

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail