Subject: atari-ethernec: add missing bits in io.h, raw_io.h to make it compile again From: Michael Schmitz This patch is needed to make the Atari EtherNEC driver with the associated ROM port ISA I/O stuff compile again. Signed-off-by: Michael Schmitz Signed-off-by: Geert Uytterhoeven --- include/asm-m68k/io.h | 25 +++++++++++++++++++++++++ include/asm-m68k/raw_io.h | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h @@ -252,11 +252,22 @@ static inline u16 __iomem *isa_mtw(unsig #define isa_rom_inw(port) \ (ISA_SEX ? rom_in_be16(isa_itw(port)) \ : rom_in_le16(isa_itw(port))) +#define isa_rom_inl(port) \ + (ISA_SEX ? rom_in_be32(isa_itw(port)) \ + : rom_in_le32(isa_itw(port))) #define isa_rom_outb(val, port) rom_out_8(isa_itb(port), (val)) #define isa_rom_outw(val, port) \ (ISA_SEX ? rom_out_be16(isa_itw(port), (val)) \ : rom_out_le16(isa_itw(port), (val))) +#define isa_rom_outl(val, port) \ + (ISA_SEX ? rom_out_be32(isa_itw(port), (val)) \ + : rom_out_le32(isa_itw(port), (val))) + +#define isa_rom_readb(p) rom_in_8(isa_mtb((unsigned long)(p))) +#define isa_rom_readw(p) \ + (ISA_SEX ? rom_in_be16(isa_mtw((unsigned long)(p))) \ + : rom_in_le16(isa_mtw((unsigned long)(p)))) #define isa_rom_writeb(val, p) rom_out_8(isa_mtb((unsigned long)(p)), (val)) #define isa_rom_writew(val, p) \ @@ -325,12 +336,19 @@ static inline void isa_delay(void) (ISA_SEX ? raw_rom_insw(isa_itw(port), (u16 *)(buf), (nr)) : \ raw_rom_insw_swapw(isa_itw(port), (u16 *)(buf), (nr))) +#define isa_rom_insl(port, buf, nr) \ + (ISA_SEX ? raw_rom_insl(isa_itw(port), (u32 *)(buf), (nr)) : \ + raw_rom_insw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1)) + #define isa_rom_outsb(port, buf, nr) raw_rom_outsb(isa_itb(port), (u8 *)(buf), (nr)) #define isa_rom_outsw(port, buf, nr) \ (ISA_SEX ? raw_rom_outsw(isa_itw(port), (u16 *)(buf), (nr)) : \ raw_rom_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr))) +#define isa_rom_outsl(port, buf, nr) \ + (ISA_SEX ? raw_rom_outsl(isa_itw(port), (u32 *)(buf), (nr)) : \ + raw_rom_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1)) #endif #endif /* CONFIG_ISA */ @@ -430,8 +448,15 @@ static inline void isa_delay(void) #define insb isa_rom_insb #define insw isa_rom_insw +#define insl isa_rom_insl #define outsb isa_rom_outsb #define outsw isa_rom_outsw +#define outsl isa_rom_outsl + +#define readb isa_readb +#define readw isa_readw +#define writeb isa_writeb +#define writew isa_writew #endif #if !defined(CONFIG_ISA) && !defined(CONFIG_PCI) && !defined(CONFIG_ATARI_ROM_ISA) --- a/include/asm-m68k/raw_io.h +++ b/include/asm-m68k/raw_io.h @@ -436,6 +436,24 @@ static inline void raw_rom_outsw_swapw(v for (i = 0; i < nr; i++) rom_out_le16(port, *buf++); } + +static inline void raw_rom_insl(volatile u16 __iomem *port, u32 *buf, + unsigned int nr) +{ + unsigned int i; + + for (i = 0; i < nr; i++) + *buf++ = rom_in_be32(port); +} + +static inline void raw_rom_outsl(volatile u16 __iomem *port, const u32 *buf, + unsigned int nr) +{ + unsigned int i; + + for (i = 0; i < nr; i++) + rom_out_be32(port, *buf++); +} #endif /* CONFIG_ATARI_ROM_ISA */ #endif /* __KERNEL__ */