]>
Commit | Line | Data |
---|---|---|
46ba0abf SS |
1 | /* |
2 | * Board support file for OMAP4430 SDP. | |
3 | * | |
4 | * Copyright (C) 2009 Texas Instruments | |
5 | * | |
6 | * Author: Santosh Shilimkar <santosh.shilimkar@ti.com> | |
7 | * | |
8 | * Based on mach-omap2/board-3430sdp.c | |
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/io.h> | |
19 | #include <linux/gpio.h> | |
20 | ||
21 | #include <mach/hardware.h> | |
22 | #include <asm/mach-types.h> | |
23 | #include <asm/mach/arch.h> | |
24 | #include <asm/mach/map.h> | |
25 | ||
ce491cf8 TL |
26 | #include <plat/board.h> |
27 | #include <plat/common.h> | |
28 | #include <plat/control.h> | |
29 | #include <plat/timer-gp.h> | |
46ba0abf SS |
30 | #include <asm/hardware/gic.h> |
31 | ||
32 | static struct platform_device sdp4430_lcd_device = { | |
33 | .name = "sdp4430_lcd", | |
34 | .id = -1, | |
35 | }; | |
36 | ||
37 | static struct platform_device *sdp4430_devices[] __initdata = { | |
38 | &sdp4430_lcd_device, | |
39 | }; | |
40 | ||
41 | static struct omap_uart_config sdp4430_uart_config __initdata = { | |
085b54d9 | 42 | .enabled_uarts = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3), |
46ba0abf SS |
43 | }; |
44 | ||
45 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { | |
46 | .ctrl_name = "internal", | |
47 | }; | |
48 | ||
49 | static struct omap_board_config_kernel sdp4430_config[] __initdata = { | |
46ba0abf SS |
50 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, |
51 | }; | |
52 | ||
53 | static void __init gic_init_irq(void) | |
54 | { | |
e4e7a13a TL |
55 | void __iomem *base; |
56 | ||
57 | /* Static mapping, never released */ | |
58 | base = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); | |
59 | BUG_ON(!base); | |
60 | gic_dist_init(0, base, 29); | |
61 | ||
62 | /* Static mapping, never released */ | |
63 | gic_cpu_base_addr = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); | |
64 | BUG_ON(!gic_cpu_base_addr); | |
65 | gic_cpu_init(0, gic_cpu_base_addr); | |
46ba0abf SS |
66 | } |
67 | ||
68 | static void __init omap_4430sdp_init_irq(void) | |
69 | { | |
5b7815b5 SS |
70 | omap_board_config = sdp4430_config; |
71 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); | |
58cda884 | 72 | omap2_init_common_hw(NULL, NULL); |
46ba0abf SS |
73 | #ifdef CONFIG_OMAP_32K_TIMER |
74 | omap2_gp_clockevent_set_gptimer(1); | |
75 | #endif | |
76 | gic_init_irq(); | |
77 | omap_gpio_init(); | |
78 | } | |
79 | ||
80 | ||
81 | static void __init omap_4430sdp_init(void) | |
82 | { | |
83 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); | |
46ba0abf SS |
84 | omap_serial_init(); |
85 | } | |
86 | ||
87 | static void __init omap_4430sdp_map_io(void) | |
88 | { | |
89 | omap2_set_globals_443x(); | |
6fbd55d0 | 90 | omap44xx_map_common_io(); |
46ba0abf SS |
91 | } |
92 | ||
93 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | |
94 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ | |
95 | .phys_io = 0x48000000, | |
b4224b23 | 96 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, |
46ba0abf SS |
97 | .boot_params = 0x80000100, |
98 | .map_io = omap_4430sdp_map_io, | |
99 | .init_irq = omap_4430sdp_init_irq, | |
100 | .init_machine = omap_4430sdp_init, | |
101 | .timer = &omap_timer, | |
102 | MACHINE_END |