1 /* Copyright (C) 2013 Jonas Jensen <jonas.jensen@gmail.com>
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License,
5 * or (at your option) any later version. */
8 #include <linux/init.h>
10 #include <asm/mach/map.h>
12 #include <mach/hardware.h>
14 /* Page table mapping for I/O region */
15 static struct map_desc moxart_io_desc
[] __initdata
= {
17 .virtual = IO_ADDRESS(MOXART_APB_DMA_BASE
),
18 .pfn
= __phys_to_pfn(MOXART_APB_DMA_BASE
),
22 .virtual = IO_ADDRESS(MOXART_MMC_BASE
),
23 .pfn
= __phys_to_pfn(MOXART_MMC_BASE
),
27 .virtual = IO_ADDRESS(MOXART_TIMER_BASE
),
28 .pfn
= __phys_to_pfn(MOXART_TIMER_BASE
),
32 /*apparently, RTC is handled using PMU base */
33 /*.virtual = IO_ADDRESS(MOXART_RTC_BASE),
34 .pfn = __phys_to_pfn(MOXART_RTC_BASE),
38 .virtual = IO_ADDRESS(MOXART_PMU_BASE
),
39 .pfn
= __phys_to_pfn(MOXART_PMU_BASE
),
43 .virtual = IO_ADDRESS(MOXART_GPIO_BASE
),
44 .pfn
= __phys_to_pfn(MOXART_GPIO_BASE
),
48 .virtual = IO_ADDRESS(MOXART_UART1_BASE
),
49 .pfn
= __phys_to_pfn(MOXART_UART1_BASE
),
53 .virtual = IO_ADDRESS(MOXART_UART2_BASE
),
54 .pfn
= __phys_to_pfn(MOXART_UART2_BASE
),
58 .virtual = IO_ADDRESS(MOXART_INTERRUPT_BASE
),
59 .pfn
= __phys_to_pfn(MOXART_INTERRUPT_BASE
),
63 .virtual = IO_ADDRESS(MOXART_FTMAC1_BASE
),
64 .pfn
= __phys_to_pfn(MOXART_FTMAC1_BASE
),
68 .virtual = IO_ADDRESS(MOXART_FTMAC2_BASE
),
69 .pfn
= __phys_to_pfn(MOXART_FTMAC2_BASE
),
73 .virtual = IO_ADDRESS(MOXART_WATCHDOG_BASE
),
74 .pfn
= __phys_to_pfn(MOXART_WATCHDOG_BASE
),
78 .virtual = IO_ADDRESS(MOXART_FLASH_BASE
),
79 .pfn
= __phys_to_pfn(MOXART_FLASH_BASE
),
85 void __init
moxart_map_io(void)
87 iotable_init(moxart_io_desc
, ARRAY_SIZE(moxart_io_desc
));