--- zzzz-none-000/linux-3.10.107/arch/cris/kernel/setup.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/cris/kernel/setup.c 2021-02-04 17:41:59.000000000 +0000 @@ -19,6 +19,9 @@ #include #include #include +#include +#include +#include #include #include @@ -64,6 +67,10 @@ unsigned long start_pfn, max_pfn; unsigned long memory_start; +#ifdef CONFIG_OF + early_init_dt_scan(__dtb_start); +#endif + /* register an initial console printing routine for printk's */ init_etrax_debug(); @@ -141,6 +148,8 @@ reserve_bootmem(PFN_PHYS(start_pfn), bootmap_size, BOOTMEM_DEFAULT); + unflatten_and_copy_device_tree(); + /* paging_init() sets up the MMU and marks all pages as reserved */ paging_init(); @@ -165,6 +174,7 @@ strcpy(init_utsname()->machine, cris_machine_name); } +#ifdef CONFIG_PROC_FS static void *c_start(struct seq_file *m, loff_t *pos) { return *pos < nr_cpu_ids ? (void *)(int)(*pos + 1) : NULL; @@ -188,6 +198,7 @@ .stop = c_stop, .show = show_cpuinfo, }; +#endif /* CONFIG_PROC_FS */ static int __init topology_init(void) { @@ -202,3 +213,9 @@ subsys_initcall(topology_init); +static int __init cris_of_init(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + return 0; +} +core_initcall(cris_of_init);