hardware.h 2.0 KB
Newer Older
1
/*
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA  02110-1301, USA.
18 19 20 21 22 23 24
 */

#ifndef __ASM_ARCH_MXC_HARDWARE_H__
#define __ASM_ARCH_MXC_HARDWARE_H__

#include <asm/sizes.h>

25 26 27 28 29 30 31 32 33
#ifdef __ASSEMBLER__
#define IOMEM(addr)	(addr)
#else
#define IOMEM(addr)	((void __force __iomem *)(addr))
#endif

#define IMX_IO_P2V_MODULE(addr, module)					\
	(((addr) - module ## _BASE_ADDR) < module ## _SIZE ?		\
	 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
34

35 36 37 38
#ifdef CONFIG_ARCH_MX5
#include <mach/mx51.h>
#endif

39
#ifdef CONFIG_ARCH_MX3
40 41 42
#include <mach/mx3x.h>
#include <mach/mx31.h>
#include <mach/mx35.h>
43
#endif
44

45
#ifdef CONFIG_ARCH_MX2
46 47 48 49
# include <mach/mx2x.h>
# ifdef CONFIG_MACH_MX21
#  include <mach/mx21.h>
# endif
50
# ifdef CONFIG_MACH_MX27
51
#  include <mach/mx27.h>
52
# endif
53 54
#endif

P
Paulius Zaleckas 已提交
55 56 57 58
#ifdef CONFIG_ARCH_MX1
# include <mach/mx1.h>
#endif

S
Sascha Hauer 已提交
59 60 61 62
#ifdef CONFIG_ARCH_MX25
# include <mach/mx25.h>
#endif

63 64 65 66
#ifdef CONFIG_ARCH_MXC91231
# include <mach/mxc91231.h>
#endif

67
#include <mach/mxc.h>
68

69 70 71 72 73 74 75
#define imx_map_entry(soc, name, _type)	{				\
	.virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR),	\
	.pfn = __phys_to_pfn(soc ## _ ## name ## _BASE_ADDR),		\
	.length = soc ## _ ## name ## _SIZE,				\
	.type = _type,							\
}

76
#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */