aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-08-17 21:10:28 -0400
committerRob Herring <rob.herring@calxeda.com>2013-08-22 21:48:42 -0400
commita56a5cf1f2ec895599eace0ac6eba1e4a489e4bf (patch)
tree828c517dc994615f0c3f2301d7c94b7eb00cb5f8 /arch/arm/mach-highbank
parent0b53c11d533a8f6688d73fad0baf67dd08ec1b90 (diff)
ARM: highbank: avoid L2 cache smc calls when PL310 is not present
While Midway firmware handles L2 smc calls as nops, the custom smc calls present a problem when running virtualized Midway guest. They aren't needed so just avoid calling them. In the process, cleanup the L2X0 ifdefs and use IS_ENABLED instead. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/arm/mach-highbank')
-rw-r--r--arch/arm/mach-highbank/highbank.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 0749b42f33c9..42ac14bd0b9d 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -65,13 +65,11 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
65 HB_JUMP_TABLE_PHYS(cpu) + 15); 65 HB_JUMP_TABLE_PHYS(cpu) + 15);
66} 66}
67 67
68#ifdef CONFIG_CACHE_L2X0
69static void highbank_l2x0_disable(void) 68static void highbank_l2x0_disable(void)
70{ 69{
71 /* Disable PL310 L2 Cache controller */ 70 /* Disable PL310 L2 Cache controller */
72 highbank_smc1(0x102, 0x0); 71 highbank_smc1(0x102, 0x0);
73} 72}
74#endif
75 73
76static void __init highbank_init_irq(void) 74static void __init highbank_init_irq(void)
77{ 75{
@@ -80,12 +78,13 @@ static void __init highbank_init_irq(void)
80 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) 78 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
81 highbank_scu_map_io(); 79 highbank_scu_map_io();
82 80
83#ifdef CONFIG_CACHE_L2X0
84 /* Enable PL310 L2 Cache controller */ 81 /* Enable PL310 L2 Cache controller */
85 highbank_smc1(0x102, 0x1); 82 if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
86 l2x0_of_init(0, ~0UL); 83 of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
87 outer_cache.disable = highbank_l2x0_disable; 84 highbank_smc1(0x102, 0x1);
88#endif 85 l2x0_of_init(0, ~0UL);
86 outer_cache.disable = highbank_l2x0_disable;
87 }
89} 88}
90 89
91static void __init highbank_timer_init(void) 90static void __init highbank_timer_init(void)