]>
Commit | Line | Data |
---|---|---|
59d3a193 PZ |
1 | /* |
2 | * Static mappings for Gemini | |
3 | * | |
4 | * Copyright (C) 2001-2006 Storlink, Corp. | |
5 | * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License, or | |
10 | * (at your option) any later version. | |
11 | */ | |
12 | #include <linux/mm.h> | |
13 | #include <linux/init.h> | |
14 | ||
15 | #include <asm/mach/map.h> | |
16 | ||
17 | #include <mach/hardware.h> | |
18 | ||
19 | /* Page table mapping for I/O region */ | |
20 | static struct map_desc gemini_io_desc[] __initdata = { | |
21 | { | |
662146b1 | 22 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_GLOBAL_BASE), |
59d3a193 PZ |
23 | .pfn =__phys_to_pfn(GEMINI_GLOBAL_BASE), |
24 | .length = SZ_512K, | |
25 | .type = MT_DEVICE, | |
26 | }, { | |
662146b1 | 27 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_UART_BASE), |
59d3a193 PZ |
28 | .pfn = __phys_to_pfn(GEMINI_UART_BASE), |
29 | .length = SZ_512K, | |
30 | .type = MT_DEVICE, | |
31 | }, { | |
662146b1 | 32 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_TIMER_BASE), |
59d3a193 PZ |
33 | .pfn = __phys_to_pfn(GEMINI_TIMER_BASE), |
34 | .length = SZ_512K, | |
35 | .type = MT_DEVICE, | |
36 | }, { | |
662146b1 | 37 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_INTERRUPT_BASE), |
59d3a193 PZ |
38 | .pfn = __phys_to_pfn(GEMINI_INTERRUPT_BASE), |
39 | .length = SZ_512K, | |
40 | .type = MT_DEVICE, | |
41 | }, { | |
662146b1 | 42 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_POWER_CTRL_BASE), |
59d3a193 PZ |
43 | .pfn = __phys_to_pfn(GEMINI_POWER_CTRL_BASE), |
44 | .length = SZ_512K, | |
45 | .type = MT_DEVICE, | |
46 | }, { | |
662146b1 | 47 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_GPIO_BASE(0)), |
59d3a193 PZ |
48 | .pfn = __phys_to_pfn(GEMINI_GPIO_BASE(0)), |
49 | .length = SZ_512K, | |
50 | .type = MT_DEVICE, | |
51 | }, { | |
662146b1 | 52 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_GPIO_BASE(1)), |
59d3a193 PZ |
53 | .pfn = __phys_to_pfn(GEMINI_GPIO_BASE(1)), |
54 | .length = SZ_512K, | |
55 | .type = MT_DEVICE, | |
56 | }, { | |
662146b1 | 57 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_GPIO_BASE(2)), |
59d3a193 PZ |
58 | .pfn = __phys_to_pfn(GEMINI_GPIO_BASE(2)), |
59 | .length = SZ_512K, | |
60 | .type = MT_DEVICE, | |
61 | }, { | |
662146b1 | 62 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_FLASH_CTRL_BASE), |
59d3a193 PZ |
63 | .pfn = __phys_to_pfn(GEMINI_FLASH_CTRL_BASE), |
64 | .length = SZ_512K, | |
65 | .type = MT_DEVICE, | |
66 | }, { | |
662146b1 | 67 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_DRAM_CTRL_BASE), |
59d3a193 PZ |
68 | .pfn = __phys_to_pfn(GEMINI_DRAM_CTRL_BASE), |
69 | .length = SZ_512K, | |
70 | .type = MT_DEVICE, | |
71 | }, { | |
662146b1 | 72 | .virtual = (unsigned long)IO_ADDRESS(GEMINI_GENERAL_DMA_BASE), |
59d3a193 PZ |
73 | .pfn = __phys_to_pfn(GEMINI_GENERAL_DMA_BASE), |
74 | .length = SZ_512K, | |
75 | .type = MT_DEVICE, | |
76 | }, | |
77 | }; | |
78 | ||
79 | void __init gemini_map_io(void) | |
80 | { | |
81 | iotable_init(gemini_io_desc, ARRAY_SIZE(gemini_io_desc)); | |
82 | } |