blob: 2c2cd284bb6ad818f7a59cc0a51dd159db0b9a36 [file] [log] [blame]
Paulius Zaleckas59d3a192009-03-26 10:06:08 +02001/*
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 */
20static struct map_desc gemini_io_desc[] __initdata = {
21 {
Arnd Bergmann662146b2013-01-04 13:38:03 +000022 .virtual = (unsigned long)IO_ADDRESS(GEMINI_GLOBAL_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020023 .pfn =__phys_to_pfn(GEMINI_GLOBAL_BASE),
24 .length = SZ_512K,
25 .type = MT_DEVICE,
26 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000027 .virtual = (unsigned long)IO_ADDRESS(GEMINI_UART_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020028 .pfn = __phys_to_pfn(GEMINI_UART_BASE),
29 .length = SZ_512K,
30 .type = MT_DEVICE,
31 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000032 .virtual = (unsigned long)IO_ADDRESS(GEMINI_TIMER_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020033 .pfn = __phys_to_pfn(GEMINI_TIMER_BASE),
34 .length = SZ_512K,
35 .type = MT_DEVICE,
36 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000037 .virtual = (unsigned long)IO_ADDRESS(GEMINI_INTERRUPT_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020038 .pfn = __phys_to_pfn(GEMINI_INTERRUPT_BASE),
39 .length = SZ_512K,
40 .type = MT_DEVICE,
41 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000042 .virtual = (unsigned long)IO_ADDRESS(GEMINI_POWER_CTRL_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020043 .pfn = __phys_to_pfn(GEMINI_POWER_CTRL_BASE),
44 .length = SZ_512K,
45 .type = MT_DEVICE,
46 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000047 .virtual = (unsigned long)IO_ADDRESS(GEMINI_GPIO_BASE(0)),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020048 .pfn = __phys_to_pfn(GEMINI_GPIO_BASE(0)),
49 .length = SZ_512K,
50 .type = MT_DEVICE,
51 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000052 .virtual = (unsigned long)IO_ADDRESS(GEMINI_GPIO_BASE(1)),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020053 .pfn = __phys_to_pfn(GEMINI_GPIO_BASE(1)),
54 .length = SZ_512K,
55 .type = MT_DEVICE,
56 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000057 .virtual = (unsigned long)IO_ADDRESS(GEMINI_GPIO_BASE(2)),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020058 .pfn = __phys_to_pfn(GEMINI_GPIO_BASE(2)),
59 .length = SZ_512K,
60 .type = MT_DEVICE,
61 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000062 .virtual = (unsigned long)IO_ADDRESS(GEMINI_FLASH_CTRL_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020063 .pfn = __phys_to_pfn(GEMINI_FLASH_CTRL_BASE),
64 .length = SZ_512K,
65 .type = MT_DEVICE,
66 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000067 .virtual = (unsigned long)IO_ADDRESS(GEMINI_DRAM_CTRL_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020068 .pfn = __phys_to_pfn(GEMINI_DRAM_CTRL_BASE),
69 .length = SZ_512K,
70 .type = MT_DEVICE,
71 }, {
Arnd Bergmann662146b2013-01-04 13:38:03 +000072 .virtual = (unsigned long)IO_ADDRESS(GEMINI_GENERAL_DMA_BASE),
Paulius Zaleckas59d3a192009-03-26 10:06:08 +020073 .pfn = __phys_to_pfn(GEMINI_GENERAL_DMA_BASE),
74 .length = SZ_512K,
75 .type = MT_DEVICE,
76 },
77};
78
79void __init gemini_map_io(void)
80{
81 iotable_init(gemini_io_desc, ARRAY_SIZE(gemini_io_desc));
82}