2 * linux/arch/arm/mach-omap2/io.c
4 * OMAP2 I/O mapping code
6 * Copyright (C) 2005 Nokia Corporation
7 * Copyright (C) 2007 Texas Instruments
10 * Juha Yrjola <juha.yrjola@nokia.com>
11 * Syed Khasim <x0khasim@ti.com>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
18 #include <linux/module.h>
19 #include <linux/kernel.h>
20 #include <linux/init.h>
25 #include <asm/mach/map.h>
28 #include <mach/omapfb.h>
29 #include <mach/sram.h>
35 #include <mach/powerdomain.h>
37 #include "powerdomains.h"
39 #include <mach/clockdomain.h>
40 #include "clockdomains.h"
43 * The machine specific code may provide the extra mapping besides the
44 * default mapping provided here.
46 static struct map_desc omap2_io_desc[] __initdata = {
48 .virtual = L3_24XX_VIRT,
49 .pfn = __phys_to_pfn(L3_24XX_PHYS),
50 .length = L3_24XX_SIZE,
54 .virtual = L4_24XX_VIRT,
55 .pfn = __phys_to_pfn(L4_24XX_PHYS),
56 .length = L4_24XX_SIZE,
59 #ifdef CONFIG_ARCH_OMAP2430
61 .virtual = L4_WK_243X_VIRT,
62 .pfn = __phys_to_pfn(L4_WK_243X_PHYS),
63 .length = L4_WK_243X_SIZE,
67 .virtual = OMAP243X_GPMC_VIRT,
68 .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS),
69 .length = OMAP243X_GPMC_SIZE,
74 .virtual = DSP_MEM_24XX_VIRT,
75 .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS),
76 .length = DSP_MEM_24XX_SIZE,
80 .virtual = DSP_IPI_24XX_VIRT,
81 .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS),
82 .length = DSP_IPI_24XX_SIZE,
86 .virtual = DSP_MMU_24XX_VIRT,
87 .pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS),
88 .length = DSP_MMU_24XX_SIZE,
93 void __init omap2_map_common_io(void)
95 iotable_init(omap2_io_desc, ARRAY_SIZE(omap2_io_desc));
97 /* Normally devicemaps_init() would flush caches and tlb after
98 * mdesc->map_io(), but we must also do it here because of the CPU
99 * revision check below.
101 local_flush_tlb_all();
104 omap2_check_revision();
106 omapfb_reserve_sdram();
109 void __init omap2_init_common_hw(void)
112 pwrdm_init(powerdomains_omap);
113 clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
116 * Need to Fix this for 2430
118 #ifndef CONFIG_ARCH_OMAP2430