aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank/highbank.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-highbank/highbank.c')
-rw-r--r--arch/arm/mach-highbank/highbank.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 40e36a50304c..dc248167d206 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -26,9 +26,9 @@
26#include <linux/smp.h> 26#include <linux/smp.h>
27#include <linux/amba/bus.h> 27#include <linux/amba/bus.h>
28 28
29#include <asm/arch_timer.h>
29#include <asm/cacheflush.h> 30#include <asm/cacheflush.h>
30#include <asm/smp_plat.h> 31#include <asm/smp_plat.h>
31#include <asm/smp_scu.h>
32#include <asm/smp_twd.h> 32#include <asm/smp_twd.h>
33#include <asm/hardware/arm_timer.h> 33#include <asm/hardware/arm_timer.h>
34#include <asm/hardware/timer-sp.h> 34#include <asm/hardware/timer-sp.h>
@@ -42,16 +42,7 @@
42#include "sysregs.h" 42#include "sysregs.h"
43 43
44void __iomem *sregs_base; 44void __iomem *sregs_base;
45 45void __iomem *scu_base_addr;
46#define HB_SCU_VIRT_BASE 0xfee00000
47void __iomem *scu_base_addr = ((void __iomem *)(HB_SCU_VIRT_BASE));
48
49static struct map_desc scu_io_desc __initdata = {
50 .virtual = HB_SCU_VIRT_BASE,
51 .pfn = 0, /* run-time */
52 .length = SZ_4K,
53 .type = MT_DEVICE,
54};
55 46
56static void __init highbank_scu_map_io(void) 47static void __init highbank_scu_map_io(void)
57{ 48{
@@ -60,14 +51,7 @@ static void __init highbank_scu_map_io(void)
60 /* Get SCU base */ 51 /* Get SCU base */
61 asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); 52 asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base));
62 53
63 scu_io_desc.pfn = __phys_to_pfn(base); 54 scu_base_addr = ioremap(base, SZ_4K);
64 iotable_init(&scu_io_desc, 1);
65}
66
67static void __init highbank_map_io(void)
68{
69 highbank_scu_map_io();
70 highbank_lluart_map_io();
71} 55}
72 56
73#define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) 57#define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu)))
@@ -83,6 +67,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
83} 67}
84 68
85const static struct of_device_id irq_match[] = { 69const static struct of_device_id irq_match[] = {
70 { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, },
86 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, 71 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
87 {} 72 {}
88}; 73};
@@ -99,6 +84,9 @@ static void __init highbank_init_irq(void)
99{ 84{
100 of_irq_init(irq_match); 85 of_irq_init(irq_match);
101 86
87 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
88 highbank_scu_map_io();
89
102#ifdef CONFIG_CACHE_L2X0 90#ifdef CONFIG_CACHE_L2X0
103 /* Enable PL310 L2 Cache controller */ 91 /* Enable PL310 L2 Cache controller */
104 highbank_smc1(0x102, 0x1); 92 highbank_smc1(0x102, 0x1);
@@ -136,6 +124,9 @@ static void __init highbank_timer_init(void)
136 sp804_clockevents_init(timer_base, irq, "timer0"); 124 sp804_clockevents_init(timer_base, irq, "timer0");
137 125
138 twd_local_timer_of_register(); 126 twd_local_timer_of_register();
127
128 arch_timer_of_register();
129 arch_timer_sched_clock_init();
139} 130}
140 131
141static struct sys_timer highbank_timer = { 132static struct sys_timer highbank_timer = {
@@ -145,7 +136,6 @@ static struct sys_timer highbank_timer = {
145static void highbank_power_off(void) 136static void highbank_power_off(void)
146{ 137{
147 hignbank_set_pwr_shutdown(); 138 hignbank_set_pwr_shutdown();
148 scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
149 139
150 while (1) 140 while (1)
151 cpu_do_idle(); 141 cpu_do_idle();
@@ -211,12 +201,13 @@ static void __init highbank_init(void)
211 201
212static const char *highbank_match[] __initconst = { 202static const char *highbank_match[] __initconst = {
213 "calxeda,highbank", 203 "calxeda,highbank",
204 "calxeda,ecx-2000",
214 NULL, 205 NULL,
215}; 206};
216 207
217DT_MACHINE_START(HIGHBANK, "Highbank") 208DT_MACHINE_START(HIGHBANK, "Highbank")
218 .smp = smp_ops(highbank_smp_ops), 209 .smp = smp_ops(highbank_smp_ops),
219 .map_io = highbank_map_io, 210 .map_io = debug_ll_io_init,
220 .init_irq = highbank_init_irq, 211 .init_irq = highbank_init_irq,
221 .timer = &highbank_timer, 212 .timer = &highbank_timer,
222 .handle_irq = gic_handle_irq, 213 .handle_irq = gic_handle_irq,