From: Bartlomiej Zolnierkiewicz Date: Mon, 21 Jul 2008 23:51:43 +0000 (-0700) Subject: ide: : use __raw_{read,write}w() X-Git-Tag: v2.6.27-rc1~862^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=edc83d4f3e971b322c557604d064b68374a7b77b;p=~shefty%2Frdma-dev.git ide: : use __raw_{read,write}w() Use __raw_{read,write}w() in __ide_{in,out}sw() and remove no longer needed {in,out}w_be(). Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: David S. Miller --- diff --git a/include/asm-sparc/ide_64.h b/include/asm-sparc/ide_64.h index 27921ccb3a1..99eee9b0ba2 100644 --- a/include/asm-sparc/ide_64.h +++ b/include/asm-sparc/ide_64.h @@ -35,17 +35,6 @@ #define __ide_mm_outsw __ide_outsw #define __ide_mm_outsl __ide_outsl -static inline unsigned int inw_be(void __iomem *addr) -{ - unsigned int ret; - - __asm__ __volatile__("lduha [%1] %2, %0" - : "=r" (ret) - : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); - - return ret; -} - static inline void __ide_insw(void __iomem *port, void *dst, u32 count) { #ifdef DCACHE_ALIASING_POSSIBLE @@ -55,34 +44,27 @@ static inline void __ide_insw(void __iomem *port, void *dst, u32 count) u32 *pi; if(((u64)ps) & 0x2) { - *ps++ = inw_be(port); + *ps++ = __raw_readw(port); count--; } pi = (u32 *)ps; while(count >= 2) { u32 w; - w = inw_be(port) << 16; - w |= inw_be(port); + w = __raw_readw(port) << 16; + w |= __raw_readw(port); *pi++ = w; count -= 2; } ps = (u16 *)pi; if(count) - *ps++ = inw_be(port); + *ps++ = __raw_readw(port); #ifdef DCACHE_ALIASING_POSSIBLE __flush_dcache_range((unsigned long)dst, end); #endif } -static inline void outw_be(unsigned short w, void __iomem *addr) -{ - __asm__ __volatile__("stha %r0, [%1] %2" - : /* no outputs */ - : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); -} - static inline void __ide_outsw(void __iomem *port, void *src, u32 count) { #ifdef DCACHE_ALIASING_POSSIBLE @@ -92,7 +74,7 @@ static inline void __ide_outsw(void __iomem *port, void *src, u32 count) const u32 *pi; if(((u64)src) & 0x2) { - outw_be(*ps++, port); + __raw_writew(*ps++, port); count--; } pi = (const u32 *)ps; @@ -100,13 +82,13 @@ static inline void __ide_outsw(void __iomem *port, void *src, u32 count) u32 w; w = *pi++; - outw_be((w >> 16), port); - outw_be(w, port); + __raw_writew((w >> 16), port); + __raw_writew(w, port); count -= 2; } ps = (const u16 *)pi; if(count) - outw_be(*ps, port); + __raw_writew(*ps, port); #ifdef DCACHE_ALIASING_POSSIBLE __flush_dcache_range((unsigned long)src, end);