diff options
author | Aaro Koskinen <aaro.koskinen@nokia.com> | 2010-12-17 18:13:44 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-17 18:13:44 -0500 |
commit | 6c3bc4eb5608665b7330b3d2044fca976cbd1a50 (patch) | |
tree | 9fa0dcd11c75c86b4a6cd8cbb92cb2436de79936 /arch | |
parent | b0c3844d8af6b9f3f18f31e1b0502fbefa2166be (diff) |
arm: omap: rename board-rx51-sdram.c to sdram-nokia.c
Rename the file and functions so that it can be reused by future Nokia
boards. Based on patches by Juha Keski-Saari.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sdram-nokia.c (renamed from arch/arm/mach-omap2/board-rx51-sdram.c) | 34 |
3 files changed, 20 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 60e51bcf53bd..e72ccf79b791 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -140,7 +140,7 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ | |||
140 | board-flash.o | 140 | board-flash.o |
141 | obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o | 141 | obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o |
142 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ | 142 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ |
143 | board-rx51-sdram.o \ | 143 | sdram-nokia.o \ |
144 | board-rx51-peripherals.o \ | 144 | board-rx51-peripherals.o \ |
145 | board-rx51-video.o \ | 145 | board-rx51-video.o \ |
146 | hsmmc.o | 146 | hsmmc.o |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 36f2cf4efd57..904b83a62be7 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #define RX51_GPIO_SLEEP_IND 162 | 36 | #define RX51_GPIO_SLEEP_IND 162 |
37 | 37 | ||
38 | struct omap_sdrc_params *rx51_get_sdram_timings(void); | 38 | struct omap_sdrc_params *nokia_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[] = { |
@@ -105,7 +105,7 @@ static void __init rx51_init_irq(void) | |||
105 | omap_board_config = rx51_config; | 105 | omap_board_config = rx51_config; |
106 | omap_board_config_size = ARRAY_SIZE(rx51_config); | 106 | omap_board_config_size = ARRAY_SIZE(rx51_config); |
107 | omap3_pm_init_cpuidle(rx51_cpuidle_params); | 107 | omap3_pm_init_cpuidle(rx51_cpuidle_params); |
108 | sdrc_params = rx51_get_sdram_timings(); | 108 | sdrc_params = nokia_get_sdram_timings(); |
109 | omap2_init_common_hw(sdrc_params, sdrc_params); | 109 | omap2_init_common_hw(sdrc_params, sdrc_params); |
110 | omap_init_irq(); | 110 | omap_init_irq(); |
111 | omap_gpio_init(); | 111 | omap_gpio_init(); |
diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c b/arch/arm/mach-omap2/sdram-nokia.c index a43b2c5c838b..690202b996c1 100644 --- a/arch/arm/mach-omap2/board-rx51-sdram.c +++ b/arch/arm/mach-omap2/sdram-nokia.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SDRC register values for RX51 | 2 | * SDRC register values for Nokia boards |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008, 2010 Nokia Corporation |
5 | * | 5 | * |
6 | * Lauri Leukkunen <lauri.leukkunen@nokia.com> | 6 | * Lauri Leukkunen <lauri.leukkunen@nokia.com> |
7 | * | 7 | * |
@@ -43,9 +43,9 @@ struct sdram_timings { | |||
43 | u32 tWTR; | 43 | u32 tWTR; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct omap_sdrc_params rx51_sdrc_params[4]; | 46 | static struct omap_sdrc_params nokia_sdrc_params[4]; |
47 | 47 | ||
48 | static const struct sdram_timings rx51_timings[] = { | 48 | static const struct sdram_timings memory_timings[] = { |
49 | { | 49 | { |
50 | .casl = 3, | 50 | .casl = 3, |
51 | .tDAL = 33000, | 51 | .tDAL = 33000, |
@@ -110,12 +110,12 @@ static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit, | |||
110 | #ifdef DEBUG | 110 | #ifdef DEBUG |
111 | #define SDRC_SET_ONE(reg, st, end, field, rate) \ | 111 | #define SDRC_SET_ONE(reg, st, end, field, rate) \ |
112 | if (set_sdrc_timing_regval((reg), (st), (end), \ | 112 | if (set_sdrc_timing_regval((reg), (st), (end), \ |
113 | rx51_timings->field, (rate), #field) < 0) \ | 113 | memory_timings->field, (rate), #field) < 0) \ |
114 | err = -1; | 114 | err = -1; |
115 | #else | 115 | #else |
116 | #define SDRC_SET_ONE(reg, st, end, field, rate) \ | 116 | #define SDRC_SET_ONE(reg, st, end, field, rate) \ |
117 | if (set_sdrc_timing_regval((reg), (st), (end), \ | 117 | if (set_sdrc_timing_regval((reg), (st), (end), \ |
118 | rx51_timings->field) < 0) \ | 118 | memory_timings->field) < 0) \ |
119 | err = -1; | 119 | err = -1; |
120 | #endif | 120 | #endif |
121 | 121 | ||
@@ -148,14 +148,14 @@ static int set_sdrc_timing_regval_ps(u32 *regval, int st_bit, int end_bit, | |||
148 | #ifdef DEBUG | 148 | #ifdef DEBUG |
149 | #define SDRC_SET_ONE_PS(reg, st, end, field, rate) \ | 149 | #define SDRC_SET_ONE_PS(reg, st, end, field, rate) \ |
150 | if (set_sdrc_timing_regval_ps((reg), (st), (end), \ | 150 | if (set_sdrc_timing_regval_ps((reg), (st), (end), \ |
151 | rx51_timings->field, \ | 151 | memory_timings->field, \ |
152 | (rate), #field) < 0) \ | 152 | (rate), #field) < 0) \ |
153 | err = -1; | 153 | err = -1; |
154 | 154 | ||
155 | #else | 155 | #else |
156 | #define SDRC_SET_ONE_PS(reg, st, end, field, rate) \ | 156 | #define SDRC_SET_ONE_PS(reg, st, end, field, rate) \ |
157 | if (set_sdrc_timing_regval_ps((reg), (st), (end), \ | 157 | if (set_sdrc_timing_regval_ps((reg), (st), (end), \ |
158 | rx51_timings->field, (rate)) < 0) \ | 158 | memory_timings->field, (rate)) < 0) \ |
159 | err = -1; | 159 | err = -1; |
160 | #endif | 160 | #endif |
161 | 161 | ||
@@ -184,7 +184,7 @@ static int sdrc_timings(int id, long rate) | |||
184 | SDRC_SET_ONE(&actim_ctrlb, 16, 17, tWTR, l3_rate); | 184 | SDRC_SET_ONE(&actim_ctrlb, 16, 17, tWTR, l3_rate); |
185 | 185 | ||
186 | ticks_per_ms = l3_rate; | 186 | ticks_per_ms = l3_rate; |
187 | rfr = rx51_timings[0].tREF * ticks_per_ms / 1000000; | 187 | rfr = memory_timings[0].tREF * ticks_per_ms / 1000000; |
188 | if (rfr > 65535 + 50) | 188 | if (rfr > 65535 + 50) |
189 | rfr = 65535; | 189 | rfr = 65535; |
190 | else | 190 | else |
@@ -197,18 +197,18 @@ static int sdrc_timings(int id, long rate) | |||
197 | l = rfr << 8; | 197 | l = rfr << 8; |
198 | rfr_ctrl = l | 0x1; /* autorefresh, reload counter with 1xARCV */ | 198 | rfr_ctrl = l | 0x1; /* autorefresh, reload counter with 1xARCV */ |
199 | 199 | ||
200 | rx51_sdrc_params[id].rate = rate; | 200 | nokia_sdrc_params[id].rate = rate; |
201 | rx51_sdrc_params[id].actim_ctrla = actim_ctrla; | 201 | nokia_sdrc_params[id].actim_ctrla = actim_ctrla; |
202 | rx51_sdrc_params[id].actim_ctrlb = actim_ctrlb; | 202 | nokia_sdrc_params[id].actim_ctrlb = actim_ctrlb; |
203 | rx51_sdrc_params[id].rfr_ctrl = rfr_ctrl; | 203 | nokia_sdrc_params[id].rfr_ctrl = rfr_ctrl; |
204 | rx51_sdrc_params[id].mr = 0x32; | 204 | nokia_sdrc_params[id].mr = 0x32; |
205 | 205 | ||
206 | rx51_sdrc_params[id + 1].rate = 0; | 206 | nokia_sdrc_params[id + 1].rate = 0; |
207 | 207 | ||
208 | return err; | 208 | return err; |
209 | } | 209 | } |
210 | 210 | ||
211 | struct omap_sdrc_params *rx51_get_sdram_timings(void) | 211 | struct omap_sdrc_params *nokia_get_sdram_timings(void) |
212 | { | 212 | { |
213 | int err; | 213 | int err; |
214 | 214 | ||
@@ -216,6 +216,6 @@ struct omap_sdrc_params *rx51_get_sdram_timings(void) | |||
216 | err |= sdrc_timings(1, 83000000); | 216 | err |= sdrc_timings(1, 83000000); |
217 | err |= sdrc_timings(2, 166000000); | 217 | err |= sdrc_timings(2, 166000000); |
218 | 218 | ||
219 | return &rx51_sdrc_params[0]; | 219 | return &nokia_sdrc_params[0]; |
220 | } | 220 | } |
221 | 221 | ||