| 
					
				 | 
			
			
				@@ -144,3 +144,84 @@ extern int isa_sex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 static inline u8 __iomem *isa_itb(unsigned long addr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  switch(ISA_TYPE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_Q40 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_Q40: return (u8 __iomem *)Q40_ISA_IO_B(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_AMIGA_PCMCIA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_AG: return (u8 __iomem *)AG_ISA_IO_B(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    default: return NULL; /* avoid warnings, just in case */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static inline u16 __iomem *isa_itw(unsigned long addr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  switch(ISA_TYPE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_Q40 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_Q40: return (u16 __iomem *)Q40_ISA_IO_W(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_AMIGA_PCMCIA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_AG: return (u16 __iomem *)AG_ISA_IO_W(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    default: return NULL; /* avoid warnings, just in case */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static inline u32 __iomem *isa_itl(unsigned long addr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  switch(ISA_TYPE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_AMIGA_PCMCIA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_AG: return (u32 __iomem *)AG_ISA_IO_W(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    default: return 0; /* avoid warnings, just in case */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static inline u8 __iomem *isa_mtb(unsigned long addr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  switch(ISA_TYPE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_Q40 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_Q40: return (u8 __iomem *)Q40_ISA_MEM_B(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_AMIGA_PCMCIA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_AG: return (u8 __iomem *)addr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    default: return NULL; /* avoid warnings, just in case */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static inline u16 __iomem *isa_mtw(unsigned long addr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  switch(ISA_TYPE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_Q40 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_Q40: return (u16 __iomem *)Q40_ISA_MEM_W(addr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_AMIGA_PCMCIA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    case ISA_TYPE_AG: return (u16 __iomem *)addr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    default: return NULL; /* avoid warnings, just in case */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_inb(port)      in_8(isa_itb(port)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_inw(port)      (ISA_SEX ? in_be16(isa_itw(port)) : in_le16(isa_itw(port))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_inl(port)      (ISA_SEX ? in_be32(isa_itl(port)) : in_le32(isa_itl(port))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_outb(val,port) out_8(isa_itb(port),(val)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_outw(val,port) (ISA_SEX ? out_be16(isa_itw(port),(val)) : out_le16(isa_itw(port),(val))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_outl(val,port) (ISA_SEX ? out_be32(isa_itl(port),(val)) : out_le32(isa_itl(port),(val))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_readb(p)       in_8(isa_mtb((unsigned long)(p))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_readw(p)       \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	(ISA_SEX ? in_be16(isa_mtw((unsigned long)(p)))	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 : in_le16(isa_mtw((unsigned long)(p)))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_writeb(val,p)  out_8(isa_mtb((unsigned long)(p)),(val)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define isa_writew(val,p)  \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	(ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val))	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 : out_le16(isa_mtw((unsigned long)(p)),(val))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static inline void isa_delay(void) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  switch(ISA_TYPE) 
			 |