diff options
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-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 | } |