aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:23 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:23 -0400
commitf94116aeec7a299640dd692128e1d22178affa8d (patch)
treee73b4ec980f50d3f4aaaa50f58bfc9607507e037
parent09a3e79187c56842d509430267ece5b82216baee (diff)
ide: cleanup <asm-m68k/ide.h>
* Remove superfluous <asm/macints.h> include. * No need to re-define in/out*() macros as they are no longer used by m68k host drivers. * readl() and writel() are not used by core IDE code. * Use raw_*_swapw() directly in {falcon,q40}ide.c and remove {in,out}sw_swapw() macros. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--arch/m68k/include/asm/ide.h34
-rw-r--r--drivers/ide/falconide.c4
-rw-r--r--drivers/ide/q40ide.c4
3 files changed, 4 insertions, 38 deletions
diff --git a/arch/m68k/include/asm/ide.h b/arch/m68k/include/asm/ide.h
index 4e6e77759f88..3958726664ba 100644
--- a/arch/m68k/include/asm/ide.h
+++ b/arch/m68k/include/asm/ide.h
@@ -30,62 +30,28 @@
30#define _M68K_IDE_H 30#define _M68K_IDE_H
31 31
32#ifdef __KERNEL__ 32#ifdef __KERNEL__
33
34
35#include <asm/setup.h> 33#include <asm/setup.h>
36#include <asm/io.h> 34#include <asm/io.h>
37#include <asm/irq.h> 35#include <asm/irq.h>
38 36
39#ifdef CONFIG_MAC
40#include <asm/macints.h>
41#endif
42
43/* 37/*
44 * Get rid of defs from io.h - ide has its private and conflicting versions 38 * Get rid of defs from io.h - ide has its private and conflicting versions
45 * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we 39 * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
46 * always use the `raw' MMIO versions 40 * always use the `raw' MMIO versions
47 */ 41 */
48#undef inb
49#undef inw
50#undef insw
51#undef inl
52#undef insl
53#undef outb
54#undef outw
55#undef outsw
56#undef outl
57#undef outsl
58#undef readb 42#undef readb
59#undef readw 43#undef readw
60#undef readl
61#undef writeb 44#undef writeb
62#undef writew 45#undef writew
63#undef writel
64 46
65#define inb in_8
66#define inw in_be16
67#define insw(port, addr, n) raw_insw((u16 *)port, addr, n)
68#define inl in_be32
69#define insl(port, addr, n) raw_insl((u32 *)port, addr, n)
70#define outb(val, port) out_8(port, val)
71#define outw(val, port) out_be16(port, val)
72#define outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
73#define outl(val, port) out_be32(port, val)
74#define outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
75#define readb in_8 47#define readb in_8
76#define readw in_be16 48#define readw in_be16
77#define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n) 49#define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n)
78#define readl in_be32
79#define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n) 50#define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n)
80#define writeb(val, port) out_8(port, val) 51#define writeb(val, port) out_8(port, val)
81#define writew(val, port) out_be16(port, val) 52#define writew(val, port) out_be16(port, val)
82#define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n) 53#define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
83#define writel(val, port) out_be32(port, val)
84#define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n) 54#define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
85#if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
86#define insw_swapw(port, addr, n) raw_insw_swapw((u16 *)port, addr, n)
87#define outsw_swapw(port, addr, n) raw_outsw_swapw((u16 *)port, addr, n)
88#endif
89 55
90#endif /* __KERNEL__ */ 56#endif /* __KERNEL__ */
91#endif /* _M68K_IDE_H */ 57#endif /* _M68K_IDE_H */
diff --git a/drivers/ide/falconide.c b/drivers/ide/falconide.c
index 27a569520743..bb0c86e976e4 100644
--- a/drivers/ide/falconide.c
+++ b/drivers/ide/falconide.c
@@ -70,7 +70,7 @@ static void falconide_input_data(ide_drive_t *drive, struct request *rq,
70 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) 70 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
71 return insw(data_addr, buf, (len + 1) / 2); 71 return insw(data_addr, buf, (len + 1) / 2);
72 72
73 insw_swapw(data_addr, buf, (len + 1) / 2); 73 raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
74} 74}
75 75
76static void falconide_output_data(ide_drive_t *drive, struct request *rq, 76static void falconide_output_data(ide_drive_t *drive, struct request *rq,
@@ -81,7 +81,7 @@ static void falconide_output_data(ide_drive_t *drive, struct request *rq,
81 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) 81 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
82 return outsw(data_addr, buf, (len + 1) / 2); 82 return outsw(data_addr, buf, (len + 1) / 2);
83 83
84 outsw_swapw(data_addr, buf, (len + 1) / 2); 84 raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
85} 85}
86 86
87/* Atari has a byte-swapped IDE interface */ 87/* Atari has a byte-swapped IDE interface */
diff --git a/drivers/ide/q40ide.c b/drivers/ide/q40ide.c
index fa8922ef3c65..ebd576df2d84 100644
--- a/drivers/ide/q40ide.c
+++ b/drivers/ide/q40ide.c
@@ -80,7 +80,7 @@ static void q40ide_input_data(ide_drive_t *drive, struct request *rq,
80 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) 80 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
81 return insw(data_addr, buf, (len + 1) / 2); 81 return insw(data_addr, buf, (len + 1) / 2);
82 82
83 insw_swapw(data_addr, buf, (len + 1) / 2); 83 raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
84} 84}
85 85
86static void q40ide_output_data(ide_drive_t *drive, struct request *rq, 86static void q40ide_output_data(ide_drive_t *drive, struct request *rq,
@@ -91,7 +91,7 @@ static void q40ide_output_data(ide_drive_t *drive, struct request *rq,
91 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) 91 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
92 return outsw(data_addr, buf, (len + 1) / 2); 92 return outsw(data_addr, buf, (len + 1) / 2);
93 93
94 outsw_swapw(data_addr, buf, (len + 1) / 2); 94 raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
95} 95}
96 96
97/* Q40 has a byte-swapped IDE interface */ 97/* Q40 has a byte-swapped IDE interface */