From c836c90e276ec1b1b4193bb6f0b5e6b11cc69f83 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Mon, 26 Aug 2013 02:37:34 +0900 Subject: 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 Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/init.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-samsung/init.c') 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 @@ * published by the Free Software Foundation. */ +/* + * NOTE: Code in this file is not used on S3C64xx when booting with + * Device Tree support. + */ + #include #include #include #include #include #include +#include #include @@ -148,8 +154,12 @@ static int __init s3c_arch_init(void) // do the correct init for cpu - if (cpu == NULL) + if (cpu == NULL) { + /* Not needed when booting with device tree. */ + if (of_have_populated_dt()) + return 0; panic("s3c_arch_init: NULL cpu\n"); + } ret = (cpu->init)(); if (ret != 0) -- cgit