aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-07-10 04:42:05 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-07-10 04:46:42 -0400
commit823e7546c4a2bd4c8edce6d8dc8544fd79287c55 (patch)
tree45fd0c86296f399db3b233c4a3f987778b8ebff8 /arch/arm/mach-ux500
parent922468cdf1a704c0c13e023d634ff802edc37910 (diff)
ARM: ux500: remove pointless cache setup complexity
This cleans out non-DT cache setup (the ux500 is DT only), and sinks the l2cc base into the unlock function. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index 842ebedbdd1c..e97ee556f92f 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -7,17 +7,15 @@
7#include <linux/io.h> 7#include <linux/io.h>
8#include <linux/of.h> 8#include <linux/of.h>
9 9
10#include <asm/cacheflush.h>
11#include <asm/hardware/cache-l2x0.h> 10#include <asm/hardware/cache-l2x0.h>
12 11
13#include "db8500-regs.h" 12#include "db8500-regs.h"
14#include "id.h" 13#include "id.h"
15 14
16static void __iomem *l2x0_base;
17
18static int __init ux500_l2x0_unlock(void) 15static int __init ux500_l2x0_unlock(void)
19{ 16{
20 int i; 17 int i;
18 void __iomem *l2x0_base = __io_address(U8500_L2CC_BASE);
21 19
22 /* 20 /*
23 * Unlock Data and Instruction Lock if locked. Ux500 U-Boot versions 21 * Unlock Data and Instruction Lock if locked. Ux500 U-Boot versions
@@ -45,23 +43,15 @@ static void ux500_l2c310_write_sec(unsigned long val, unsigned reg)
45 43
46static int __init ux500_l2x0_init(void) 44static int __init ux500_l2x0_init(void)
47{ 45{
48 if (cpu_is_u8500_family() || cpu_is_ux540_family()) 46 /* Multiplatform guard */
49 l2x0_base = __io_address(U8500_L2CC_BASE); 47 if (!((cpu_is_u8500_family() || cpu_is_ux540_family())))
50 else
51 /* Non-Ux500 platform */
52 return -ENODEV; 48 return -ENODEV;
53 49
54 /* Unlock before init */ 50 /* Unlock before init */
55 ux500_l2x0_unlock(); 51 ux500_l2x0_unlock();
56
57 outer_cache.write_sec = ux500_l2c310_write_sec; 52 outer_cache.write_sec = ux500_l2c310_write_sec;
58 53 l2x0_of_init(0, ~0);
59 if (of_have_populated_dt())
60 l2x0_of_init(0, ~0);
61 else
62 l2x0_init(l2x0_base, 0, ~0);
63 54
64 return 0; 55 return 0;
65} 56}
66
67early_initcall(ux500_l2x0_init); 57early_initcall(ux500_l2x0_init);