--- zzzz-none-000/linux-3.10.107/arch/arm/mach-s3c64xx/s3c6400.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/arm/mach-s3c64xx/s3c6400.c 2021-02-04 17:41:59.000000000 +0000 @@ -9,6 +9,10 @@ * published by the Free Software Foundation. */ +/* + * NOTE: Code in this file is not used when booting with Device Tree support. + */ + #include #include #include @@ -19,7 +23,9 @@ #include #include #include +#include #include +#include #include #include @@ -29,17 +35,15 @@ #include #include -#include #include #include #include -#include #include #include -#include #include "common.h" +#include "onenand-core.h" void __init s3c6400_map_io(void) { @@ -58,12 +62,6 @@ s3c64xx_onenand1_setname("s3c6400-onenand"); } -void __init s3c6400_init_clocks(int xtal) -{ - s3c64xx_register_clocks(xtal, S3C6400_CLKDIV0_ARM_MASK); - s3c64xx_setup_clocks(); -} - void __init s3c6400_init_irq(void) { /* VIC0 does not have IRQS 5..7, @@ -82,6 +80,10 @@ static int __init s3c6400_core_init(void) { + /* Not applicable when using DT. */ + if (of_have_populated_dt()) + return 0; + return subsys_system_register(&s3c6400_subsys, NULL); }