diff options
author | Tomasz Figa <tomasz.figa@gmail.com> | 2013-08-25 13:37:34 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-09-16 17:48:27 -0400 |
commit | c836c90e276ec1b1b4193bb6f0b5e6b11cc69f83 (patch) | |
tree | 7aba4732b5b76ba35c3bd8e96044154135e5f891 /arch/arm/plat-samsung | |
parent | 81e9c1794f24376b0515756e300476d9fec77c0b (diff) |
ARM: S3C64XX: Bypass legacy initialization when booting with DT
This patch allows bypassing most of legacy initialization when booting
an S3C64xx-based board using device tree, by adding conditional checks
for DT presence to initcalls which are no longer necessary when booting
with DT..
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/init.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c index 50a3ea0037db..aa9511b6914a 100644 --- a/arch/arm/plat-samsung/init.c +++ b/arch/arm/plat-samsung/init.c | |||
@@ -11,12 +11,18 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* | ||
15 | * NOTE: Code in this file is not used on S3C64xx when booting with | ||
16 | * Device Tree support. | ||
17 | */ | ||
18 | |||
14 | #include <linux/init.h> | 19 | #include <linux/init.h> |
15 | #include <linux/module.h> | 20 | #include <linux/module.h> |
16 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
18 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
19 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/of.h> | ||
20 | 26 | ||
21 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
22 | 28 | ||
@@ -148,8 +154,12 @@ static int __init s3c_arch_init(void) | |||
148 | 154 | ||
149 | // do the correct init for cpu | 155 | // do the correct init for cpu |
150 | 156 | ||
151 | if (cpu == NULL) | 157 | if (cpu == NULL) { |
158 | /* Not needed when booting with device tree. */ | ||
159 | if (of_have_populated_dt()) | ||
160 | return 0; | ||
152 | panic("s3c_arch_init: NULL cpu\n"); | 161 | panic("s3c_arch_init: NULL cpu\n"); |
162 | } | ||
153 | 163 | ||
154 | ret = (cpu->init)(); | 164 | ret = (cpu->init)(); |
155 | if (ret != 0) | 165 | if (ret != 0) |