aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorJason Cooper <jason@lakedaemon.net>2012-02-29 12:39:08 -0500
committerJason Cooper <jason@lakedaemon.net>2012-03-16 00:28:41 -0400
commit2b45e05f51a79c2818523c923dfe008b8b2f4227 (patch)
treef059f5b0a4c6fea3b46f28b56fa81d9a8be93d18 /arch/arm
parentb77816dea3e4c0f815510dea2a0ca9bcda6644dc (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.c29
-rw-r--r--arch/arm/mach-kirkwood/common.c12
-rw-r--r--arch/arm/mach-kirkwood/common.h8
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
156static void __init kirkwood_dt_init(void) 158static 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 ****************************************************************************/
166static void __init kirkwood_rtc_init(void) 166void __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 ****************************************************************************/
282static void __init kirkwood_xor0_init(void) 282void __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 ****************************************************************************/
294static void __init kirkwood_xor1_init(void) 294void __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 ****************************************************************************/
306static void __init kirkwood_wdt_init(void) 306void __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 */
395static char * __init kirkwood_id(void) 395char * __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
438static void __init kirkwood_l2_init(void) 438void __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
51void kirkwood_audio_init(void); 51void kirkwood_audio_init(void);
52void kirkwood_restart(char, const char *); 52void kirkwood_restart(char, const char *);
53 53
54char *kirkwood_id(void);
55void kirkwood_l2_init(void);
56void kirkwood_rtc_init(void);
57void kirkwood_wdt_init(void);
58void kirkwood_xor0_init(void);
59void kirkwood_xor1_init(void);
60void kirkwood_crypto_init(void);
61
54extern int kirkwood_tclk; 62extern int kirkwood_tclk;
55extern struct sys_timer kirkwood_timer; 63extern struct sys_timer kirkwood_timer;
56 64