2 * linux/arch/arm/mach-omap2/io.c
4 * OMAP2 I/O mapping code
6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
8 * Updated map desc to add 2430 support : <x0khasim@ti.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #include <linux/module.h>
16 #include <linux/kernel.h>
17 #include <linux/init.h>
22 #include <asm/mach/map.h>
24 #include <asm/arch/mux.h>
25 #include <asm/arch/omapfb.h>
27 extern void omap_sram_init(void);
28 extern int omap2_clk_init(void);
29 extern void omap2_check_revision(void);
30 extern void omap2_init_memory(void);
31 extern void gpmc_init(void);
32 extern void omapfb_reserve_sdram(void);
35 * The machine specific code may provide the extra mapping besides the
36 * default mapping provided here.
38 static struct map_desc omap2_io_desc[] __initdata = {
40 .virtual = L3_24XX_VIRT,
41 .pfn = __phys_to_pfn(L3_24XX_PHYS),
42 .length = L3_24XX_SIZE,
45 #ifdef CONFIG_ARCH_OMAP2430
47 .virtual = L4_WK_243X_VIRT,
48 .pfn = __phys_to_pfn(L4_WK_243X_PHYS),
49 .length = L4_WK_243X_SIZE,
53 .virtual = OMAP243X_GPMC_VIRT,
54 .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS),
55 .length = OMAP243X_GPMC_SIZE,
59 .virtual = OMAP243X_SDRC_VIRT,
60 .pfn = __phys_to_pfn(OMAP243X_SDRC_PHYS),
61 .length = OMAP243X_SDRC_SIZE,
65 .virtual = OMAP243X_SMS_VIRT,
66 .pfn = __phys_to_pfn(OMAP243X_SMS_PHYS),
67 .length = OMAP243X_SMS_SIZE,
72 .virtual = DSP_MEM_24XX_VIRT,
73 .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS),
74 .length = DSP_MEM_24XX_SIZE,
77 #ifdef CONFIG_ARCH_OMAP2420
79 .virtual = DSP_IPI_24XX_VIRT,
80 .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS),
81 .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)