diff options
author | Jason Cooper <jason@lakedaemon.net> | 2012-02-29 12:39:08 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-03-16 00:28:41 -0400 |
commit | 2b45e05f51a79c2818523c923dfe008b8b2f4227 (patch) | |
tree | f059f5b0a4c6fea3b46f28b56fa81d9a8be93d18 /arch/arm | |
parent | b77816dea3e4c0f815510dea2a0ca9bcda6644dc (diff) |
ARM: kirkwood: fdt: absorb kirkwood_init()
We need to absorb kirkwood_init() into kirkwood_dt_init() so that as we
convert drivers, we can remove the platform call, eg
kirkwood_rtc_init(). This maintains compatibility with non-fdt
configurations because they still call kirkwood_init() in common.c.
As drivers are converted, we will reinstate the 'static' qualifier in
common.c.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.h | 8 |
3 files changed, 42 insertions, 7 deletions
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index fbe6405602ed..9bd35ac730b3 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -29,7 +29,9 @@ | |||
29 | #include <linux/spi/orion_spi.h> | 29 | #include <linux/spi/orion_spi.h> |
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | ||
32 | #include <mach/kirkwood.h> | 33 | #include <mach/kirkwood.h> |
34 | #include <mach/bridge-regs.h> | ||
33 | #include <plat/mvsdio.h> | 35 | #include <plat/mvsdio.h> |
34 | #include "common.h" | 36 | #include "common.h" |
35 | #include "mpp.h" | 37 | #include "mpp.h" |
@@ -155,7 +157,32 @@ static void __init dreamplug_init(void) | |||
155 | 157 | ||
156 | static void __init kirkwood_dt_init(void) | 158 | static void __init kirkwood_dt_init(void) |
157 | { | 159 | { |
158 | kirkwood_init(); | 160 | pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); |
161 | |||
162 | /* | ||
163 | * Disable propagation of mbus errors to the CPU local bus, | ||
164 | * as this causes mbus errors (which can occur for example | ||
165 | * for PCI aborts) to throw CPU aborts, which we're not set | ||
166 | * up to deal with. | ||
167 | */ | ||
168 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); | ||
169 | |||
170 | kirkwood_setup_cpu_mbus(); | ||
171 | |||
172 | #ifdef CONFIG_CACHE_FEROCEON_L2 | ||
173 | kirkwood_l2_init(); | ||
174 | #endif | ||
175 | |||
176 | /* internal devices that every board has */ | ||
177 | kirkwood_rtc_init(); | ||
178 | kirkwood_wdt_init(); | ||
179 | kirkwood_xor0_init(); | ||
180 | kirkwood_xor1_init(); | ||
181 | kirkwood_crypto_init(); | ||
182 | |||
183 | #ifdef CONFIG_KEXEC | ||
184 | kexec_reinit = kirkwood_enable_pcie; | ||
185 | #endif | ||
159 | 186 | ||
160 | if (of_machine_is_compatible("globalscale,dreamplug")) | 187 | if (of_machine_is_compatible("globalscale,dreamplug")) |
161 | dreamplug_init(); | 188 | dreamplug_init(); |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 79a9fe7e96a0..04a7eb95af76 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -163,7 +163,7 @@ void __init kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, | |||
163 | /***************************************************************************** | 163 | /***************************************************************************** |
164 | * SoC RTC | 164 | * SoC RTC |
165 | ****************************************************************************/ | 165 | ****************************************************************************/ |
166 | static void __init kirkwood_rtc_init(void) | 166 | void __init kirkwood_rtc_init(void) |
167 | { | 167 | { |
168 | orion_rtc_init(RTC_PHYS_BASE, IRQ_KIRKWOOD_RTC); | 168 | orion_rtc_init(RTC_PHYS_BASE, IRQ_KIRKWOOD_RTC); |
169 | } | 169 | } |
@@ -279,7 +279,7 @@ void __init kirkwood_crypto_init(void) | |||
279 | /***************************************************************************** | 279 | /***************************************************************************** |
280 | * XOR0 | 280 | * XOR0 |
281 | ****************************************************************************/ | 281 | ****************************************************************************/ |
282 | static void __init kirkwood_xor0_init(void) | 282 | void __init kirkwood_xor0_init(void) |
283 | { | 283 | { |
284 | kirkwood_clk_ctrl |= CGC_XOR0; | 284 | kirkwood_clk_ctrl |= CGC_XOR0; |
285 | 285 | ||
@@ -291,7 +291,7 @@ static void __init kirkwood_xor0_init(void) | |||
291 | /***************************************************************************** | 291 | /***************************************************************************** |
292 | * XOR1 | 292 | * XOR1 |
293 | ****************************************************************************/ | 293 | ****************************************************************************/ |
294 | static void __init kirkwood_xor1_init(void) | 294 | void __init kirkwood_xor1_init(void) |
295 | { | 295 | { |
296 | kirkwood_clk_ctrl |= CGC_XOR1; | 296 | kirkwood_clk_ctrl |= CGC_XOR1; |
297 | 297 | ||
@@ -303,7 +303,7 @@ static void __init kirkwood_xor1_init(void) | |||
303 | /***************************************************************************** | 303 | /***************************************************************************** |
304 | * Watchdog | 304 | * Watchdog |
305 | ****************************************************************************/ | 305 | ****************************************************************************/ |
306 | static void __init kirkwood_wdt_init(void) | 306 | void __init kirkwood_wdt_init(void) |
307 | { | 307 | { |
308 | orion_wdt_init(kirkwood_tclk); | 308 | orion_wdt_init(kirkwood_tclk); |
309 | } | 309 | } |
@@ -392,7 +392,7 @@ void __init kirkwood_audio_init(void) | |||
392 | /* | 392 | /* |
393 | * Identify device ID and revision. | 393 | * Identify device ID and revision. |
394 | */ | 394 | */ |
395 | static char * __init kirkwood_id(void) | 395 | char * __init kirkwood_id(void) |
396 | { | 396 | { |
397 | u32 dev, rev; | 397 | u32 dev, rev; |
398 | 398 | ||
@@ -435,7 +435,7 @@ static char * __init kirkwood_id(void) | |||
435 | } | 435 | } |
436 | } | 436 | } |
437 | 437 | ||
438 | static void __init kirkwood_l2_init(void) | 438 | void __init kirkwood_l2_init(void) |
439 | { | 439 | { |
440 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH | 440 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH |
441 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); | 441 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 9071a397136d..c38244724fdc 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -51,6 +51,14 @@ void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev | |||
51 | void kirkwood_audio_init(void); | 51 | void kirkwood_audio_init(void); |
52 | void kirkwood_restart(char, const char *); | 52 | void kirkwood_restart(char, const char *); |
53 | 53 | ||
54 | char *kirkwood_id(void); | ||
55 | void kirkwood_l2_init(void); | ||
56 | void kirkwood_rtc_init(void); | ||
57 | void kirkwood_wdt_init(void); | ||
58 | void kirkwood_xor0_init(void); | ||
59 | void kirkwood_xor1_init(void); | ||
60 | void kirkwood_crypto_init(void); | ||
61 | |||
54 | extern int kirkwood_tclk; | 62 | extern int kirkwood_tclk; |
55 | extern struct sys_timer kirkwood_timer; | 63 | extern struct sys_timer kirkwood_timer; |
56 | 64 | ||