]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap2/board-omap3evm.c
1c20505f0605fada52cf7be2db717883cb1b7658
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-omap3evm.c
1 /*
2  * linux/arch/arm/mach-omap2/board-omap3evm.c
3  *
4  * Copyright (C) 2008 Texas Instruments
5  *
6  * Modified from mach-omap2/board-3430sdp.c
7  *
8  * Initial code: Syed Mohammed Khasim
9  *
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.
13  */
14
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <linux/delay.h>
19 #include <linux/err.h>
20 #include <linux/clk.h>
21 #include <linux/io.h>
22
23 #include <asm/hardware.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/map.h>
27
28 #include <asm/arch/gpio.h>
29 #include <asm/arch/board.h>
30 #include <asm/arch/hsmmc.h>
31 #include <asm/arch/usb-musb.h>
32 #include <asm/arch/usb-ehci.h>
33 #include <asm/arch/common.h>
34
35 static struct omap_uart_config omap3_evm_uart_config __initdata = {
36         .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
37 };
38
39 static int __init omap3_evm_i2c_init(void)
40 {
41         omap_register_i2c_bus(1, 2600, NULL, 0);
42         omap_register_i2c_bus(2, 400, NULL, 0);
43         omap_register_i2c_bus(3, 400, NULL, 0);
44         return 0;
45 }
46
47 static struct omap_mmc_config omap3_evm_mmc_config __initdata = {
48         .mmc [0] = {
49                 .enabled        = 1,
50                 .wire4          = 1,
51         },
52 };
53
54 static struct platform_device omap3_evm_lcd_device = {
55         .name           = "omap3evm_lcd",
56         .id             = -1,
57 };
58
59 static struct omap_lcd_config omap3_evm_lcd_config __initdata = {
60         .ctrl_name      = "internal",
61 };
62
63 static void __init omap3_evm_init_irq(void)
64 {
65         omap2_init_common_hw();
66         omap_init_irq();
67         omap_gpio_init();
68 }
69
70 static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
71         { OMAP_TAG_UART,        &omap3_evm_uart_config },
72         { OMAP_TAG_MMC,         &omap3_evm_mmc_config },
73         { OMAP_TAG_LCD,         &omap3_evm_lcd_config },
74 };
75
76 static struct platform_device *omap3_evm_devices[] __initdata = {
77         &omap3_evm_lcd_device,
78 };
79
80 static void __init omap3_evm_init(void)
81 {
82         platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
83         omap_board_config = omap3_evm_config;
84         omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
85         omap_serial_init();
86         hsmmc_init();
87         usb_musb_init();
88         usb_ehci_init();
89         omap3evm_flash_init();
90 }
91
92 arch_initcall(omap3_evm_i2c_init);
93
94 static void __init omap3_evm_map_io(void)
95 {
96         omap2_set_globals_343x();
97         omap2_map_common_io();
98 }
99
100 MACHINE_START(OMAP3EVM, "OMAP3 EVM")
101         /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
102         .phys_io        = 0x48000000,
103         .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
104         .boot_params    = 0x80000100,
105         .map_io         = omap3_evm_map_io,
106         .init_irq       = omap3_evm_init_irq,
107         .init_machine   = omap3_evm_init,
108         .timer          = &omap_timer,
109 MACHINE_END