aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/exynos.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos/exynos.c')
-rw-r--r--arch/arm/mach-exynos/exynos.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 90aab4d75d08..f38cf7c110cc 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -184,6 +184,28 @@ void __init exynos_cpufreq_init(void)
184 platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); 184 platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
185} 185}
186 186
187void __iomem *sysram_base_addr;
188void __iomem *sysram_ns_base_addr;
189
190void __init exynos_sysram_init(void)
191{
192 struct device_node *node;
193
194 for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram") {
195 if (!of_device_is_available(node))
196 continue;
197 sysram_base_addr = of_iomap(node, 0);
198 break;
199 }
200
201 for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram-ns") {
202 if (!of_device_is_available(node))
203 continue;
204 sysram_ns_base_addr = of_iomap(node, 0);
205 break;
206 }
207}
208
187void __init exynos_init_late(void) 209void __init exynos_init_late(void)
188{ 210{
189 if (of_machine_is_compatible("samsung,exynos5440")) 211 if (of_machine_is_compatible("samsung,exynos5440"))
@@ -198,7 +220,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
198 int depth, void *data) 220 int depth, void *data)
199{ 221{
200 struct map_desc iodesc; 222 struct map_desc iodesc;
201 __be32 *reg; 223 const __be32 *reg;
202 int len; 224 int len;
203 225
204 if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && 226 if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
@@ -271,6 +293,13 @@ static void __init exynos_dt_machine_init(void)
271 } 293 }
272 } 294 }
273 295
296 /*
297 * This is called from smp_prepare_cpus if we've built for SMP, but
298 * we still need to set it up for PM and firmware ops if not.
299 */
300 if (!IS_ENABLED(SMP))
301 exynos_sysram_init();
302
274 exynos_cpuidle_init(); 303 exynos_cpuidle_init();
275 exynos_cpufreq_init(); 304 exynos_cpufreq_init();
276 305