Skip to contentSkip to conversation

bug in at91rm9200 interrupt.c [udelay()] ?

U-Boot-Users Mirco Fuchs 2 participants 2 messages Jul 20, 2005

lore
Share & tools
lore
#0 lore raw

hello,

i'm porting u-boot to the csb637 board from cogent.

I think i found a bug in the udelay (); function in file interrupt.c (at91rm9200).

Assume the following C code:

...
start = get_timer(0);

/* some code */

udelay(1500) // delay of about 1500us
next = get_timer(start);
...

what we expect is that the value of next holds the difference between next and start in milliseconds. This works fine without the udelay() function between the get_timer() function calls. But in udelay() the global variable timestamp is reset to zero and so there is no longer any relationship between next and start. The effect will be that any time measurements will fail.

I allready looked in some other interrupt.c files, but the udelay() function is handled in a similar way.

Maybe i'm wrong with my assumption, but i don't think so. I'm very interested in your answers.

Regards

Mirco

_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail k?nnen Sie eine SMS an alle Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179

#1 lore raw

Mirco Fuchs <[email protected]> schreibt:

Quoted 1 line

i'm porting u-boot to the csb637 board from cogent.

Did you check the list archives?

U-Boot already runs on the csb637 board - the patches were submitted to the list on the 3.rd of May (but alas, haven't been merged yet). This was mentioned again on this list less than one week ago.

Cheers
Anders