2 * arch/arm/mach-tegra/include/mach/io.h
4 * Copyright (C) 2010 Google, Inc.
7 * Colin Cross <ccross@google.com>
8 * Erik Gilling <konkers@google.com>
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.
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.
21 #ifndef __MACH_TEGRA_IO_H
22 #define __MACH_TEGRA_IO_H
24 #define IO_SPACE_LIMIT 0xffff
28 #ifdef CONFIG_TEGRA_PCI
29 extern void __iomem
*tegra_pcie_io_base
;
31 static inline void __iomem
*__io(unsigned long addr
)
33 return tegra_pcie_io_base
+ (addr
& IO_SPACE_LIMIT
);
36 static inline void __iomem
*__io(unsigned long addr
)
38 return (void __iomem
*)addr
;
42 #define __io(a) __io(a)