Merge branch 'lpc32xx/dts' of git://git.antcom.de/linux-2.6 into next/dt
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / arm / mach-tegra / include / mach / io.h
1 /*
2  * arch/arm/mach-tegra/include/mach/io.h
3  *
4  * Copyright (C) 2010 Google, Inc.
5  *
6  * Author:
7  *      Colin Cross <ccross@google.com>
8  *      Erik Gilling <konkers@google.com>
9  *
10  * This software is licensed under the terms of the GNU General Public
11  * License version 2, as published by the Free Software Foundation, and
12  * may be copied, distributed, and modified under those terms.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  */
20
21 #ifndef __MACH_TEGRA_IO_H
22 #define __MACH_TEGRA_IO_H
23
24 #define IO_SPACE_LIMIT 0xffff
25
26 #ifndef __ASSEMBLER__
27
28 #ifdef CONFIG_TEGRA_PCI
29 extern void __iomem *tegra_pcie_io_base;
30
31 static inline void __iomem *__io(unsigned long addr)
32 {
33         return tegra_pcie_io_base + (addr & IO_SPACE_LIMIT);
34 }
35 #else
36 static inline void __iomem *__io(unsigned long addr)
37 {
38         return (void __iomem *)addr;
39 }
40 #endif
41
42 #define __io(a)         __io(a)
43
44 #endif
45
46 #endif