]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: cleanup <asm-m68k/ide.h>
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:23 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:23 +0000 (12:46 +0100)
* 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>
arch/m68k/include/asm/ide.h
drivers/ide/falconide.c
drivers/ide/q40ide.c

index 4e6e77759f8841c174cb590b86391cc4e6453cf4..3958726664bad268c0e185a462f6859bfe3e67f5 100644 (file)
 #define _M68K_IDE_H
 
 #ifdef __KERNEL__
-
-
 #include <asm/setup.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#ifdef CONFIG_MAC
-#include <asm/macints.h>
-#endif
-
 /*
  * Get rid of defs from io.h - ide has its private and conflicting versions
  * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
  * always use the `raw' MMIO versions
  */
-#undef inb
-#undef inw
-#undef insw
-#undef inl
-#undef insl
-#undef outb
-#undef outw
-#undef outsw
-#undef outl
-#undef outsl
 #undef readb
 #undef readw
-#undef readl
 #undef writeb
 #undef writew
-#undef writel
 
-#define inb                            in_8
-#define inw                            in_be16
-#define insw(port, addr, n)            raw_insw((u16 *)port, addr, n)
-#define inl                            in_be32
-#define insl(port, addr, n)            raw_insl((u32 *)port, addr, n)
-#define outb(val, port)                        out_8(port, val)
-#define outw(val, port)                        out_be16(port, val)
-#define outsw(port, addr, n)           raw_outsw((u16 *)port, addr, n)
-#define outl(val, port)                        out_be32(port, val)
-#define outsl(port, addr, n)           raw_outsl((u32 *)port, addr, n)
 #define readb                          in_8
 #define readw                          in_be16
 #define __ide_mm_insw(port, addr, n)   raw_insw((u16 *)port, addr, n)
-#define readl                          in_be32
 #define __ide_mm_insl(port, addr, n)   raw_insl((u32 *)port, addr, n)
 #define writeb(val, port)              out_8(port, val)
 #define writew(val, port)              out_be16(port, val)
 #define __ide_mm_outsw(port, addr, n)  raw_outsw((u16 *)port, addr, n)
-#define writel(val, port)              out_be32(port, val)
 #define __ide_mm_outsl(port, addr, n)  raw_outsl((u32 *)port, addr, n)
-#if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
-#define insw_swapw(port, addr, n)      raw_insw_swapw((u16 *)port, addr, n)
-#define outsw_swapw(port, addr, n)     raw_outsw_swapw((u16 *)port, addr, n)
-#endif
 
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */
index 27a56952074369e1538af4964f7e232d884d90e4..bb0c86e976e4345ddc2dc6429629e89962513735 100644 (file)
@@ -70,7 +70,7 @@ static void falconide_input_data(ide_drive_t *drive, struct request *rq,
        if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
                return insw(data_addr, buf, (len + 1) / 2);
 
-       insw_swapw(data_addr, buf, (len + 1) / 2);
+       raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
 
 static 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,
        if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
                return outsw(data_addr, buf, (len + 1) / 2);
 
-       outsw_swapw(data_addr, buf, (len + 1) / 2);
+       raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
 
 /* Atari has a byte-swapped IDE interface */
index fa8922ef3c6502dcdf440c8998a7516e5444297d..ebd576df2d84ff58019ae795b75a34b7836359a4 100644 (file)
@@ -80,7 +80,7 @@ static void q40ide_input_data(ide_drive_t *drive, struct request *rq,
        if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
                return insw(data_addr, buf, (len + 1) / 2);
 
-       insw_swapw(data_addr, buf, (len + 1) / 2);
+       raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
 
 static 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,
        if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
                return outsw(data_addr, buf, (len + 1) / 2);
 
-       outsw_swapw(data_addr, buf, (len + 1) / 2);
+       raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
 
 /* Q40 has a byte-swapped IDE interface */