From 4b949c340ac98de451a71a8464bb61c6bc6380bf Mon Sep 17 00:00:00 2001 From: Greg Watson Date: Wed, 17 Dec 2003 17:27:20 +0000 Subject: added _outsw_ns git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1313 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/ppc/include/arch/io.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/arch/ppc') diff --git a/src/arch/ppc/include/arch/io.h b/src/arch/ppc/include/arch/io.h index 271482b9bc..5e28734390 100644 --- a/src/arch/ppc/include/arch/io.h +++ b/src/arch/ppc/include/arch/io.h @@ -64,16 +64,6 @@ #define inl_p(port) inl((port)) #define outl_p(val, port) outl((val), (port)) -extern void _insb(volatile uint8_t *port, void *buf, int ns); -extern void _outsb(volatile uint8_t *port, const void *buf, int ns); -extern void _insw(volatile uint16_t *port, void *buf, int ns); -extern void _outsw(volatile uint16_t *port, const void *buf, int ns); -extern void _insl(volatile uint32_t *port, void *buf, int nl); -extern void _outsl(volatile uint32_t *port, const void *buf, int nl); -extern void _outsw_ns(volatile uint16_t *port, const void *buf, int ns); -extern void _insl_ns(volatile uint32_t *port, void *buf, int nl); -extern void _outsl_ns(volatile uint32_t *port, const void *buf, int nl); - /* * The *_ns versions below don't do byte-swapping. * Neither do the standard versions now, these are just here @@ -189,4 +179,14 @@ static inline void _insw_ns(volatile uint16_t *port, void *buf, int ns) ns--; } } + +static inline void _outsw_ns(volatile uint16_t *port, const void *buf, int ns) +{ + uint16_t * b = (uint16_t *)buf; + + while (ns > 0) { + out_le16(port, *b++); + ns--; + } +} #endif -- cgit v1.2.3