aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSaeed Bishara <saeed@marvell.com>2008-06-23 08:05:08 -0400
committerNicolas Pitre <nico@cam.org>2008-06-30 14:25:24 -0400
commit1338760329c586e0141831099e15f5c336dd9c1d (patch)
treecf7b223ee87d0686118ac8b6a3214656aa69279a /arch
parenta10b188f195d00116f56f0049d8b17c711641fb7 (diff)
[ARM] Kirkwood: support L2 writeback mode
This patch allows booting Kirkwood with the L2 in writeback mode, by reading the WT override bit from the L2 config register and passing that into the Feroceon L2 init routine, instead of assuming that the WT override bit will always be set Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-kirkwood/common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index e73384fbbba8..5938a3b33cdc 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -313,6 +313,11 @@ static char * __init kirkwood_id(void)
313 return "unknown 88F6000 variant"; 313 return "unknown 88F6000 variant";
314} 314}
315 315
316static int __init is_l2_writethrough(void)
317{
318 return !!(readl(L2_CONFIG_REG) & L2_WRITETHROUGH);
319}
320
316void __init kirkwood_init(void) 321void __init kirkwood_init(void)
317{ 322{
318 printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n", 323 printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
@@ -321,6 +326,6 @@ void __init kirkwood_init(void)
321 kirkwood_setup_cpu_mbus(); 326 kirkwood_setup_cpu_mbus();
322 327
323#ifdef CONFIG_CACHE_FEROCEON_L2 328#ifdef CONFIG_CACHE_FEROCEON_L2
324 feroceon_l2_init(1); 329 feroceon_l2_init(is_l2_writethrough());
325#endif 330#endif
326} 331}