diff options
author | Ronen Shitrit <rshitrit@marvell.com> | 2008-09-23 08:28:10 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2008-09-25 16:29:21 -0400 |
commit | 4360bb41920ffacd4a935fa692768129ee5bef4e (patch) | |
tree | 8d5bbe15ad4c39d089ac42ab0330d8c515584f65 /arch/arm/mach-kirkwood | |
parent | 3d014b01e54ce08d15a598f0bfb3ce597f14ca03 (diff) |
[ARM] Kirkwood: add support for L2 cache WB/WT selection
Feroceon L2 cache can work in eighther write through or write back mode
on Kirkwood. Add the option to configure this mode according to Kconfig.
Signed-off-by: Ronen Shitrit <rshitrit@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index c8516e352d1c..85cad05d8c5b 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -588,9 +588,15 @@ static char * __init kirkwood_id(void) | |||
588 | } | 588 | } |
589 | } | 589 | } |
590 | 590 | ||
591 | static int __init is_l2_writethrough(void) | 591 | static void __init kirkwood_l2_init(void) |
592 | { | 592 | { |
593 | return !!(readl(L2_CONFIG_REG) & L2_WRITETHROUGH); | 593 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH |
594 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); | ||
595 | feroceon_l2_init(1); | ||
596 | #else | ||
597 | writel(readl(L2_CONFIG_REG) & ~L2_WRITETHROUGH, L2_CONFIG_REG); | ||
598 | feroceon_l2_init(0); | ||
599 | #endif | ||
594 | } | 600 | } |
595 | 601 | ||
596 | void __init kirkwood_init(void) | 602 | void __init kirkwood_init(void) |
@@ -605,6 +611,6 @@ void __init kirkwood_init(void) | |||
605 | kirkwood_setup_cpu_mbus(); | 611 | kirkwood_setup_cpu_mbus(); |
606 | 612 | ||
607 | #ifdef CONFIG_CACHE_FEROCEON_L2 | 613 | #ifdef CONFIG_CACHE_FEROCEON_L2 |
608 | feroceon_l2_init(is_l2_writethrough()); | 614 | kirkwood_l2_init(); |
609 | #endif | 615 | #endif |
610 | } | 616 | } |