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 #define IO_SPACE_LIMIT 0xffffffff
17 * We use two different types of addressing - PC style addresses, and ARM
18 * addresses. PC style accesses the PC hardware with the normal PC IO
19 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
20 * and are translated to the start of IO.
22 #define __PORT_PCIO(x) (!((x) & 0x80000000))
24 #define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
27 static inline unsigned int __ioaddr (unsigned int port
) \
29 if (__PORT_PCIO(port
)) \
30 return (unsigned int)(PCIO_BASE
+ (port
)); \
32 return (unsigned int)(IO_BASE
+ (port
)); \
35 #define __mem_pci(addr) (addr)
38 * Translated address IO functions
40 * IO address has already been translated to a virtual address
43 (*(volatile unsigned char *)(p) = (v))
46 (*(volatile unsigned char *)(p))
49 (*(volatile unsigned long *)(p) = (v))
52 (*(volatile unsigned long *)(p))