From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Gehrlein Date: Thu, 07 Aug 2008 12:00:59 +0200 Subject: [U-Boot-Users] [PATCH 3/7 v6] ARM: Add arm1176 core with S3C6400 SoC In-Reply-To: References: Message-ID: <489AC7DB.6000709@tqs.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Guennadi, Guennadi Liakhovetski schrieb: > diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c [snip] > +void udelay(unsigned long usec) > +{ > + unsigned long long tmp; > + ulong tmo; > + > + tmo = (usec + 9) / 10; > + tmp = get_ticks() + tmo; /* get current timestamp */ > + > + while (get_ticks() < tmp)/* loop till event */ > + /*NOP*/; > +} I tried to follow the interrupt init function, but it's difficult. What is the least possible delay with the udelay function? I remember that i.mx31 udelay cannot currently be below 30 microsseconds due to the low input clock. If someone uses udelay(1) in polling loops with timeout, the actual duration is much more longer than assumed. Kind regards, Jens