VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / asm-ppc / io.h
index 9cc9d5f..a893418 100644 (file)
@@ -30,6 +30,8 @@
 #include <asm/mpc8xx.h>
 #elif defined(CONFIG_8260)
 #include <asm/mpc8260.h>
+#elif defined(CONFIG_85xx)
+#include <asm/mpc85xx.h>
 #elif defined(CONFIG_APUS)
 #define _IO_BASE       0
 #define _ISA_MEM_BASE  0
@@ -138,18 +140,27 @@ extern __inline__ void name(unsigned int val, unsigned int port) \
                : : "r" (val), "r" (port + _IO_BASE));  \
 }
 
-__do_in_asm(inb, "lbzx")
 __do_out_asm(outb, "stbx")
 #ifdef CONFIG_APUS
+__do_in_asm(inb, "lbzx")
 __do_in_asm(inw, "lhz%U1%X1")
 __do_in_asm(inl, "lwz%U1%X1")
 __do_out_asm(outl,"stw%U0%X0")
 __do_out_asm(outw, "sth%U0%X0")
+#elif defined (CONFIG_8260_PCI9)
+/* in asm cannot be defined if PCI9 workaround is used */
+#define inb(port)              in_8((u8 *)((port)+_IO_BASE))
+#define inw(port)              in_le16((u16 *)((port)+_IO_BASE))
+#define inl(port)              in_le32((u32 *)((port)+_IO_BASE))
+__do_out_asm(outw, "sthbrx")
+__do_out_asm(outl, "stwbrx")
 #else
+__do_in_asm(inb, "lbzx")
 __do_in_asm(inw, "lhbrx")
 __do_in_asm(inl, "lwbrx")
 __do_out_asm(outw, "sthbrx")
 __do_out_asm(outl, "stwbrx")
+
 #endif
 
 #define inb_p(port)            inb((port))
@@ -226,7 +237,7 @@ extern inline void * bus_to_virt(unsigned long address)
 {
 #ifndef CONFIG_APUS
         if (address == 0)
-               return 0;
+               return NULL;
         return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE);
 #else
        return (void*) mm_ptov (address);
@@ -389,4 +400,9 @@ static inline int isa_check_signature(unsigned long io_addr,
 }
 
 #endif /* _PPC_IO_H */
+
+#ifdef CONFIG_8260_PCI9
+#include <asm/mpc8260_pci9.h>
+#endif
+
 #endif /* __KERNEL__ */