Go to the documentation of this file.
20 #ifndef __ASM_ARCH_MXC_HARDWARE_H__
21 #define __ASM_ARCH_MXC_HARDWARE_H__
23 #include <asm/sizes.h>
25 #define addr_in_module(addr, mod) \
26 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
28 #define IMX_IO_P2V_MODULE(addr, module) \
29 (((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \
30 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
99 #define IMX_IO_P2V(x) ( \
100 (((x) & 0x80000000) >> 7) | \
102 (((x) & 0x50000000) >> 6) + \
103 (((x) & 0x0b000000) >> 4) + \
104 (((x) & 0x000fffff))))
106 #define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x))
123 #define imx_map_entry(soc, name, _type) { \
124 .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \
125 .pfn = __phys_to_pfn(soc ## _ ## name ## _BASE_ADDR), \
126 .length = soc ## _ ## name ## _SIZE, \
132 #define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))