From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
Linux/m68k <linux-m68k@lists.linux-m68k.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] M68k ndelay()
Date: Sun, 13 Apr 2003 15:05:14 +0200 [thread overview]
Message-ID: <200304131305.h3DD5EQi001293@callisto.of.borg> (raw)
M68k: add ndelay() implementation (needed for IDE)
--- linux-2.4.21-pre7/include/asm-m68k/delay.h Thu Jan 4 22:00:55 2001
+++ linux-m68k-2.4.21-pre7/include/asm-m68k/delay.h Sun Mar 30 22:22:40 2003
@@ -16,6 +16,7 @@
}
extern void __bad_udelay(void);
+extern void __bad_ndelay(void);
/*
* Use only for very small delays ( < 1 msec). Should probably use a
@@ -39,9 +40,18 @@
__const_udelay(usecs * 4295); /* 2**32 / 1000000 */
}
+static inline void __ndelay(unsigned long nsecs)
+{
+ __const_udelay(nsecs * 5); /* 2**32 / 1000000000 */
+}
+
#define udelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 4295)) : \
__udelay(n))
+
+#define ndelay(n) (__builtin_constant_p(n) ? \
+ ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5)) : \
+ __ndelay(n))
extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c)
{
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
reply other threads:[~2003-04-13 12:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200304131305.h3DD5EQi001293@callisto.of.borg \
--to=geert@linux-m68k.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=marcelo@conectiva.com.br \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).