]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] M68k update (part 24)
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 23 Jul 2002 13:22:44 +0000 (06:22 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 23 Jul 2002 13:22:44 +0000 (06:22 -0700)
M68k I/O core updates
 - Use memory mapped I/O access routines for non-ISA/PCI/PCMCIA m68k devices
 - Don't use writel() and friends on m68k memory mapped I/O
 - Fix typo in definition of writew()
 - Add missing definitions for {in,out}_le{16,32}()

drivers/net/8390.h
drivers/scsi/mac_esp.c
include/asm-m68k/io.h
include/asm-m68k/raw_io.h

index 1a266a1611e1f5b14c35809bc5386dfdfcba9d0f..d201f13a463777b300f6ee011302b2fa5c3c6681 100644 (file)
@@ -106,13 +106,24 @@ struct ei_device {
 
 /*
  *     Only generate indirect loads given a machine that needs them.
+ *      - removed AMIGA_PCMCIA from this list, handled as ISA io now
  */
  
-#if defined(CONFIG_MAC) || defined(CONFIG_AMIGA_PCMCIA) || \
+#if defined(CONFIG_MAC) ||  \
     defined(CONFIG_ARIADNE2) || defined(CONFIG_ARIADNE2_MODULE) || \
     defined(CONFIG_HYDRA) || defined(CONFIG_HYDRA_MODULE) || \
     defined(CONFIG_ARM_ETHERH) || defined(CONFIG_ARM_ETHERH_MODULE)
 #define EI_SHIFT(x)    (ei_local->reg_offset[x])
+#undef inb
+#undef inb_p
+#undef outb
+#undef outb_p
+
+#define inb(port)   in_8(port)
+#define outb(val,port)  out_8(port,val)
+#define inb_p(port)   in_8(port)
+#define outb_p(val,port)  out_8(port,val)
+
 #else
 #define EI_SHIFT(x)    (x)
 #endif
index 83d61a72cfc90ac0a764ed901cf345283c8124a4..dcaa2dbe8c3f249aea55a1afdde0c73d87aa8c63 100644 (file)
@@ -360,14 +360,14 @@ int mac_esp_detect(Scsi_Host_Template * tpnt)
                        } else {
                                /* q950, 900, 700 */
                                quick = 1;
-                               writel(0x1d1, 0xf9800024);
+                               out_be32(0xf9800024, 0x1d1);
                                esp->dregs = (void *) 0xf9800024;
                        }
 
                } else { /* chipnum */
 
                        quick = 1;
-                       writel(0x1d1, 0xf9800028);
+                       out_be32(0xf9800028, 0x1d1);
                        esp->dregs = (void *) 0xf9800028;
 
                } /* chipnum == 0 */
@@ -377,7 +377,7 @@ int mac_esp_detect(Scsi_Host_Template * tpnt)
 
                /* Set the command buffer */
                esp->esp_command = (volatile unsigned char*) cmd_buffer;
-               esp->esp_command_dvma = (volatile unsigned char*) cmd_buffer;
+               esp->esp_command_dvma = (__u32) cmd_buffer;
 
                /* various functions */
                esp->dma_bytes_sent = &dma_bytes_sent;
index 50340f20e13551cb6dd1fcff54c47849fbeb88af..d6fb3074ab77621f2d34f05f24fd0bcf3cef7aa6 100644 (file)
@@ -240,7 +240,7 @@ static inline void isa_delay(void)
 #define readb   isa_readb
 #define readw   isa_readw
 #define writeb  isa_writeb
-#define writew  isa_writeb
+#define writew  isa_writew
 #endif /* CONFIG_ISA */
 
 #if defined(CONFIG_PCI)
index 4f4fe9572e811ccad3175448bda7c334236302c2..d794d0f2e557b07b9296313ed5c778ff4c5ba6f2 100644 (file)
     ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; })
 #define in_be32(addr) \
     ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; })
+#define in_le16(addr) \
+    ({ unsigned short __v = le16_to_cpu(*(volatile unsigned short *) (addr)); __v; })
+#define in_le32(addr) \
+    ({ unsigned int __v = le32_to_cpu(*(volatile unsigned int *) (addr)); __v; })
 
 #define out_8(addr,b) (void)((*(volatile unsigned char *) (addr)) = (b))
-#define out_be16(addr,b) (void)((*(volatile unsigned short *) (addr)) = (b))
-#define out_be32(addr,b) (void)((*(volatile unsigned int *) (addr)) = (b))
+#define out_be16(addr,w) (void)((*(volatile unsigned short *) (addr)) = (w))
+#define out_be32(addr,l) (void)((*(volatile unsigned int *) (addr)) = (l))
+#define out_le16(addr,w) (void)((*(volatile unsigned short *) (addr)) = cpu_to_le16(w))
+#define out_le32(addr,l) (void)((*(volatile unsigned int *) (addr)) = cpu_to_le32(l))
 
 #define raw_inb in_8
 #define raw_inw in_be16