--- zzzz-none-000/linux-4.4.271/arch/mips/kernel/setup.c 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/arch/mips/kernel/setup.c 2023-04-19 10:22:28.000000000 +0000 @@ -9,6 +9,7 @@ * Copyright (C) 1996 Stoned Elipot * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) 2000, 2001, 2002, 2007 Maciej W. Rozycki + * Copyright (C) 2013 AVM GmbH */ #include #include @@ -38,6 +39,12 @@ #include #include #include +#if defined(CONFIG_AVM_ENHANCED) +#include +#endif/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ + +#include +#include #ifdef CONFIG_MIPS_ELF_APPENDED_DTB const char __section(.appended_dtb) __appended_dtb[0x100000]; @@ -201,6 +208,9 @@ case BOOT_MEM_ROM_DATA: printk(KERN_CONT "(ROM data)\n"); break; + case BOOT_MEM_BOOTLOADER: + printk(KERN_CONT "(bootloader)\n"); + break; case BOOT_MEM_RESERVED: printk(KERN_CONT "(reserved)\n"); break; @@ -823,6 +833,9 @@ case BOOT_MEM_ROM_DATA: res->name = "System RAM"; break; + case BOOT_MEM_BOOTLOADER: + res->name = "bootloader"; + break; case BOOT_MEM_RESERVED: default: res->name = "reserved"; @@ -866,11 +879,20 @@ void __init setup_arch(char **cmdline_p) { + extern void plat_device_tree_setup(void); + +#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_ATH79) + /* ATH79 earlyprintk can run without dt and prom */ + setup_early_printk(); +#endif + cpu_probe(); prom_init(); + plat_device_tree_setup(); + setup_early_fdc_console(); -#ifdef CONFIG_EARLY_PRINTK +#if defined(CONFIG_EARLY_PRINTK) && !defined(CONFIG_ATH79) setup_early_printk(); #endif cpu_report(); @@ -890,6 +912,9 @@ plat_smp_setup(); prefill_possible_map(); + avm_fw_info_init(); + avm_module_mem_init(); + cpu_cache_init(); }