2 * linux/include/asm-arm/arch-omap/io.h
4 * Copied from linux/include/asm-arm/arch-sa1100/io.h
5 * Copyright (C) 1997-1999 Russell King
8 * 06-12-1997 RMK Created.
9 * 07-04-1999 RMK Major cleanup
11 #ifndef __ASM_ARM_ARCH_IO_H
12 #define __ASM_ARM_ARCH_IO_H
14 #define IO_SPACE_LIMIT 0xffffffff
17 * We don't actually have real ISA nor PCI buses, but there is so many
18 * drivers out there that might just work if we fake them...
20 #define __io(a) (PCIO_BASE + (a))
21 #define __mem_pci(a) ((unsigned long)(a))
22 #define __mem_isa(a) ((unsigned long)(a))
25 * Functions to access the OMAP IO region
27 * NOTE: - Use omap_read/write[bwl] for physical register addresses
28 * - Use __raw_read/write[bwl]() for virtual register addresses
29 * - Use IO_ADDRESS(phys_addr) to convert registers to virtual addresses
30 * - DO NOT use hardcoded virtual addresses to allow changing the
31 * IO address space again if needed
33 #define omap_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
34 #define omap_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
35 #define omap_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
37 #define omap_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
38 #define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
39 #define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))