|
@@ -28,50 +28,40 @@
|
|
#define __ide_mm_outsw __ide_outsw
|
|
#define __ide_mm_outsw __ide_outsw
|
|
#define __ide_mm_outsl __ide_outsl
|
|
#define __ide_mm_outsl __ide_outsl
|
|
|
|
|
|
-static inline void __ide_insw(unsigned long port,
|
|
|
|
- void *dst,
|
|
|
|
- unsigned long count)
|
|
|
|
|
|
+static inline void __ide_insw(void __iomem *port, void *dst, u32 count)
|
|
{
|
|
{
|
|
- volatile unsigned short *data_port;
|
|
|
|
/* unsigned long end = (unsigned long)dst + (count << 1); */ /* P3 */
|
|
/* unsigned long end = (unsigned long)dst + (count << 1); */ /* P3 */
|
|
u16 *ps = dst;
|
|
u16 *ps = dst;
|
|
u32 *pi;
|
|
u32 *pi;
|
|
|
|
|
|
- data_port = (volatile unsigned short *)port;
|
|
|
|
-
|
|
|
|
if(((unsigned long)ps) & 0x2) {
|
|
if(((unsigned long)ps) & 0x2) {
|
|
- *ps++ = *data_port;
|
|
|
|
|
|
+ *ps++ = __raw_readw(port);
|
|
count--;
|
|
count--;
|
|
}
|
|
}
|
|
pi = (u32 *)ps;
|
|
pi = (u32 *)ps;
|
|
while(count >= 2) {
|
|
while(count >= 2) {
|
|
u32 w;
|
|
u32 w;
|
|
|
|
|
|
- w = (*data_port) << 16;
|
|
|
|
- w |= (*data_port);
|
|
|
|
|
|
+ w = __raw_readw(port) << 16;
|
|
|
|
+ w |= __raw_readw(port);
|
|
*pi++ = w;
|
|
*pi++ = w;
|
|
count -= 2;
|
|
count -= 2;
|
|
}
|
|
}
|
|
ps = (u16 *)pi;
|
|
ps = (u16 *)pi;
|
|
if(count)
|
|
if(count)
|
|
- *ps++ = *data_port;
|
|
|
|
|
|
+ *ps++ = __raw_readw(port);
|
|
|
|
|
|
/* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */
|
|
/* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */
|
|
}
|
|
}
|
|
|
|
|
|
-static inline void __ide_outsw(unsigned long port,
|
|
|
|
- const void *src,
|
|
|
|
- unsigned long count)
|
|
|
|
|
|
+static inline void __ide_outsw(void __iomem *port, const void *src, u32 count)
|
|
{
|
|
{
|
|
- volatile unsigned short *data_port;
|
|
|
|
/* unsigned long end = (unsigned long)src + (count << 1); */
|
|
/* unsigned long end = (unsigned long)src + (count << 1); */
|
|
const u16 *ps = src;
|
|
const u16 *ps = src;
|
|
const u32 *pi;
|
|
const u32 *pi;
|
|
|
|
|
|
- data_port = (volatile unsigned short *)port;
|
|
|
|
-
|
|
|
|
if(((unsigned long)src) & 0x2) {
|
|
if(((unsigned long)src) & 0x2) {
|
|
- *data_port = *ps++;
|
|
|
|
|
|
+ __raw_writew(*ps++, port);
|
|
count--;
|
|
count--;
|
|
}
|
|
}
|
|
pi = (const u32 *)ps;
|
|
pi = (const u32 *)ps;
|
|
@@ -79,13 +69,13 @@ static inline void __ide_outsw(unsigned long port,
|
|
u32 w;
|
|
u32 w;
|
|
|
|
|
|
w = *pi++;
|
|
w = *pi++;
|
|
- *data_port = (w >> 16);
|
|
|
|
- *data_port = w;
|
|
|
|
|
|
+ __raw_writew((w >> 16), port);
|
|
|
|
+ __raw_writew(w, port);
|
|
count -= 2;
|
|
count -= 2;
|
|
}
|
|
}
|
|
ps = (const u16 *)pi;
|
|
ps = (const u16 *)pi;
|
|
if(count)
|
|
if(count)
|
|
- *data_port = *ps;
|
|
|
|
|
|
+ __raw_writew(*ps, port);
|
|
|
|
|
|
/* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */
|
|
/* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */
|
|
}
|
|
}
|