Commit b1b26de5 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k update (part 24)

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}()
parent f0caf908
......@@ -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
......
......@@ -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;
......
......@@ -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)
......
......@@ -20,10 +20,16 @@
({ 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment