aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/mach-omap2/board-rx51.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51.c51
1 files changed, 28 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index a58e8cb1a7fc..fec4cac8fa0a 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -32,10 +32,10 @@
32 32
33#include "mux.h" 33#include "mux.h"
34#include "pm.h" 34#include "pm.h"
35#include "sdram-nokia.h"
35 36
36#define RX51_GPIO_SLEEP_IND 162 37#define RX51_GPIO_SLEEP_IND 162
37 38
38struct omap_sdrc_params *rx51_get_sdram_timings(void);
39extern void rx51_video_mem_init(void); 39extern void rx51_video_mem_init(void);
40 40
41static struct gpio_led gpio_leds[] = { 41static struct gpio_led gpio_leds[] = {
@@ -58,21 +58,25 @@ static struct platform_device leds_gpio = {
58 }, 58 },
59}; 59};
60 60
61/*
62 * cpuidle C-states definition override from the default values.
63 * The 'exit_latency' field is the sum of sleep and wake-up latencies.
64 */
61static struct cpuidle_params rx51_cpuidle_params[] = { 65static struct cpuidle_params rx51_cpuidle_params[] = {
62 /* C1 */ 66 /* C1 */
63 {1, 110, 162, 5}, 67 {110 + 162, 5 , 1},
64 /* C2 */ 68 /* C2 */
65 {1, 106, 180, 309}, 69 {106 + 180, 309, 1},
66 /* C3 */ 70 /* C3 */
67 {0, 107, 410, 46057}, 71 {107 + 410, 46057, 0},
68 /* C4 */ 72 /* C4 */
69 {0, 121, 3374, 46057}, 73 {121 + 3374, 46057, 0},
70 /* C5 */ 74 /* C5 */
71 {1, 855, 1146, 46057}, 75 {855 + 1146, 46057, 1},
72 /* C6 */ 76 /* C6 */
73 {0, 7580, 4134, 484329}, 77 {7580 + 4134, 484329, 0},
74 /* C7 */ 78 /* C7 */
75 {1, 7505, 15274, 484329}, 79 {7505 + 15274, 484329, 1},
76}; 80};
77 81
78static struct omap_lcd_config rx51_lcd_config = { 82static struct omap_lcd_config rx51_lcd_config = {
@@ -98,17 +102,13 @@ static struct omap_board_config_kernel rx51_config[] = {
98 { OMAP_TAG_LCD, &rx51_lcd_config }, 102 { OMAP_TAG_LCD, &rx51_lcd_config },
99}; 103};
100 104
101static void __init rx51_init_irq(void) 105static void __init rx51_init_early(void)
102{ 106{
103 struct omap_sdrc_params *sdrc_params; 107 struct omap_sdrc_params *sdrc_params;
104 108
105 omap_board_config = rx51_config; 109 omap2_init_common_infrastructure();
106 omap_board_config_size = ARRAY_SIZE(rx51_config); 110 sdrc_params = nokia_get_sdram_timings();
107 omap3_pm_init_cpuidle(rx51_cpuidle_params); 111 omap2_init_common_devices(sdrc_params, sdrc_params);
108 sdrc_params = rx51_get_sdram_timings();
109 omap2_init_common_hw(sdrc_params, sdrc_params);
110 omap_init_irq();
111 omap_gpio_init();
112} 112}
113 113
114extern void __init rx51_peripherals_init(void); 114extern void __init rx51_peripherals_init(void);
@@ -117,8 +117,6 @@ extern void __init rx51_peripherals_init(void);
117static struct omap_board_mux board_mux[] __initdata = { 117static struct omap_board_mux board_mux[] __initdata = {
118 { .reg_offset = OMAP_MUX_TERMINATOR }, 118 { .reg_offset = OMAP_MUX_TERMINATOR },
119}; 119};
120#else
121#define board_mux NULL
122#endif 120#endif
123 121
124static struct omap_musb_board_data musb_board_data = { 122static struct omap_musb_board_data musb_board_data = {
@@ -130,6 +128,9 @@ static struct omap_musb_board_data musb_board_data = {
130static void __init rx51_init(void) 128static void __init rx51_init(void)
131{ 129{
132 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 130 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
131 omap_board_config = rx51_config;
132 omap_board_config_size = ARRAY_SIZE(rx51_config);
133 omap3_pm_init_cpuidle(rx51_cpuidle_params);
133 omap_serial_init(); 134 omap_serial_init();
134 usb_musb_init(&musb_board_data); 135 usb_musb_init(&musb_board_data);
135 rx51_peripherals_init(); 136 rx51_peripherals_init();
@@ -144,18 +145,22 @@ static void __init rx51_init(void)
144static void __init rx51_map_io(void) 145static void __init rx51_map_io(void)
145{ 146{
146 omap2_set_globals_3xxx(); 147 omap2_set_globals_3xxx();
147 rx51_video_mem_init();
148 omap34xx_map_common_io(); 148 omap34xx_map_common_io();
149} 149}
150 150
151static void __init rx51_reserve(void)
152{
153 rx51_video_mem_init();
154 omap_reserve();
155}
156
151MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") 157MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
152 /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ 158 /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
153 .phys_io = 0x48000000,
154 .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
155 .boot_params = 0x80000100, 159 .boot_params = 0x80000100,
160 .reserve = rx51_reserve,
156 .map_io = rx51_map_io, 161 .map_io = rx51_map_io,
157 .reserve = omap_reserve, 162 .init_early = rx51_init_early,
158 .init_irq = rx51_init_irq, 163 .init_irq = omap_init_irq,
159 .init_machine = rx51_init, 164 .init_machine = rx51_init,
160 .timer = &omap_timer, 165 .timer = &omap_timer,
161MACHINE_END 166MACHINE_END