aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-05-02 03:53:20 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-05-08 08:36:17 -0400
commitc633c531f8afbcfd422409c3350b8dc55baa485e (patch)
tree5c43940b04e2728f376404ace128fd7283dd5646 /arch/arm
parent8321b758e08cae7fb02663f26efee4ba985c2ae5 (diff)
ARM: msm: use machine specific hook for late init
Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-msm/board-halibut.c6
-rw-r--r--arch/arm/mach-msm/board-mahimahi.c6
-rw-r--r--arch/arm/mach-msm/board-msm7x27.c9
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c8
-rw-r--r--arch/arm/mach-msm/board-msm8960.c7
-rw-r--r--arch/arm/mach-msm/board-msm8x60.c10
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c7
-rw-r--r--arch/arm/mach-msm/board-sapphire.c6
-rw-r--r--arch/arm/mach-msm/board-trout.c6
-rw-r--r--arch/arm/mach-msm/include/mach/board.h6
-rw-r--r--arch/arm/mach-msm/smd_debug.c3
11 files changed, 72 insertions, 2 deletions
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index 26aac363a064..4fa3e99d9a62 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -94,6 +94,11 @@ static void __init halibut_map_io(void)
94 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a); 94 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a);
95} 95}
96 96
97static void __init halibut_init_late(void)
98{
99 smd_debugfs_init();
100}
101
97MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") 102MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
98 .atag_offset = 0x100, 103 .atag_offset = 0x100,
99 .fixup = halibut_fixup, 104 .fixup = halibut_fixup,
@@ -101,5 +106,6 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
101 .init_early = halibut_init_early, 106 .init_early = halibut_init_early,
102 .init_irq = halibut_init_irq, 107 .init_irq = halibut_init_irq,
103 .init_machine = halibut_init, 108 .init_machine = halibut_init,
109 .init_late = halibut_init_late,
104 .timer = &msm_timer, 110 .timer = &msm_timer,
105MACHINE_END 111MACHINE_END
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c
index 5a4882fc6f7a..cf1f89a5dc62 100644
--- a/arch/arm/mach-msm/board-mahimahi.c
+++ b/arch/arm/mach-msm/board-mahimahi.c
@@ -71,6 +71,11 @@ static void __init mahimahi_map_io(void)
71 msm_clock_init(); 71 msm_clock_init();
72} 72}
73 73
74static void __init mahimahi_init_late(void)
75{
76 smd_debugfs_init();
77}
78
74extern struct sys_timer msm_timer; 79extern struct sys_timer msm_timer;
75 80
76MACHINE_START(MAHIMAHI, "mahimahi") 81MACHINE_START(MAHIMAHI, "mahimahi")
@@ -79,5 +84,6 @@ MACHINE_START(MAHIMAHI, "mahimahi")
79 .map_io = mahimahi_map_io, 84 .map_io = mahimahi_map_io,
80 .init_irq = msm_init_irq, 85 .init_irq = msm_init_irq,
81 .init_machine = mahimahi_init, 86 .init_machine = mahimahi_init,
87 .init_late = mahimahi_init_late,
82 .timer = &msm_timer, 88 .timer = &msm_timer,
83MACHINE_END 89MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c
index 6d84ee740df4..451ab1d43c92 100644
--- a/arch/arm/mach-msm/board-msm7x27.c
+++ b/arch/arm/mach-msm/board-msm7x27.c
@@ -128,11 +128,17 @@ static void __init msm7x2x_map_io(void)
128#endif 128#endif
129} 129}
130 130
131static void __init msm7x2x_init_late(void)
132{
133 smd_debugfs_init();
134}
135
131MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") 136MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF")
132 .atag_offset = 0x100, 137 .atag_offset = 0x100,
133 .map_io = msm7x2x_map_io, 138 .map_io = msm7x2x_map_io,
134 .init_irq = msm7x2x_init_irq, 139 .init_irq = msm7x2x_init_irq,
135 .init_machine = msm7x2x_init, 140 .init_machine = msm7x2x_init,
141 .init_late = msm7x2x_init_late,
136 .timer = &msm_timer, 142 .timer = &msm_timer,
137MACHINE_END 143MACHINE_END
138 144
@@ -141,6 +147,7 @@ MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA")
141 .map_io = msm7x2x_map_io, 147 .map_io = msm7x2x_map_io,
142 .init_irq = msm7x2x_init_irq, 148 .init_irq = msm7x2x_init_irq,
143 .init_machine = msm7x2x_init, 149 .init_machine = msm7x2x_init,
150 .init_late = msm7x2x_init_late,
144 .timer = &msm_timer, 151 .timer = &msm_timer,
145MACHINE_END 152MACHINE_END
146 153
@@ -149,6 +156,7 @@ MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF")
149 .map_io = msm7x2x_map_io, 156 .map_io = msm7x2x_map_io,
150 .init_irq = msm7x2x_init_irq, 157 .init_irq = msm7x2x_init_irq,
151 .init_machine = msm7x2x_init, 158 .init_machine = msm7x2x_init,
159 .init_late = msm7x2x_init_late,
152 .timer = &msm_timer, 160 .timer = &msm_timer,
153MACHINE_END 161MACHINE_END
154 162
@@ -157,5 +165,6 @@ MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA")
157 .map_io = msm7x2x_map_io, 165 .map_io = msm7x2x_map_io,
158 .init_irq = msm7x2x_init_irq, 166 .init_irq = msm7x2x_init_irq,
159 .init_machine = msm7x2x_init, 167 .init_machine = msm7x2x_init,
168 .init_late = msm7x2x_init_late,
160 .timer = &msm_timer, 169 .timer = &msm_timer,
161MACHINE_END 170MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index db81ed531031..6095d355f514 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -120,6 +120,11 @@ static void __init msm7x30_map_io(void)
120 msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30); 120 msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30);
121} 121}
122 122
123static void __init msm7x30_init_late(void)
124{
125 smd_debugfs_init();
126}
127
123MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") 128MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
124 .atag_offset = 0x100, 129 .atag_offset = 0x100,
125 .fixup = msm7x30_fixup, 130 .fixup = msm7x30_fixup,
@@ -127,6 +132,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
127 .map_io = msm7x30_map_io, 132 .map_io = msm7x30_map_io,
128 .init_irq = msm7x30_init_irq, 133 .init_irq = msm7x30_init_irq,
129 .init_machine = msm7x30_init, 134 .init_machine = msm7x30_init,
135 .init_late = msm7x30_init_late,
130 .timer = &msm_timer, 136 .timer = &msm_timer,
131MACHINE_END 137MACHINE_END
132 138
@@ -137,6 +143,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
137 .map_io = msm7x30_map_io, 143 .map_io = msm7x30_map_io,
138 .init_irq = msm7x30_init_irq, 144 .init_irq = msm7x30_init_irq,
139 .init_machine = msm7x30_init, 145 .init_machine = msm7x30_init,
146 .init_late = msm7x30_init_late,
140 .timer = &msm_timer, 147 .timer = &msm_timer,
141MACHINE_END 148MACHINE_END
142 149
@@ -147,5 +154,6 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
147 .map_io = msm7x30_map_io, 154 .map_io = msm7x30_map_io,
148 .init_irq = msm7x30_init_irq, 155 .init_irq = msm7x30_init_irq,
149 .init_machine = msm7x30_init, 156 .init_machine = msm7x30_init,
157 .init_late = msm7x30_init_late,
150 .timer = &msm_timer, 158 .timer = &msm_timer,
151MACHINE_END 159MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index ed3598128530..65f4a1daa2e5 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -93,6 +93,11 @@ static void __init msm8960_rumi3_init(void)
93 platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices)); 93 platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices));
94} 94}
95 95
96static void __init msm8960_init_late(void)
97{
98 smd_debugfs_init();
99}
100
96MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") 101MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
97 .fixup = msm8960_fixup, 102 .fixup = msm8960_fixup,
98 .reserve = msm8960_reserve, 103 .reserve = msm8960_reserve,
@@ -101,6 +106,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
101 .timer = &msm_timer, 106 .timer = &msm_timer,
102 .handle_irq = gic_handle_irq, 107 .handle_irq = gic_handle_irq,
103 .init_machine = msm8960_sim_init, 108 .init_machine = msm8960_sim_init,
109 .init_late = msm8960_init_late,
104MACHINE_END 110MACHINE_END
105 111
106MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") 112MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
@@ -111,5 +117,6 @@ MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
111 .timer = &msm_timer, 117 .timer = &msm_timer,
112 .handle_irq = gic_handle_irq, 118 .handle_irq = gic_handle_irq,
113 .init_machine = msm8960_rumi3_init, 119 .init_machine = msm8960_rumi3_init,
120 .init_late = msm8960_init_late,
114MACHINE_END 121MACHINE_END
115 122
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 962e71169750..62f2c93335a3 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -68,6 +68,11 @@ static void __init msm8x60_init(void)
68{ 68{
69} 69}
70 70
71static void __init msm8x60_init_late(void)
72{
73 smd_debugfs_init();
74}
75
71#ifdef CONFIG_OF 76#ifdef CONFIG_OF
72static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = { 77static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
73 {} 78 {}
@@ -106,6 +111,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
106 .init_irq = msm8x60_init_irq, 111 .init_irq = msm8x60_init_irq,
107 .handle_irq = gic_handle_irq, 112 .handle_irq = gic_handle_irq,
108 .init_machine = msm8x60_init, 113 .init_machine = msm8x60_init,
114 .init_late = msm8x60_init_late,
109 .timer = &msm_timer, 115 .timer = &msm_timer,
110MACHINE_END 116MACHINE_END
111 117
@@ -116,6 +122,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
116 .init_irq = msm8x60_init_irq, 122 .init_irq = msm8x60_init_irq,
117 .handle_irq = gic_handle_irq, 123 .handle_irq = gic_handle_irq,
118 .init_machine = msm8x60_init, 124 .init_machine = msm8x60_init,
125 .init_late = msm8x60_init_late,
119 .timer = &msm_timer, 126 .timer = &msm_timer,
120MACHINE_END 127MACHINE_END
121 128
@@ -126,6 +133,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
126 .init_irq = msm8x60_init_irq, 133 .init_irq = msm8x60_init_irq,
127 .handle_irq = gic_handle_irq, 134 .handle_irq = gic_handle_irq,
128 .init_machine = msm8x60_init, 135 .init_machine = msm8x60_init,
136 .init_late = msm8x60_init_late,
129 .timer = &msm_timer, 137 .timer = &msm_timer,
130MACHINE_END 138MACHINE_END
131 139
@@ -136,6 +144,7 @@ MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
136 .init_irq = msm8x60_init_irq, 144 .init_irq = msm8x60_init_irq,
137 .handle_irq = gic_handle_irq, 145 .handle_irq = gic_handle_irq,
138 .init_machine = msm8x60_init, 146 .init_machine = msm8x60_init,
147 .init_late = msm8x60_init_late,
139 .timer = &msm_timer, 148 .timer = &msm_timer,
140MACHINE_END 149MACHINE_END
141 150
@@ -145,6 +154,7 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
145 .map_io = msm8x60_map_io, 154 .map_io = msm8x60_map_io,
146 .init_irq = msm8x60_init_irq, 155 .init_irq = msm8x60_init_irq,
147 .init_machine = msm8x60_dt_init, 156 .init_machine = msm8x60_dt_init,
157 .init_late = msm8x60_init_late,
148 .timer = &msm_timer, 158 .timer = &msm_timer,
149 .dt_compat = msm8x60_fluid_match, 159 .dt_compat = msm8x60_fluid_match,
150MACHINE_END 160MACHINE_END
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 7e8909c978c3..dd625aaa39d5 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -191,11 +191,17 @@ static void __init qsd8x50_init(void)
191 qsd8x50_init_mmc(); 191 qsd8x50_init_mmc();
192} 192}
193 193
194static void __init qsd8x50_init_late(void)
195{
196 smd_debugfs_init();
197}
198
194MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") 199MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
195 .atag_offset = 0x100, 200 .atag_offset = 0x100,
196 .map_io = qsd8x50_map_io, 201 .map_io = qsd8x50_map_io,
197 .init_irq = qsd8x50_init_irq, 202 .init_irq = qsd8x50_init_irq,
198 .init_machine = qsd8x50_init, 203 .init_machine = qsd8x50_init,
204 .init_late = qsd8x50_init_late,
199 .timer = &msm_timer, 205 .timer = &msm_timer,
200MACHINE_END 206MACHINE_END
201 207
@@ -204,5 +210,6 @@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
204 .map_io = qsd8x50_map_io, 210 .map_io = qsd8x50_map_io,
205 .init_irq = qsd8x50_init_irq, 211 .init_irq = qsd8x50_init_irq,
206 .init_machine = qsd8x50_init, 212 .init_machine = qsd8x50_init,
213 .init_late = qsd8x50_init_late,
207 .timer = &msm_timer, 214 .timer = &msm_timer,
208MACHINE_END 215MACHINE_END
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index 4a8ea0d40b6f..2e569ab10eef 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -101,6 +101,11 @@ static void __init sapphire_map_io(void)
101 msm_clock_init(); 101 msm_clock_init();
102} 102}
103 103
104static void __init sapphire_init_late(void)
105{
106 smd_debugfs_init();
107}
108
104MACHINE_START(SAPPHIRE, "sapphire") 109MACHINE_START(SAPPHIRE, "sapphire")
105/* Maintainer: Brian Swetland <swetland@google.com> */ 110/* Maintainer: Brian Swetland <swetland@google.com> */
106 .atag_offset = 0x100, 111 .atag_offset = 0x100,
@@ -108,5 +113,6 @@ MACHINE_START(SAPPHIRE, "sapphire")
108 .map_io = sapphire_map_io, 113 .map_io = sapphire_map_io,
109 .init_irq = sapphire_init_irq, 114 .init_irq = sapphire_init_irq,
110 .init_machine = sapphire_init, 115 .init_machine = sapphire_init,
116 .init_late = sapphire_init_late,
111 .timer = &msm_timer, 117 .timer = &msm_timer,
112MACHINE_END 118MACHINE_END
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index d4060a37e23d..bbe13f12fa01 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -98,6 +98,11 @@ static void __init trout_map_io(void)
98 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a); 98 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a);
99} 99}
100 100
101static void __init trout_init_late(void)
102{
103 smd_debugfs_init();
104}
105
101MACHINE_START(TROUT, "HTC Dream") 106MACHINE_START(TROUT, "HTC Dream")
102 .atag_offset = 0x100, 107 .atag_offset = 0x100,
103 .fixup = trout_fixup, 108 .fixup = trout_fixup,
@@ -105,5 +110,6 @@ MACHINE_START(TROUT, "HTC Dream")
105 .init_early = trout_init_early, 110 .init_early = trout_init_early,
106 .init_irq = trout_init_irq, 111 .init_irq = trout_init_irq,
107 .init_machine = trout_init, 112 .init_machine = trout_init,
113 .init_late = trout_init_late,
108 .timer = &msm_timer, 114 .timer = &msm_timer,
109MACHINE_END 115MACHINE_END
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index 2ce8f1f2fc4d..435f8edfafd1 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -47,4 +47,10 @@ int __init msm_add_sdcc(unsigned int controller,
47 struct msm_mmc_platform_data *plat, 47 struct msm_mmc_platform_data *plat,
48 unsigned int stat_irq, unsigned long stat_irq_flags); 48 unsigned int stat_irq, unsigned long stat_irq_flags);
49 49
50#if defined(CONFIG_MSM_SMD) && defined(CONFIG_DEBUG_FS)
51int smd_debugfs_init(void);
52#else
53static inline int smd_debugfs_init(void) { return 0; }
54#endif
55
50#endif 56#endif
diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c
index c56df9e932ae..8056b3e5590f 100644
--- a/arch/arm/mach-msm/smd_debug.c
+++ b/arch/arm/mach-msm/smd_debug.c
@@ -216,7 +216,7 @@ static void debug_create(const char *name, umode_t mode,
216 debugfs_create_file(name, mode, dent, fill, &debug_ops); 216 debugfs_create_file(name, mode, dent, fill, &debug_ops);
217} 217}
218 218
219static int smd_debugfs_init(void) 219int __init smd_debugfs_init(void)
220{ 220{
221 struct dentry *dent; 221 struct dentry *dent;
222 222
@@ -234,7 +234,6 @@ static int smd_debugfs_init(void)
234 return 0; 234 return 0;
235} 235}
236 236
237late_initcall(smd_debugfs_init);
238#endif 237#endif
239 238
240 239