aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc/io.h')
-rw-r--r--include/asm-ppc/io.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index a4c411b753ef..ccf1a9bb2e43 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -26,17 +26,11 @@
26 26
27#if defined(CONFIG_4xx) 27#if defined(CONFIG_4xx)
28#include <asm/ibm4xx.h> 28#include <asm/ibm4xx.h>
29#elif defined(CONFIG_PPC_MPC52xx)
30#include <asm/mpc52xx.h>
31#elif defined(CONFIG_8xx) 29#elif defined(CONFIG_8xx)
32#include <asm/mpc8xx.h> 30#include <asm/mpc8xx.h>
33#elif defined(CONFIG_8260) 31#elif defined(CONFIG_8260)
34#include <asm/mpc8260.h> 32#include <asm/mpc8260.h>
35#elif defined(CONFIG_83xx) 33#elif defined(CONFIG_APUS) || !defined(CONFIG_PCI)
36#include <asm/mpc83xx.h>
37#elif defined(CONFIG_85xx)
38#include <asm/mpc85xx.h>
39#elif defined(CONFIG_APUS)
40#define _IO_BASE 0 34#define _IO_BASE 0
41#define _ISA_MEM_BASE 0 35#define _ISA_MEM_BASE 0
42#define PCI_DRAM_OFFSET 0 36#define PCI_DRAM_OFFSET 0
@@ -237,6 +231,14 @@ static inline void __raw_writel(__u32 b, volatile void __iomem *addr)
237#define insl(port, buf, nl) _insl_ns((port)+___IO_BASE, (buf), (nl)) 231#define insl(port, buf, nl) _insl_ns((port)+___IO_BASE, (buf), (nl))
238#define outsl(port, buf, nl) _outsl_ns((port)+___IO_BASE, (buf), (nl)) 232#define outsl(port, buf, nl) _outsl_ns((port)+___IO_BASE, (buf), (nl))
239 233
234#define readsb(a, b, n) _insb((a), (b), (n))
235#define readsw(a, b, n) _insw_ns((a), (b), (n))
236#define readsl(a, b, n) _insl_ns((a), (b), (n))
237#define writesb(a, b, n) _outsb((a),(b),(n))
238#define writesw(a, b, n) _outsw_ns((a),(b),(n))
239#define writesl(a, b, n) _outsl_ns((a),(b),(n))
240
241
240/* 242/*
241 * On powermacs and 8xx we will get a machine check exception 243 * On powermacs and 8xx we will get a machine check exception
242 * if we try to read data from a non-existent I/O port. Because 244 * if we try to read data from a non-existent I/O port. Because
@@ -327,12 +329,12 @@ __do_out_asm(outl, "stwbrx")
327#define inl_p(port) inl((port)) 329#define inl_p(port) inl((port))
328#define outl_p(val, port) outl((val), (port)) 330#define outl_p(val, port) outl((val), (port))
329 331
330extern void _insb(volatile u8 __iomem *port, void *buf, long count); 332extern void _insb(const volatile u8 __iomem *addr, void *buf, long count);
331extern void _outsb(volatile u8 __iomem *port, const void *buf, long count); 333extern void _outsb(volatile u8 __iomem *addr,const void *buf,long count);
332extern void _insw_ns(volatile u16 __iomem *port, void *buf, long count); 334extern void _insw_ns(const volatile u16 __iomem *addr, void *buf, long count);
333extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, long count); 335extern void _outsw_ns(volatile u16 __iomem *addr, const void *buf, long count);
334extern void _insl_ns(volatile u32 __iomem *port, void *buf, long count); 336extern void _insl_ns(const volatile u32 __iomem *addr, void *buf, long count);
335extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, long count); 337extern void _outsl_ns(volatile u32 __iomem *addr, const void *buf, long count);
336 338
337 339
338#define IO_SPACE_LIMIT ~0 340#define IO_SPACE_LIMIT ~0