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.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 410a112bb52e..d75b0a78d88a 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -85,12 +85,31 @@ const static struct of_device_id irq_match[] = {
85 {} 85 {}
86}; 86};
87 87
88#ifdef CONFIG_CACHE_L2X0
89static void highbank_l2x0_disable(void)
90{
91 /* Disable PL310 L2 Cache controller */
92 highbank_smc1(0x102, 0x0);
93}
94#endif
95
88static void __init highbank_init_irq(void) 96static void __init highbank_init_irq(void)
89{ 97{
90 of_irq_init(irq_match); 98 of_irq_init(irq_match);
99
100#ifdef CONFIG_CACHE_L2X0
101 /* Enable PL310 L2 Cache controller */
102 highbank_smc1(0x102, 0x1);
91 l2x0_of_init(0, ~0UL); 103 l2x0_of_init(0, ~0UL);
104 outer_cache.disable = highbank_l2x0_disable;
105#endif
92} 106}
93 107
108static struct clk_lookup lookup = {
109 .dev_id = "sp804",
110 .con_id = NULL,
111};
112
94static void __init highbank_timer_init(void) 113static void __init highbank_timer_init(void)
95{ 114{
96 int irq; 115 int irq;
@@ -108,6 +127,8 @@ static void __init highbank_timer_init(void)
108 irq = irq_of_parse_and_map(np, 0); 127 irq = irq_of_parse_and_map(np, 0);
109 128
110 highbank_clocks_init(); 129 highbank_clocks_init();
130 lookup.clk = of_clk_get(np, 0);
131 clkdev_add(&lookup);
111 132
112 sp804_clocksource_and_sched_clock_init(timer_base + 0x20, "timer1"); 133 sp804_clocksource_and_sched_clock_init(timer_base + 0x20, "timer1");
113 sp804_clockevents_init(timer_base, irq, "timer0"); 134 sp804_clockevents_init(timer_base, irq, "timer0");