ide: <asm-sparc/ide_32.h>: use __raw_{read,write}w()

Use __raw_{read,write}w() in __ide_{in,out}sw().

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 8fbf3f30 28c10af7

+10 -20
+10 -20
include/asm-sparc/ide_32.h
··· 28 #define __ide_mm_outsw __ide_outsw 29 #define __ide_mm_outsl __ide_outsl 30 31 - static inline void __ide_insw(unsigned long port, 32 - void *dst, 33 - unsigned long count) 34 { 35 - volatile unsigned short *data_port; 36 /* unsigned long end = (unsigned long)dst + (count << 1); */ /* P3 */ 37 u16 *ps = dst; 38 u32 *pi; 39 40 - data_port = (volatile unsigned short *)port; 41 - 42 if(((unsigned long)ps) & 0x2) { 43 - *ps++ = *data_port; 44 count--; 45 } 46 pi = (u32 *)ps; 47 while(count >= 2) { 48 u32 w; 49 50 - w = (*data_port) << 16; 51 - w |= (*data_port); 52 *pi++ = w; 53 count -= 2; 54 } 55 ps = (u16 *)pi; 56 if(count) 57 - *ps++ = *data_port; 58 59 /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */ 60 } 61 62 - static inline void __ide_outsw(unsigned long port, 63 - const void *src, 64 - unsigned long count) 65 { 66 - volatile unsigned short *data_port; 67 /* unsigned long end = (unsigned long)src + (count << 1); */ 68 const u16 *ps = src; 69 const u32 *pi; 70 71 - data_port = (volatile unsigned short *)port; 72 - 73 if(((unsigned long)src) & 0x2) { 74 - *data_port = *ps++; 75 count--; 76 } 77 pi = (const u32 *)ps; ··· 69 u32 w; 70 71 w = *pi++; 72 - *data_port = (w >> 16); 73 - *data_port = w; 74 count -= 2; 75 } 76 ps = (const u16 *)pi; 77 if(count) 78 - *data_port = *ps; 79 80 /* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */ 81 }
··· 28 #define __ide_mm_outsw __ide_outsw 29 #define __ide_mm_outsl __ide_outsl 30 31 + static inline void __ide_insw(void __iomem *port, void *dst, u32 count) 32 { 33 /* unsigned long end = (unsigned long)dst + (count << 1); */ /* P3 */ 34 u16 *ps = dst; 35 u32 *pi; 36 37 if(((unsigned long)ps) & 0x2) { 38 + *ps++ = __raw_readw(port); 39 count--; 40 } 41 pi = (u32 *)ps; 42 while(count >= 2) { 43 u32 w; 44 45 + w = __raw_readw(port) << 16; 46 + w |= __raw_readw(port); 47 *pi++ = w; 48 count -= 2; 49 } 50 ps = (u16 *)pi; 51 if(count) 52 + *ps++ = __raw_readw(port); 53 54 /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */ 55 } 56 57 + static inline void __ide_outsw(void __iomem *port, const void *src, u32 count) 58 { 59 /* unsigned long end = (unsigned long)src + (count << 1); */ 60 const u16 *ps = src; 61 const u32 *pi; 62 63 if(((unsigned long)src) & 0x2) { 64 + __raw_writew(*ps++, port); 65 count--; 66 } 67 pi = (const u32 *)ps; ··· 79 u32 w; 80 81 w = *pi++; 82 + __raw_writew((w >> 16), port); 83 + __raw_writew(w, port); 84 count -= 2; 85 } 86 ps = (const u16 *)pi; 87 if(count) 88 + __raw_writew(*ps, port); 89 90 /* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */ 91 }