diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51.c')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 51 |
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 | ||
38 | struct omap_sdrc_params *rx51_get_sdram_timings(void); | ||
39 | extern void rx51_video_mem_init(void); | 39 | extern void rx51_video_mem_init(void); |
40 | 40 | ||
41 | static struct gpio_led gpio_leds[] = { | 41 | static 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 | */ | ||
61 | static struct cpuidle_params rx51_cpuidle_params[] = { | 65 | static 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 | ||
78 | static struct omap_lcd_config rx51_lcd_config = { | 82 | static 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 | ||
101 | static void __init rx51_init_irq(void) | 105 | static 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 | ||
114 | extern void __init rx51_peripherals_init(void); | 114 | extern void __init rx51_peripherals_init(void); |
@@ -117,8 +117,6 @@ extern void __init rx51_peripherals_init(void); | |||
117 | static struct omap_board_mux board_mux[] __initdata = { | 117 | static 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 | ||
124 | static struct omap_musb_board_data musb_board_data = { | 122 | static struct omap_musb_board_data musb_board_data = { |
@@ -130,6 +128,9 @@ static struct omap_musb_board_data musb_board_data = { | |||
130 | static void __init rx51_init(void) | 128 | static 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) | |||
144 | static void __init rx51_map_io(void) | 145 | static 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 | ||
151 | static void __init rx51_reserve(void) | ||
152 | { | ||
153 | rx51_video_mem_init(); | ||
154 | omap_reserve(); | ||
155 | } | ||
156 | |||
151 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | 157 | MACHINE_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, |
161 | MACHINE_END | 166 | MACHINE_END |