All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mirco Fuchs <mircofuchs@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] bug in at91rm9200 interrupt.c [udelay()] ?
Date: Wed, 20 Jul 2005 12:04:40 +0200	[thread overview]
Message-ID: <2094120610@web.de> (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

             reply	other threads:[~2005-07-20 10:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-20 10:04 Mirco Fuchs [this message]
2005-07-20 11:25 ` [U-Boot-Users] bug in at91rm9200 interrupt.c [udelay()] ? Anders Larsen
  -- strict thread matches above, loose matches on Subject: below --
2005-07-20 12:52 Mirco Fuchs
2005-07-20 13:18 ` Anders Larsen
2005-07-20 15:32   ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2094120610@web.de \
    --to=mircofuchs@web.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.