[U-Boot-Users] SMC driver problem

Robert Schwebel robert at schwebel.de
Tue Apr 1 11:43:39 CEST 2003


On Tue, Apr 01, 2003 at 10:14:46AM +0200, Marius Groeger wrote:
> Have you looked at the assembly code generated by the compiler? Maybe
> the subroutine call enforces some instruction ordering, that otherwise
> doesn't take place.

> Guessing from your tests, timing doesn't seem to be the issue.
> Hm, stack operations don't seem to relate to the problem either.

Ack. 

> The D-Cache is still off, right?

Yep. 

> Does the problem persist, if you turn off the I-Cache?

No change; the icache enabling code in start.S is off anyway. 

> Are there any instructions to enforce pending IO operation, such as
> the eieio on the PPC?

I don't think so. 

> Just for clarification: by "the putx() function", you mean the puts("x");
> call, right? (probably slipped from s to x on your keyboard :-)

Yep. 

> I don't really understand this sentence. Could you explain this again,
> please?

I've done some further tests, the scenario looks like this now: 

----------8<----------
...
void test1(void)
	nops

void test2(char)
	output character to serial port

smc_send_packet(...)
	...
	(the critical line with the FIXME)
	test2('x');
	...
----------8<----------

- if test1 and test2 are not present (commented out) it does not work. 
- adding test2() and calling it makes it work
- adding test1() and _not_ alling it makes it break again when there are 
  more than 4 nops present. With 4 nops and less it still works. 

All this looks like the positon of the code seems to be the problem, but why? 

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4




More information about the U-Boot mailing list