diff options
author | dfr <dfr@FreeBSD.org> | 2000-05-14 13:47:57 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-05-14 13:47:57 +0000 |
commit | 503e2bb45ec708ded388e6d0515415adea9c2a1e (patch) | |
tree | 03d0d17068c3220d01e03b0d2893c70b07a8ecd3 /sys/alpha/include/cpufunc.h | |
parent | 1a749c1007b2262af1843c6417d514e940e6387e (diff) | |
download | FreeBSD-src-503e2bb45ec708ded388e6d0515415adea9c2a1e.zip FreeBSD-src-503e2bb45ec708ded388e6d0515415adea9c2a1e.tar.gz |
Port ppc driver to alpha.
Submitted by: Andrew M. Miklic <miklic@ibm.net>
Diffstat (limited to 'sys/alpha/include/cpufunc.h')
-rw-r--r-- | sys/alpha/include/cpufunc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/alpha/include/cpufunc.h b/sys/alpha/include/cpufunc.h index 98f72e8..96a91b6 100644 --- a/sys/alpha/include/cpufunc.h +++ b/sys/alpha/include/cpufunc.h @@ -61,6 +61,13 @@ breakpoint(void) /* * Bulk i/o (for IDE driver). */ +static __inline void insb(u_int32_t port, void *buffer, size_t count) +{ + u_int8_t *p = (u_int8_t *) buffer; + while (count--) + *p++ = inb(port); +} + static __inline void insw(u_int32_t port, void *buffer, size_t count) { u_int16_t *p = (u_int16_t *) buffer; @@ -75,6 +82,13 @@ static __inline void insl(u_int32_t port, void *buffer, size_t count) *p++ = inl(port); } +static __inline void outsb(u_int32_t port, const void *buffer, size_t count) +{ + const u_int8_t *p = (const u_int8_t *) buffer; + while (count--) + outb(port, *p++); +} + static __inline void outsw(u_int32_t port, const void *buffer, size_t count) { const u_int16_t *p = (const u_int16_t *) buffer; |