Pull kmalloc into release branch
[pandora-kernel.git] / arch / arm / mach-omap2 / io.c
1 /*
2  * linux/arch/arm/mach-omap2/io.c
3  *
4  * OMAP2 I/O mapping code
5  *
6  * Copyright (C) 2005 Nokia Corporation
7  * Author: Juha Yrjölä <juha.yrjola@nokia.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  */
13
14 #include <linux/module.h>
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17
18 #include <asm/tlb.h>
19 #include <asm/io.h>
20
21 #include <asm/mach/map.h>
22
23 #include <asm/arch/mux.h>
24 #include <asm/arch/omapfb.h>
25
26 extern void omap_sram_init(void);
27 extern int omap2_clk_init(void);
28 extern void omap2_check_revision(void);
29
30 /*
31  * The machine specific code may provide the extra mapping besides the
32  * default mapping provided here.
33  */
34 static struct map_desc omap2_io_desc[] __initdata = {
35         {
36                 .virtual        = L3_24XX_VIRT,
37                 .pfn            = __phys_to_pfn(L3_24XX_PHYS),
38                 .length         = L3_24XX_SIZE,
39                 .type           = MT_DEVICE
40         },
41         {
42                 .virtual        = L4_24XX_VIRT,
43                 .pfn            = __phys_to_pfn(L4_24XX_PHYS),
44                 .length         = L4_24XX_SIZE,
45                 .type           = MT_DEVICE
46         }
47 };
48
49 void __init omap2_map_common_io(void)
50 {
51         iotable_init(omap2_io_desc, ARRAY_SIZE(omap2_io_desc));
52
53         /* Normally devicemaps_init() would flush caches and tlb after
54          * mdesc->map_io(), but we must also do it here because of the CPU
55          * revision check below.
56          */
57         local_flush_tlb_all();
58         flush_cache_all();
59
60         omap2_check_revision();
61         omap_sram_init();
62         omapfb_reserve_mem();
63 }
64
65 void __init omap2_init_common_hw(void)
66 {
67         omap2_mux_init();
68         omap2_clk_init();
69 }