ARM: OMAP: Remove unused old gpio-switch.h
[deliverable/linux.git] / arch / arm / mach-omap2 / board-rx51.c
1 /*
2 * linux/arch/arm/mach-omap2/board-rx51.c
3 *
4 * Copyright (C) 2007, 2008 Nokia
5 *
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 */
10
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>
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
26 #include <plat/mcspi.h>
27 #include "common.h"
28 #include <plat/dma.h>
29 #include <plat/gpmc.h>
30 #include <plat/usb.h>
31
32 #include "mux.h"
33 #include "pm.h"
34 #include "sdram-nokia.h"
35
36 #define RX51_GPIO_SLEEP_IND 162
37
38 extern void rx51_video_mem_init(void);
39
40 static struct gpio_led gpio_leds[] = {
41 {
42 .name = "sleep_ind",
43 .gpio = RX51_GPIO_SLEEP_IND,
44 },
45 };
46
47 static struct gpio_led_platform_data gpio_led_info = {
48 .leds = gpio_leds,
49 .num_leds = ARRAY_SIZE(gpio_leds),
50 };
51
52 static struct platform_device leds_gpio = {
53 .name = "leds-gpio",
54 .id = -1,
55 .dev = {
56 .platform_data = &gpio_led_info,
57 },
58 };
59
60 /*
61 * cpuidle C-states definition for rx51.
62 *
63 * The 'exit_latency' field is the sum of sleep
64 * and wake-up latencies.
65
66 ---------------------------------------------
67 | state | exit_latency | target_residency |
68 ---------------------------------------------
69 | C1 | 110 + 162 | 5 |
70 | C2 | 106 + 180 | 309 |
71 | C3 | 107 + 410 | 46057 |
72 | C4 | 121 + 3374 | 46057 |
73 | C5 | 855 + 1146 | 46057 |
74 | C6 | 7580 + 4134 | 484329 |
75 | C7 | 7505 + 15274 | 484329 |
76 ---------------------------------------------
77
78 */
79
80 extern void __init rx51_peripherals_init(void);
81
82 #ifdef CONFIG_OMAP_MUX
83 static struct omap_board_mux board_mux[] __initdata = {
84 { .reg_offset = OMAP_MUX_TERMINATOR },
85 };
86 #endif
87
88 static struct omap_musb_board_data musb_board_data = {
89 .interface_type = MUSB_INTERFACE_ULPI,
90 .mode = MUSB_PERIPHERAL,
91 .power = 0,
92 };
93
94 static void __init rx51_init(void)
95 {
96 struct omap_sdrc_params *sdrc_params;
97
98 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
99 omap_serial_init();
100
101 sdrc_params = nokia_get_sdram_timings();
102 omap_sdrc_init(sdrc_params, sdrc_params);
103
104 usb_musb_init(&musb_board_data);
105 rx51_peripherals_init();
106
107 /* Ensure SDRC pins are mux'd for self-refresh */
108 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
109 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
110
111 platform_device_register(&leds_gpio);
112 }
113
114 static void __init rx51_reserve(void)
115 {
116 rx51_video_mem_init();
117 omap_reserve();
118 }
119
120 MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
121 /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
122 .atag_offset = 0x100,
123 .reserve = rx51_reserve,
124 .map_io = omap3_map_io,
125 .init_early = omap3430_init_early,
126 .init_irq = omap3_init_irq,
127 .handle_irq = omap3_intc_handle_irq,
128 .init_machine = rx51_init,
129 .init_late = omap3430_init_late,
130 .timer = &omap3_timer,
131 .restart = omap_prcm_restart,
132 MACHINE_END
This page took 0.03301 seconds and 5 git commands to generate.