[PATCH] w1: hotplug support.
[linux-2.6/verdex.git] / include / asm-arm / arch-shark / io.h
blob5e6ed0038b2b438667a35b1f4e60b3883e08c1e0
1 /*
2 * linux/include/asm-arm/arch-shark/io.h
4 * by Alexander Schulz
6 * derived from:
7 * linux/include/asm-arm/arch-ebsa110/io.h
8 * Copyright (C) 1997,1998 Russell King
9 */
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) \
28 { \
29 if (__PORT_PCIO(port)) \
30 return (unsigned int)(PCIO_BASE + (port)); \
31 else \
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
42 #define outb_t(v,p) \
43 (*(volatile unsigned char *)(p) = (v))
45 #define inb_t(p) \
46 (*(volatile unsigned char *)(p))
48 #define outl_t(v,p) \
49 (*(volatile unsigned long *)(p) = (v))
51 #define inl_t(p) \
52 (*(volatile unsigned long *)(p))
54 #endif