blob: 793ce8f4e927cb5f72979a7a512f9b7e0faf1947 [file] [log] [blame]
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -07001/*
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
Tony Lindgrence491cf2009-10-20 09:40:47 -070026#include <plat/board.h>
27#include <plat/common.h>
28#include <plat/control.h>
29#include <plat/timer-gp.h>
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070030#include <asm/hardware/gic.h>
31
32static struct platform_device sdp4430_lcd_device = {
33 .name = "sdp4430_lcd",
34 .id = -1,
35};
36
37static struct platform_device *sdp4430_devices[] __initdata = {
38 &sdp4430_lcd_device,
39};
40
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070041static struct omap_lcd_config sdp4430_lcd_config __initdata = {
42 .ctrl_name = "internal",
43};
44
45static struct omap_board_config_kernel sdp4430_config[] __initdata = {
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070046 { OMAP_TAG_LCD, &sdp4430_lcd_config },
47};
48
49static void __init gic_init_irq(void)
50{
Tony Lindgrene4e7a132009-10-19 15:25:26 -070051 void __iomem *base;
52
53 /* Static mapping, never released */
54 base = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
55 BUG_ON(!base);
56 gic_dist_init(0, base, 29);
57
58 /* Static mapping, never released */
59 gic_cpu_base_addr = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
60 BUG_ON(!gic_cpu_base_addr);
61 gic_cpu_init(0, gic_cpu_base_addr);
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070062}
63
64static void __init omap_4430sdp_init_irq(void)
65{
Santosh Shilimkar5b7815b2009-10-22 14:48:14 -070066 omap_board_config = sdp4430_config;
67 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
Jean Pihet58cda882009-07-24 19:43:25 -060068 omap2_init_common_hw(NULL, NULL);
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070069#ifdef CONFIG_OMAP_32K_TIMER
70 omap2_gp_clockevent_set_gptimer(1);
71#endif
72 gic_init_irq();
73 omap_gpio_init();
74}
75
76
77static void __init omap_4430sdp_init(void)
78{
79 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070080 omap_serial_init();
81}
82
83static void __init omap_4430sdp_map_io(void)
84{
85 omap2_set_globals_443x();
Tony Lindgren6fbd55d2010-02-12 12:26:47 -080086 omap44xx_map_common_io();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070087}
88
89MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
90 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
91 .phys_io = 0x48000000,
Santosh Shilimkarb4224b22009-10-19 17:25:55 -070092 .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070093 .boot_params = 0x80000100,
94 .map_io = omap_4430sdp_map_io,
95 .init_irq = omap_4430sdp_init_irq,
96 .init_machine = omap_4430sdp_init,
97 .timer = &omap_timer,
98MACHINE_END