aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:58:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:58:40 -0500
commitb274776c54c320763bc12eb035c0e244f76ccb43 (patch)
treec75b70d0824a7ae029229b19d61884039abf2127 /arch/arm/mach-msm
parentb24174b0cbbe383c5bb6097aeb24480b8fd2d338 (diff)
parent3b1209e7994c4d31ff9932a7f566ae1c96b3c443 (diff)
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Arnd Bergmann: "A large number of cleanups, all over the platforms. This is dominated largely by the Samsung platforms (s3c, s5p, exynos) and a few of the others moving code out of arch/arm into more appropriate subsystems. The clocksource and irqchip drivers are now abstracted to the point where platforms that are already cleaned up do not need to even specify the driver they use, it can all get configured from the device tree as we do for normal device drivers. The clocksource changes basically touch every single platform in the process. We further clean up the use of platform specific header files here, with the goal of turning more of the platforms over to being "multiplatform" enabled, which implies that they cannot expose their headers to architecture independent code any more. It is expected that no functional changes are part of the cleanup. The overall reduction in total code lines is mostly the result of removing broken and obsolete code." * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (133 commits) ARM: mvebu: correct gated clock documentation ARM: kirkwood: add missing include for nsa310 ARM: exynos: move exynos4210-combiner to drivers/irqchip mfd: db8500-prcmu: update resource passing drivers/db8500-cpufreq: delete dangling include ARM: at91: remove NEOCORE 926 board sunxi: Cleanup the reset code and add meaningful registers defines ARM: S3C24XX: header mach/regs-mem.h local ARM: S3C24XX: header mach/regs-power.h local ARM: S3C24XX: header mach/regs-s3c2412-mem.h local ARM: S3C24XX: Remove plat-s3c24xx directory in arch/arm/ ARM: S3C24XX: transform s3c2443 subirqs into new structure ARM: S3C24XX: modify s3c2443 irq init to initialize all irqs ARM: S3C24XX: move s3c2443 irq code to irq.c ARM: S3C24XX: transform s3c2416 irqs into new structure ARM: S3C24XX: modify s3c2416 irq init to initialize all irqs ARM: S3C24XX: move s3c2416 irq init to common irq code ARM: S3C24XX: Modify s3c_irq_wake to use the hwirq property ARM: S3C24XX: Move irq syscore-ops to irq-pm clocksource: always define CLOCKSOURCE_OF_DECLARE ...
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/board-dt-8660.c18
-rw-r--r--arch/arm/mach-msm/board-dt-8960.c18
-rw-r--r--arch/arm/mach-msm/board-halibut.c2
-rw-r--r--arch/arm/mach-msm/board-mahimahi.c4
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c6
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c4
-rw-r--r--arch/arm/mach-msm/board-sapphire.c4
-rw-r--r--arch/arm/mach-msm/board-trout.c2
-rw-r--r--arch/arm/mach-msm/common.h8
-rw-r--r--arch/arm/mach-msm/include/mach/uncompress.h4
-rw-r--r--arch/arm/mach-msm/platsmp.c6
-rw-r--r--arch/arm/mach-msm/timer.c31
12 files changed, 28 insertions, 79 deletions
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index b5b4de2cdf9e..7dcfc5300bbd 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -11,26 +11,15 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irqchip.h>
14#include <linux/of.h> 15#include <linux/of.h>
15#include <linux/of_irq.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/hardware/gic.h>
20 19
21#include <mach/board.h> 20#include <mach/board.h>
22#include "common.h" 21#include "common.h"
23 22
24static const struct of_device_id msm_dt_gic_match[] __initconst = {
25 { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
26 {}
27};
28
29static void __init msm8x60_init_irq(void)
30{
31 of_irq_init(msm_dt_gic_match);
32}
33
34static void __init msm8x60_init_late(void) 23static void __init msm8x60_init_late(void)
35{ 24{
36 smd_debugfs_init(); 25 smd_debugfs_init();
@@ -55,10 +44,9 @@ static const char *msm8x60_fluid_match[] __initdata = {
55DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") 44DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
56 .smp = smp_ops(msm_smp_ops), 45 .smp = smp_ops(msm_smp_ops),
57 .map_io = msm_map_msm8x60_io, 46 .map_io = msm_map_msm8x60_io,
58 .init_irq = msm8x60_init_irq, 47 .init_irq = irqchip_init,
59 .handle_irq = gic_handle_irq,
60 .init_machine = msm8x60_dt_init, 48 .init_machine = msm8x60_dt_init,
61 .init_late = msm8x60_init_late, 49 .init_late = msm8x60_init_late,
62 .timer = &msm_dt_timer, 50 .init_time = msm_dt_timer_init,
63 .dt_compat = msm8x60_fluid_match, 51 .dt_compat = msm8x60_fluid_match,
64MACHINE_END 52MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 4490edb71c17..73019363ffa4 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -11,24 +11,13 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/of_irq.h> 14#include <linux/irqchip.h>
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16 16
17#include <asm/hardware/gic.h>
18#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
19 18
20#include "common.h" 19#include "common.h"
21 20
22static const struct of_device_id msm_dt_gic_match[] __initconst = {
23 { .compatible = "qcom,msm-qgic2", .data = gic_of_init },
24 { }
25};
26
27static void __init msm_dt_init_irq(void)
28{
29 of_irq_init(msm_dt_gic_match);
30}
31
32static void __init msm_dt_init(void) 21static void __init msm_dt_init(void)
33{ 22{
34 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 23 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -42,9 +31,8 @@ static const char * const msm8960_dt_match[] __initconst = {
42DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") 31DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
43 .smp = smp_ops(msm_smp_ops), 32 .smp = smp_ops(msm_smp_ops),
44 .map_io = msm_map_msm8960_io, 33 .map_io = msm_map_msm8960_io,
45 .init_irq = msm_dt_init_irq, 34 .init_irq = irqchip_init,
46 .timer = &msm_dt_timer, 35 .init_time = msm_dt_timer_init,
47 .init_machine = msm_dt_init, 36 .init_machine = msm_dt_init,
48 .dt_compat = msm8960_dt_match, 37 .dt_compat = msm8960_dt_match,
49 .handle_irq = gic_handle_irq,
50MACHINE_END 38MACHINE_END
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index 6ce542e2e21c..84d720af34ab 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -106,5 +106,5 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
106 .init_irq = halibut_init_irq, 106 .init_irq = halibut_init_irq,
107 .init_machine = halibut_init, 107 .init_machine = halibut_init,
108 .init_late = halibut_init_late, 108 .init_late = halibut_init_late,
109 .timer = &msm7x01_timer, 109 .init_time = msm7x01_timer_init,
110MACHINE_END 110MACHINE_END
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c
index df00bc03ce74..30c3496db593 100644
--- a/arch/arm/mach-msm/board-mahimahi.c
+++ b/arch/arm/mach-msm/board-mahimahi.c
@@ -75,7 +75,7 @@ static void __init mahimahi_init_late(void)
75 smd_debugfs_init(); 75 smd_debugfs_init();
76} 76}
77 77
78extern struct sys_timer msm_timer; 78void msm_timer_init(void);
79 79
80MACHINE_START(MAHIMAHI, "mahimahi") 80MACHINE_START(MAHIMAHI, "mahimahi")
81 .atag_offset = 0x100, 81 .atag_offset = 0x100,
@@ -84,5 +84,5 @@ MACHINE_START(MAHIMAHI, "mahimahi")
84 .init_irq = msm_init_irq, 84 .init_irq = msm_init_irq,
85 .init_machine = mahimahi_init, 85 .init_machine = mahimahi_init,
86 .init_late = mahimahi_init_late, 86 .init_late = mahimahi_init_late,
87 .timer = &msm_timer, 87 .init_time = msm_timer_init,
88MACHINE_END 88MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index effa6f4336c7..7bc3f82e3ec9 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -131,7 +131,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
131 .init_irq = msm7x30_init_irq, 131 .init_irq = msm7x30_init_irq,
132 .init_machine = msm7x30_init, 132 .init_machine = msm7x30_init,
133 .init_late = msm7x30_init_late, 133 .init_late = msm7x30_init_late,
134 .timer = &msm7x30_timer, 134 .init_time = msm7x30_timer_init,
135MACHINE_END 135MACHINE_END
136 136
137MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") 137MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
@@ -142,7 +142,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
142 .init_irq = msm7x30_init_irq, 142 .init_irq = msm7x30_init_irq,
143 .init_machine = msm7x30_init, 143 .init_machine = msm7x30_init,
144 .init_late = msm7x30_init_late, 144 .init_late = msm7x30_init_late,
145 .timer = &msm7x30_timer, 145 .init_time = msm7x30_timer_init,
146MACHINE_END 146MACHINE_END
147 147
148MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") 148MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
@@ -153,5 +153,5 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
153 .init_irq = msm7x30_init_irq, 153 .init_irq = msm7x30_init_irq,
154 .init_machine = msm7x30_init, 154 .init_machine = msm7x30_init,
155 .init_late = msm7x30_init_late, 155 .init_late = msm7x30_init_late,
156 .timer = &msm7x30_timer, 156 .init_time = msm7x30_timer_init,
157MACHINE_END 157MACHINE_END
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 2448fcf09eb1..686e7949a73a 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -200,7 +200,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
200 .init_irq = qsd8x50_init_irq, 200 .init_irq = qsd8x50_init_irq,
201 .init_machine = qsd8x50_init, 201 .init_machine = qsd8x50_init,
202 .init_late = qsd8x50_init_late, 202 .init_late = qsd8x50_init_late,
203 .timer = &qsd8x50_timer, 203 .init_time = qsd8x50_timer_init,
204MACHINE_END 204MACHINE_END
205 205
206MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") 206MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
@@ -209,5 +209,5 @@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
209 .init_irq = qsd8x50_init_irq, 209 .init_irq = qsd8x50_init_irq,
210 .init_machine = qsd8x50_init, 210 .init_machine = qsd8x50_init,
211 .init_late = qsd8x50_init_late, 211 .init_late = qsd8x50_init_late,
212 .timer = &qsd8x50_timer, 212 .init_time = qsd8x50_timer_init,
213MACHINE_END 213MACHINE_END
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index b7b0fc7e3278..70730111b37c 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -53,7 +53,7 @@ static struct platform_device *devices[] __initdata = {
53 &msm_device_uart3, 53 &msm_device_uart3,
54}; 54};
55 55
56extern struct sys_timer msm_timer; 56void msm_timer_init(void);
57 57
58static void __init sapphire_init_irq(void) 58static void __init sapphire_init_irq(void)
59{ 59{
@@ -113,5 +113,5 @@ MACHINE_START(SAPPHIRE, "sapphire")
113 .init_irq = sapphire_init_irq, 113 .init_irq = sapphire_init_irq,
114 .init_machine = sapphire_init, 114 .init_machine = sapphire_init,
115 .init_late = sapphire_init_late, 115 .init_late = sapphire_init_late,
116 .timer = &msm_timer, 116 .init_time = msm_timer_init,
117MACHINE_END 117MACHINE_END
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 4ba0800e243e..919bfa32871a 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -110,5 +110,5 @@ MACHINE_START(TROUT, "HTC Dream")
110 .init_irq = trout_init_irq, 110 .init_irq = trout_init_irq,
111 .init_machine = trout_init, 111 .init_machine = trout_init,
112 .init_late = trout_init_late, 112 .init_late = trout_init_late,
113 .timer = &msm7x01_timer, 113 .init_time = msm7x01_timer_init,
114MACHINE_END 114MACHINE_END
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index 633a7159d5ff..ce8215a269e5 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -12,10 +12,10 @@
12#ifndef __MACH_COMMON_H 12#ifndef __MACH_COMMON_H
13#define __MACH_COMMON_H 13#define __MACH_COMMON_H
14 14
15extern struct sys_timer msm7x01_timer; 15extern void msm7x01_timer_init(void);
16extern struct sys_timer msm7x30_timer; 16extern void msm7x30_timer_init(void);
17extern struct sys_timer msm_dt_timer; 17extern void msm_dt_timer_init(void);
18extern struct sys_timer qsd8x50_timer; 18extern void qsd8x50_timer_init(void);
19 19
20extern void msm_map_common_io(void); 20extern void msm_map_common_io(void);
21extern void msm_map_msm7x30_io(void); 21extern void msm_map_msm7x30_io(void);
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index c14011fe832d..fa97a10d8695 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -60,8 +60,4 @@ static inline void arch_decomp_setup(void)
60{ 60{
61} 61}
62 62
63static inline void arch_decomp_wdog(void)
64{
65}
66
67#endif 63#endif
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index 7ed69b69c87c..42932865416a 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -15,8 +15,8 @@
15#include <linux/jiffies.h> 15#include <linux/jiffies.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/irqchip/arm-gic.h>
18 19
19#include <asm/hardware/gic.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/cputype.h> 21#include <asm/cputype.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
@@ -115,7 +115,7 @@ static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *id
115 * the boot monitor to read the system wide flags register, 115 * the boot monitor to read the system wide flags register,
116 * and branch to the address found there. 116 * and branch to the address found there.
117 */ 117 */
118 gic_raise_softirq(cpumask_of(cpu), 0); 118 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
119 119
120 timeout = jiffies + (1 * HZ); 120 timeout = jiffies + (1 * HZ);
121 while (time_before(jiffies, timeout)) { 121 while (time_before(jiffies, timeout)) {
@@ -153,8 +153,6 @@ static void __init msm_smp_init_cpus(void)
153 153
154 for (i = 0; i < ncores; i++) 154 for (i = 0; i < ncores; i++)
155 set_cpu_possible(i, true); 155 set_cpu_possible(i, true);
156
157 set_smp_cross_call(gic_raise_softirq);
158} 156}
159 157
160static void __init msm_smp_prepare_cpus(unsigned int max_cpus) 158static void __init msm_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 476549a8a709..2969027f02fa 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -25,7 +25,6 @@
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26 26
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/hardware/gic.h>
29#include <asm/localtimer.h> 28#include <asm/localtimer.h>
30#include <asm/sched_clock.h> 29#include <asm/sched_clock.h>
31 30
@@ -144,13 +143,9 @@ static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt)
144 evt->rating = msm_clockevent.rating; 143 evt->rating = msm_clockevent.rating;
145 evt->set_mode = msm_timer_set_mode; 144 evt->set_mode = msm_timer_set_mode;
146 evt->set_next_event = msm_timer_set_next_event; 145 evt->set_next_event = msm_timer_set_next_event;
147 evt->shift = msm_clockevent.shift;
148 evt->mult = div_sc(GPT_HZ, NSEC_PER_SEC, evt->shift);
149 evt->max_delta_ns = clockevent_delta2ns(0xf0000000, evt);
150 evt->min_delta_ns = clockevent_delta2ns(4, evt);
151 146
152 *__this_cpu_ptr(msm_evt.percpu_evt) = evt; 147 *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
153 clockevents_register_device(evt); 148 clockevents_config_and_register(evt, GPT_HZ, 4, 0xf0000000);
154 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING); 149 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
155 return 0; 150 return 0;
156} 151}
@@ -229,7 +224,7 @@ static const struct of_device_id msm_gpt_match[] __initconst = {
229 { }, 224 { },
230}; 225};
231 226
232static void __init msm_dt_timer_init(void) 227void __init msm_dt_timer_init(void)
233{ 228{
234 struct device_node *np; 229 struct device_node *np;
235 u32 freq; 230 u32 freq;
@@ -296,10 +291,6 @@ static void __init msm_dt_timer_init(void)
296 291
297 msm_timer_init(freq, 32, irq, !!percpu_offset); 292 msm_timer_init(freq, 32, irq, !!percpu_offset);
298} 293}
299
300struct sys_timer msm_dt_timer = {
301 .init = msm_dt_timer_init
302};
303#endif 294#endif
304 295
305static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) 296static int __init msm_timer_map(phys_addr_t event, phys_addr_t source)
@@ -317,7 +308,7 @@ static int __init msm_timer_map(phys_addr_t event, phys_addr_t source)
317 return 0; 308 return 0;
318} 309}
319 310
320static void __init msm7x01_timer_init(void) 311void __init msm7x01_timer_init(void)
321{ 312{
322 struct clocksource *cs = &msm_clocksource; 313 struct clocksource *cs = &msm_clocksource;
323 314
@@ -330,28 +321,16 @@ static void __init msm7x01_timer_init(void)
330 false); 321 false);
331} 322}
332 323
333struct sys_timer msm7x01_timer = { 324void __init msm7x30_timer_init(void)
334 .init = msm7x01_timer_init
335};
336
337static void __init msm7x30_timer_init(void)
338{ 325{
339 if (msm_timer_map(0xc0100004, 0xc0100024)) 326 if (msm_timer_map(0xc0100004, 0xc0100024))
340 return; 327 return;
341 msm_timer_init(24576000 / 4, 32, 1, false); 328 msm_timer_init(24576000 / 4, 32, 1, false);
342} 329}
343 330
344struct sys_timer msm7x30_timer = { 331void __init qsd8x50_timer_init(void)
345 .init = msm7x30_timer_init
346};
347
348static void __init qsd8x50_timer_init(void)
349{ 332{
350 if (msm_timer_map(0xAC100000, 0xAC100010)) 333 if (msm_timer_map(0xAC100000, 0xAC100010))
351 return; 334 return;
352 msm_timer_init(19200000 / 4, 32, 7, false); 335 msm_timer_init(19200000 / 4, 32, 7, false);
353} 336}
354
355struct sys_timer qsd8x50_timer = {
356 .init = qsd8x50_timer_init
357};