aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51.c54
1 files changed, 52 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 67bb3476b707..b155c366c650 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -16,6 +16,7 @@
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/leds.h>
19 20
20#include <mach/hardware.h> 21#include <mach/hardware.h>
21#include <asm/mach-types.h> 22#include <asm/mach-types.h>
@@ -30,9 +31,49 @@
30#include <plat/usb.h> 31#include <plat/usb.h>
31 32
32#include "mux.h" 33#include "mux.h"
34#include "pm.h"
35
36#define RX51_GPIO_SLEEP_IND 162
33 37
34struct omap_sdrc_params *rx51_get_sdram_timings(void); 38struct omap_sdrc_params *rx51_get_sdram_timings(void);
35 39
40static struct gpio_led gpio_leds[] = {
41 {
42 .name = "sleep_ind",
43 .gpio = RX51_GPIO_SLEEP_IND,
44 },
45};
46
47static struct gpio_led_platform_data gpio_led_info = {
48 .leds = gpio_leds,
49 .num_leds = ARRAY_SIZE(gpio_leds),
50};
51
52static struct platform_device leds_gpio = {
53 .name = "leds-gpio",
54 .id = -1,
55 .dev = {
56 .platform_data = &gpio_led_info,
57 },
58};
59
60static struct cpuidle_params rx51_cpuidle_params[] = {
61 /* C1 */
62 {1, 110, 162, 5},
63 /* C2 */
64 {1, 106, 180, 309},
65 /* C3 */
66 {0, 107, 410, 46057},
67 /* C4 */
68 {0, 121, 3374, 46057},
69 /* C5 */
70 {1, 855, 1146, 46057},
71 /* C6 */
72 {0, 7580, 4134, 484329},
73 /* C7 */
74 {1, 7505, 15274, 484329},
75};
76
36static struct omap_lcd_config rx51_lcd_config = { 77static struct omap_lcd_config rx51_lcd_config = {
37 .ctrl_name = "internal", 78 .ctrl_name = "internal",
38}; 79};
@@ -62,6 +103,7 @@ static void __init rx51_init_irq(void)
62 103
63 omap_board_config = rx51_config; 104 omap_board_config = rx51_config;
64 omap_board_config_size = ARRAY_SIZE(rx51_config); 105 omap_board_config_size = ARRAY_SIZE(rx51_config);
106 omap3_pm_init_cpuidle(rx51_cpuidle_params);
65 sdrc_params = rx51_get_sdram_timings(); 107 sdrc_params = rx51_get_sdram_timings();
66 omap2_init_common_hw(sdrc_params, sdrc_params); 108 omap2_init_common_hw(sdrc_params, sdrc_params);
67 omap_init_irq(); 109 omap_init_irq();
@@ -78,22 +120,30 @@ static struct omap_board_mux board_mux[] __initdata = {
78#define board_mux NULL 120#define board_mux NULL
79#endif 121#endif
80 122
123static struct omap_musb_board_data musb_board_data = {
124 .interface_type = MUSB_INTERFACE_ULPI,
125 .mode = MUSB_PERIPHERAL,
126 .power = 0,
127};
128
81static void __init rx51_init(void) 129static void __init rx51_init(void)
82{ 130{
83 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 131 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
84 omap_serial_init(); 132 omap_serial_init();
85 usb_musb_init(); 133 usb_musb_init(&musb_board_data);
86 rx51_peripherals_init(); 134 rx51_peripherals_init();
87 135
88 /* Ensure SDRC pins are mux'd for self-refresh */ 136 /* Ensure SDRC pins are mux'd for self-refresh */
89 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 137 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
90 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 138 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
139
140 platform_device_register(&leds_gpio);
91} 141}
92 142
93static void __init rx51_map_io(void) 143static void __init rx51_map_io(void)
94{ 144{
95 omap2_set_globals_343x(); 145 omap2_set_globals_343x();
96 omap2_map_common_io(); 146 omap34xx_map_common_io();
97} 147}
98 148
99MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") 149MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")