ide: <asm-sparc/ide_64.h>: 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 <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Bartlomiej Zolnierkiewicz and committed by David S. Miller edc83d4f 8fbf3f30

+8 -26
+8 -26
include/asm-sparc/ide_64.h
··· 35 #define __ide_mm_outsw __ide_outsw 36 #define __ide_mm_outsl __ide_outsl 37 38 - static inline unsigned int inw_be(void __iomem *addr) 39 - { 40 - unsigned int ret; 41 - 42 - __asm__ __volatile__("lduha [%1] %2, %0" 43 - : "=r" (ret) 44 - : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 45 - 46 - return ret; 47 - } 48 - 49 static inline void __ide_insw(void __iomem *port, void *dst, u32 count) 50 { 51 #ifdef DCACHE_ALIASING_POSSIBLE ··· 44 u32 *pi; 45 46 if(((u64)ps) & 0x2) { 47 - *ps++ = inw_be(port); 48 count--; 49 } 50 pi = (u32 *)ps; 51 while(count >= 2) { 52 u32 w; 53 54 - w = inw_be(port) << 16; 55 - w |= inw_be(port); 56 *pi++ = w; 57 count -= 2; 58 } 59 ps = (u16 *)pi; 60 if(count) 61 - *ps++ = inw_be(port); 62 63 #ifdef DCACHE_ALIASING_POSSIBLE 64 __flush_dcache_range((unsigned long)dst, end); 65 #endif 66 - } 67 - 68 - static inline void outw_be(unsigned short w, void __iomem *addr) 69 - { 70 - __asm__ __volatile__("stha %r0, [%1] %2" 71 - : /* no outputs */ 72 - : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 73 } 74 75 static inline void __ide_outsw(void __iomem *port, void *src, u32 count) ··· 74 const u32 *pi; 75 76 if(((u64)src) & 0x2) { 77 - outw_be(*ps++, port); 78 count--; 79 } 80 pi = (const u32 *)ps; ··· 82 u32 w; 83 84 w = *pi++; 85 - outw_be((w >> 16), port); 86 - outw_be(w, port); 87 count -= 2; 88 } 89 ps = (const u16 *)pi; 90 if(count) 91 - outw_be(*ps, port); 92 93 #ifdef DCACHE_ALIASING_POSSIBLE 94 __flush_dcache_range((unsigned long)src, end);
··· 35 #define __ide_mm_outsw __ide_outsw 36 #define __ide_mm_outsl __ide_outsl 37 38 static inline void __ide_insw(void __iomem *port, void *dst, u32 count) 39 { 40 #ifdef DCACHE_ALIASING_POSSIBLE ··· 55 u32 *pi; 56 57 if(((u64)ps) & 0x2) { 58 + *ps++ = __raw_readw(port); 59 count--; 60 } 61 pi = (u32 *)ps; 62 while(count >= 2) { 63 u32 w; 64 65 + w = __raw_readw(port) << 16; 66 + w |= __raw_readw(port); 67 *pi++ = w; 68 count -= 2; 69 } 70 ps = (u16 *)pi; 71 if(count) 72 + *ps++ = __raw_readw(port); 73 74 #ifdef DCACHE_ALIASING_POSSIBLE 75 __flush_dcache_range((unsigned long)dst, end); 76 #endif 77 } 78 79 static inline void __ide_outsw(void __iomem *port, void *src, u32 count) ··· 92 const u32 *pi; 93 94 if(((u64)src) & 0x2) { 95 + __raw_writew(*ps++, port); 96 count--; 97 } 98 pi = (const u32 *)ps; ··· 100 u32 w; 101 102 w = *pi++; 103 + __raw_writew((w >> 16), port); 104 + __raw_writew(w, port); 105 count -= 2; 106 } 107 ps = (const u16 *)pi; 108 if(count) 109 + __raw_writew(*ps, port); 110 111 #ifdef DCACHE_ALIASING_POSSIBLE 112 __flush_dcache_range((unsigned long)src, end);