aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/exynos.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 14:00:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 14:00:26 -0400
commit44c916d58b9ef1f2c4aec2def57fa8289c716a60 (patch)
treee4c886dd0948eefeed883f66c9a21f39a5731103 /arch/arm/mach-exynos/exynos.c
parent889fa782bf8ebe7c0d0ed0a9429bf43197f0f64e (diff)
parentc4846a7823bfd34ecb2dc56b025e19285432d08d (diff)
Merge tag 'cleanup-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Olof Johansson: "This merge window brings a good size of cleanups on various platforms. Among the bigger ones: - Removal of Samsung s5pc100 and s5p64xx platforms. Both of these have lacked active support for quite a while, and after asking around nobody showed interest in keeping them around. If needed, they could be resurrected in the future but it's more likely that we would prefer reintroduction of them as DT and multiplatform-enabled platforms instead. - OMAP4 controller code register define diet. They defined a lot of registers that were never actually used, etc. - Move of some of the Tegra platform code (PMC, APBIO, fuse, powergate) to drivers/soc so it can be shared with 64-bit code. This also converts them over to traditional driver models where possible. - Removal of legacy gpio-samsung driver, since the last users have been removed (moved to pinctrl) Plus a bunch of smaller changes for various platforms that sort of dissapear in the diffstat for the above. clps711x cleanups, shmobile header file refactoring/moves for multiplatform friendliness, some misc cleanups, etc" * tag 'cleanup-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (117 commits) drivers: CCI: Correct use of ! and & video: clcd-versatile: Depend on ARM video: fix up versatile CLCD helper move MAINTAINERS: Add sdhci-st file to ARCH/STI architecture ARM: EXYNOS: Fix build breakge with PM_SLEEP=n MAINTAINERS: Remove Kirkwood ARM: tegra: Convert PMC to a driver soc/tegra: fuse: Set up in early initcall ARM: tegra: Always lock the CPU reset vector ARM: tegra: Setup CPU hotplug in a pure initcall soc/tegra: Implement runtime check for Tegra SoCs soc/tegra: fuse: fix dummy functions soc/tegra: fuse: move APB DMA into Tegra20 fuse driver soc/tegra: Add efuse and apbmisc bindings soc/tegra: Add efuse driver for Tegra ARM: tegra: move fuse exports to soc/tegra/fuse.h ARM: tegra: export apb dma readl/writel ARM: tegra: Use a function to get the chip ID ARM: tegra: Sort includes alphabetically ARM: tegra: Move includes to include/soc/tegra ...
Diffstat (limited to 'arch/arm/mach-exynos/exynos.c')
-rw-r--r--arch/arm/mach-exynos/exynos.c44
1 files changed, 41 insertions, 3 deletions
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 66c9b9614f3c..3164ef2e6b6c 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -19,6 +19,7 @@
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/pm_domain.h> 21#include <linux/pm_domain.h>
22#include <linux/irqchip.h>
22 23
23#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
24#include <asm/hardware/cache-l2x0.h> 25#include <asm/hardware/cache-l2x0.h>
@@ -29,6 +30,9 @@
29#include "common.h" 30#include "common.h"
30#include "mfc.h" 31#include "mfc.h"
31#include "regs-pmu.h" 32#include "regs-pmu.h"
33#include "regs-sys.h"
34
35void __iomem *pmu_base_addr;
32 36
33static struct map_desc exynos4_iodesc[] __initdata = { 37static struct map_desc exynos4_iodesc[] __initdata = {
34 { 38 {
@@ -143,7 +147,7 @@ static struct map_desc exynos5_iodesc[] __initdata = {
143 }, 147 },
144}; 148};
145 149
146void exynos_restart(enum reboot_mode mode, const char *cmd) 150static void exynos_restart(enum reboot_mode mode, const char *cmd)
147{ 151{
148 struct device_node *np; 152 struct device_node *np;
149 u32 val = 0x1; 153 u32 val = 0x1;
@@ -204,7 +208,7 @@ void __init exynos_sysram_init(void)
204 } 208 }
205} 209}
206 210
207void __init exynos_init_late(void) 211static void __init exynos_init_late(void)
208{ 212{
209 if (of_machine_is_compatible("samsung,exynos5440")) 213 if (of_machine_is_compatible("samsung,exynos5440"))
210 /* to be supported later */ 214 /* to be supported later */
@@ -251,7 +255,7 @@ static void __init exynos_map_io(void)
251 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); 255 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
252} 256}
253 257
254void __init exynos_init_io(void) 258static void __init exynos_init_io(void)
255{ 259{
256 debug_ll_io_init(); 260 debug_ll_io_init();
257 261
@@ -263,6 +267,39 @@ void __init exynos_init_io(void)
263 exynos_map_io(); 267 exynos_map_io();
264} 268}
265 269
270static const struct of_device_id exynos_dt_pmu_match[] = {
271 { .compatible = "samsung,exynos3250-pmu" },
272 { .compatible = "samsung,exynos4210-pmu" },
273 { .compatible = "samsung,exynos4212-pmu" },
274 { .compatible = "samsung,exynos4412-pmu" },
275 { .compatible = "samsung,exynos5250-pmu" },
276 { .compatible = "samsung,exynos5420-pmu" },
277 { /*sentinel*/ },
278};
279
280static void exynos_map_pmu(void)
281{
282 struct device_node *np;
283
284 np = of_find_matching_node(NULL, exynos_dt_pmu_match);
285 if (np)
286 pmu_base_addr = of_iomap(np, 0);
287
288 if (!pmu_base_addr)
289 panic("failed to find exynos pmu register\n");
290}
291
292static void __init exynos_init_irq(void)
293{
294 irqchip_init();
295 /*
296 * Since platsmp.c needs pmu base address by the time
297 * DT is not unflatten so we can't use DT APIs before
298 * init_irq
299 */
300 exynos_map_pmu();
301}
302
266static void __init exynos_dt_machine_init(void) 303static void __init exynos_dt_machine_init(void)
267{ 304{
268 struct device_node *i2c_np; 305 struct device_node *i2c_np;
@@ -352,6 +389,7 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
352 .smp = smp_ops(exynos_smp_ops), 389 .smp = smp_ops(exynos_smp_ops),
353 .map_io = exynos_init_io, 390 .map_io = exynos_init_io,
354 .init_early = exynos_firmware_init, 391 .init_early = exynos_firmware_init,
392 .init_irq = exynos_init_irq,
355 .init_machine = exynos_dt_machine_init, 393 .init_machine = exynos_dt_machine_init,
356 .init_late = exynos_init_late, 394 .init_late = exynos_init_late,
357 .dt_compat = exynos_dt_compat, 395 .dt_compat = exynos_dt_compat,