code style scripts/checkpatch.pl (linux-3.9-rc1) formatting
[linux-2.6.32.60-moxart.git] / arch / arm / mach-moxart / mm.c
blob91e0630ab0e9db61054dc497168cbb5d8d048946
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. */
7 #include <linux/mm.h>
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),
19 .length = SZ_4K,
20 .type = MT_DEVICE,
21 }, {
22 .virtual = IO_ADDRESS(MOXART_MMC_BASE),
23 .pfn = __phys_to_pfn(MOXART_MMC_BASE),
24 .length = SZ_4K,
25 .type = MT_DEVICE,
26 }, {
27 .virtual = IO_ADDRESS(MOXART_TIMER_BASE),
28 .pfn = __phys_to_pfn(MOXART_TIMER_BASE),
29 .length = SZ_4K,
30 .type = MT_DEVICE,
31 }, {
32 /*apparently, RTC is handled using PMU base */
33 /*.virtual = IO_ADDRESS(MOXART_RTC_BASE),
34 .pfn = __phys_to_pfn(MOXART_RTC_BASE),
35 .length = SZ_4K,
36 .type = MT_DEVICE,
37 }, {*/
38 .virtual = IO_ADDRESS(MOXART_PMU_BASE),
39 .pfn = __phys_to_pfn(MOXART_PMU_BASE),
40 .length = SZ_4K,
41 .type = MT_DEVICE,
42 }, {
43 .virtual = IO_ADDRESS(MOXART_GPIO_BASE),
44 .pfn = __phys_to_pfn(MOXART_GPIO_BASE),
45 .length = SZ_4K,
46 .type = MT_DEVICE,
47 }, {
48 .virtual = IO_ADDRESS(MOXART_UART1_BASE),
49 .pfn = __phys_to_pfn(MOXART_UART1_BASE),
50 .length = SZ_4K,
51 .type = MT_DEVICE,
52 }, {
53 .virtual = IO_ADDRESS(MOXART_UART2_BASE),
54 .pfn = __phys_to_pfn(MOXART_UART2_BASE),
55 .length = SZ_4K,
56 .type = MT_DEVICE,
57 }, {
58 .virtual = IO_ADDRESS(MOXART_INTERRUPT_BASE),
59 .pfn = __phys_to_pfn(MOXART_INTERRUPT_BASE),
60 .length = SZ_4K,
61 .type = MT_DEVICE,
62 }, {
63 .virtual = IO_ADDRESS(MOXART_FTMAC1_BASE),
64 .pfn = __phys_to_pfn(MOXART_FTMAC1_BASE),
65 .length = SZ_4K,
66 .type = MT_DEVICE,
67 }, {
68 .virtual = IO_ADDRESS(MOXART_FTMAC2_BASE),
69 .pfn = __phys_to_pfn(MOXART_FTMAC2_BASE),
70 .length = SZ_4K,
71 .type = MT_DEVICE,
72 }, {
73 .virtual = IO_ADDRESS(MOXART_WATCHDOG_BASE),
74 .pfn = __phys_to_pfn(MOXART_WATCHDOG_BASE),
75 .length = SZ_4K,
76 .type = MT_DEVICE,
77 }, {
78 .virtual = IO_ADDRESS(MOXART_FLASH_BASE),
79 .pfn = __phys_to_pfn(MOXART_FLASH_BASE),
80 .length = SZ_16M,
81 .type = MT_DEVICE,
85 void __init moxart_map_io(void)
87 iotable_init(moxart_io_desc, ARRAY_SIZE(moxart_io_desc));