2 * linux/include/asm-arm/arch-shark/io.h
7 * linux/include/asm-arm/arch-ebsa110/io.h
8 * Copyright (C) 1997,1998 Russell King
11 #ifndef __ASM_ARM_ARCH_IO_H
12 #define __ASM_ARM_ARCH_IO_H
14 #include <asm/hardware.h>
16 #define IO_SPACE_LIMIT 0xffffffff
19 * We use two different types of addressing - PC style addresses, and ARM
20 * addresses. PC style accesses the PC hardware with the normal PC IO
21 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
22 * and are translated to the start of IO.
24 #define __PORT_PCIO(x) (!((x) & 0x80000000))
26 #define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
29 static inline unsigned int __ioaddr (unsigned int port
) \
31 if (__PORT_PCIO(port
)) \
32 return (unsigned int)(PCIO_BASE
+ (port
)); \
34 return (unsigned int)(IO_BASE
+ (port
)); \
37 #define __mem_pci(addr) (addr)
40 * Translated address IO functions
42 * IO address has already been translated to a virtual address
45 (*(volatile unsigned char *)(p) = (v))
48 (*(volatile unsigned char *)(p))
51 (*(volatile unsigned long *)(p) = (v))
54 (*(volatile unsigned long *)(p))