Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 1 | /* |
| 2 | * DaVinci IO address definitions |
| 3 | * |
| 4 | * Copied from include/asm/arm/arch-omap/io.h |
| 5 | * |
| 6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under |
| 7 | * the terms of the GNU General Public License version 2. This program |
| 8 | * is licensed "as is" without any warranty of any kind, whether express |
| 9 | * or implied. |
| 10 | */ |
| 11 | #ifndef __ASM_ARCH_IO_H |
| 12 | #define __ASM_ARCH_IO_H |
| 13 | |
| 14 | #define IO_SPACE_LIMIT 0xffffffff |
| 15 | |
| 16 | /* |
| 17 | * ---------------------------------------------------------------------------- |
| 18 | * I/O mapping |
| 19 | * ---------------------------------------------------------------------------- |
| 20 | */ |
| 21 | #define IO_PHYS 0x01c00000 |
| 22 | #define IO_OFFSET 0xfd000000 /* Virtual IO = 0xfec00000 */ |
| 23 | #define IO_SIZE 0x00400000 |
| 24 | #define IO_VIRT (IO_PHYS + IO_OFFSET) |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 25 | #define io_v2p(va) ((va) - IO_OFFSET) |
Kevin Hilman | ac7643e | 2008-09-15 04:09:14 -0700 | [diff] [blame] | 26 | #define __IO_ADDRESS(x) ((x) + IO_OFFSET) |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 27 | |
| 28 | /* |
| 29 | * We don't actually have real ISA nor PCI buses, but there is so many |
| 30 | * drivers out there that might just work if we fake them... |
| 31 | */ |
Russell King | 0560cf5 | 2008-11-30 11:45:54 +0000 | [diff] [blame] | 32 | #define __io(a) __typesafe_io(a) |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 33 | #define __mem_pci(a) (a) |
| 34 | #define __mem_isa(a) (a) |
| 35 | |
Kevin Hilman | ac7643e | 2008-09-15 04:09:14 -0700 | [diff] [blame] | 36 | #define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa)) |
| 37 | |
| 38 | #ifdef __ASSEMBLER__ |
| 39 | #define IOMEM(x) x |
| 40 | #else |
| 41 | #define IOMEM(x) ((void __force __iomem *)(x)) |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 42 | |
Kevin Hilman | f5c122d | 2009-04-14 07:04:16 -0500 | [diff] [blame] | 43 | #define __arch_ioremap(p, s, t) davinci_ioremap(p, s, t) |
| 44 | #define __arch_iounmap(v) davinci_iounmap(v) |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 45 | |
Kevin Hilman | f5c122d | 2009-04-14 07:04:16 -0500 | [diff] [blame] | 46 | void __iomem *davinci_ioremap(unsigned long phys, size_t size, |
| 47 | unsigned int type); |
| 48 | void davinci_iounmap(volatile void __iomem *addr); |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 49 | |
| 50 | #endif /* __ASSEMBLER__ */ |
| 51 | #endif /* __ASM_ARCH_IO_H */ |