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