PSP-03.00.00.03
[linux-ginger.git] / arch / arm / mach-omap2 / board-rx51.c
blob527f0c68a493d13fb6531da83e45c064b0cab5b8
1 /*
2 * linux/arch/arm/mach-omap2/board-rx51.c
4 * Copyright (C) 2007, 2008 Nokia
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/delay.h>
15 #include <linux/err.h>
16 #include <linux/clk.h>
17 #include <linux/io.h>
18 #include <linux/gpio.h>
19 #include <linux/leds.h>
21 #include <mach/hardware.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
26 #include <plat/mcspi.h>
27 #include <plat/mux.h>
28 #include <plat/board.h>
29 #include <plat/common.h>
30 #include <plat/dma.h>
31 #include <plat/gpmc.h>
32 #include <plat/usb.h>
34 #include "omap3-opp.h"
36 #define RX51_GPIO_SLEEP_IND 162
38 struct omap_sdrc_params *rx51_get_sdram_timings(void);
40 static struct gpio_led gpio_leds[] = {
42 .name = "sleep_ind",
43 .gpio = RX51_GPIO_SLEEP_IND,
47 static struct gpio_led_platform_data gpio_led_info = {
48 .leds = gpio_leds,
49 .num_leds = ARRAY_SIZE(gpio_leds),
52 static struct platform_device leds_gpio = {
53 .name = "leds-gpio",
54 .id = -1,
55 .dev = {
56 .platform_data = &gpio_led_info,
60 static struct omap_lcd_config rx51_lcd_config = {
61 .ctrl_name = "internal",
64 static struct omap_fbmem_config rx51_fbmem0_config = {
65 .size = 752 * 1024,
68 static struct omap_fbmem_config rx51_fbmem1_config = {
69 .size = 752 * 1024,
72 static struct omap_fbmem_config rx51_fbmem2_config = {
73 .size = 752 * 1024,
76 static struct omap_board_config_kernel rx51_config[] = {
77 { OMAP_TAG_FBMEM, &rx51_fbmem0_config },
78 { OMAP_TAG_FBMEM, &rx51_fbmem1_config },
79 { OMAP_TAG_FBMEM, &rx51_fbmem2_config },
80 { OMAP_TAG_LCD, &rx51_lcd_config },
83 static void __init rx51_init_irq(void)
85 omap_board_config = rx51_config;
86 omap_board_config_size = ARRAY_SIZE(rx51_config);
87 omap2_init_common_hw(rx51_get_sdram_timings(),
88 rx51_get_sdram_timings(), omap3_mpu_rate_table,
89 omap3_dsp_rate_table, omap3_l3_rate_table);
90 omap_init_irq();
91 omap_gpio_init();
94 extern void __init rx51_peripherals_init(void);
96 static void __init rx51_init(void)
98 omap_serial_init();
99 usb_musb_init();
100 rx51_peripherals_init();
102 /* Ensure SDRC pins are mux'd for self-refresh */
103 omap_cfg_reg(H16_34XX_SDRC_CKE0);
104 omap_cfg_reg(H17_34XX_SDRC_CKE1);
106 platform_device_register(&leds_gpio);
109 static void __init rx51_map_io(void)
111 omap2_set_globals_343x();
112 omap2_map_common_io();
115 MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
116 /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
117 .phys_io = 0x48000000,
118 .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
119 .boot_params = 0x80000100,
120 .map_io = rx51_map_io,
121 .init_irq = rx51_init_irq,
122 .init_machine = rx51_init,
123 .timer = &omap_timer,
124 MACHINE_END