]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap2/board-omap2evm.c
d00e502c77fc490b0301aa4615ebbf8fc3b55a7f
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-omap2evm.c
1 /*
2  * linux/arch/arm/mach-omap2/board-omap2evm.c
3  *
4  * Copyright (C) 2008 Mistral Solutions Pvt Ltd
5  *
6  * Modified from mach-omap2/board-generic.c
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  */
12
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/platform_device.h>
16 #include <linux/delay.h>
17 #include <linux/err.h>
18 #include <linux/clk.h>
19 #include <linux/io.h>
20
21 #include <asm/hardware.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
25
26 #include <asm/arch/gpio.h>
27 #include <asm/arch/board.h>
28 #include <asm/arch/common.h>
29
30 static void __init omap2_evm_init_irq(void)
31 {
32         omap2_init_common_hw();
33         omap_init_irq();
34         omap_gpio_init();
35 }
36
37 static struct omap_uart_config omap2_evm_uart_config __initdata = {
38         .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
39 };
40
41 static struct omap_board_config_kernel omap2_evm_config[] __initdata = {
42         {OMAP_TAG_UART, &omap2_evm_uart_config},
43 };
44
45 static int __init omap2_evm_i2c_init(void)
46 {
47         /*
48          * Registering bus 2 first to avoid twl4030 misbehaving as OMAP2EVM
49          * has twl4030 on bus 2
50          */
51         omap_register_i2c_bus(2, 2600, NULL, 0);
52         omap_register_i2c_bus(1, 400, NULL, 0);
53         return 0;
54 }
55
56 static void __init omap2_evm_init(void)
57 {
58         omap_board_config = omap2_evm_config;
59         omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
60         omap_serial_init();
61 }
62
63 static void __init omap2_evm_map_io(void)
64 {
65         omap2_set_globals_243x();
66         omap2_map_common_io();
67 }
68
69 arch_initcall(omap2_evm_i2c_init);
70
71 MACHINE_START(OMAP2EVM, "OMAP2EVM Board")
72         /* Maintainer:  Arun KS <arunks@mistralsolutions.com> */
73         .phys_io        = 0x48000000,
74         .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
75         .boot_params    = 0x80000100,
76         .map_io         = omap2_evm_map_io,
77         .init_irq       = omap2_evm_init_irq,
78         .init_machine   = omap2_evm_init,
79         .timer          = &omap_timer,
80 MACHINE_END