--- zzzz-none-000/linux-3.10.107/arch/mips/mti-malta/malta-setup.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/mips/mti-malta/malta-setup.c 2021-02-04 17:41:59.000000000 +0000 @@ -21,17 +21,20 @@ #include #include #include +#include #include #include #include #include +#include +#include #include #include #include #include +#include #include -#include #ifdef CONFIG_VT #include #endif @@ -80,11 +83,7 @@ return "MIPS Malta"; } -#if defined(CONFIG_MIPS_MT_SMTC) -const char display_string[] = " SMTC LINUX ON MALTA "; -#else const char display_string[] = " LINUX ON MALTA "; -#endif /* CONFIG_MIPS_MT_SMTC */ #ifdef CONFIG_BLK_DEV_FD static void __init fd_activate(void) @@ -132,7 +131,7 @@ BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); pr_info("Enabled Bonito IOBC coherency\n"); } - } else if (gcmp_niocu() != 0) { + } else if (mips_cm_numiocu() != 0) { /* Nothing special needs to be done to enable coherency */ pr_info("CMP IOCU detected\n"); cfg = __raw_readl((u32 *)CKSEG1ADDR(ROCIT_CONFIG_GEN0)); @@ -171,7 +170,6 @@ #endif } -#ifdef CONFIG_BLK_DEV_IDE static void __init pci_clock_check(void) { unsigned int __iomem *jmpr_p = @@ -181,18 +179,25 @@ 33, 20, 25, 30, 12, 16, 37, 10 }; int pciclock = pciclocks[jmpr]; - char *argptr = fw_getcmdline(); + char *optptr, *argptr = fw_getcmdline(); + + /* + * If user passed a pci_clock= option, don't tack on another one + */ + optptr = strstr(argptr, "pci_clock="); + if (optptr && (optptr == argptr || optptr[-1] == ' ')) + return; - if (pciclock != 33 && !strstr(argptr, "idebus=")) { - pr_warn("WARNING: PCI clock is %dMHz, setting idebus\n", + if (pciclock != 33) { + pr_warn("WARNING: PCI clock is %dMHz, setting pci_clock\n", pciclock); argptr += strlen(argptr); - sprintf(argptr, " idebus=%d", pciclock); + sprintf(argptr, " pci_clock=%d", pciclock); if (pciclock < 20 || pciclock > 66) - pr_warn("WARNING: IDE timing calculations will be incorrect\n"); + pr_warn("WARNING: IDE timing calculations will be " + "incorrect\n"); } } -#endif #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) static void __init screen_info_setup(void) @@ -252,6 +257,14 @@ void __init plat_mem_setup(void) { unsigned int i; + void *fdt = __dtb_start; + + fdt = malta_dt_shim(fdt); + __dt_setup_arch(fdt); + + if (config_enabled(CONFIG_EVA)) + /* EVA has already been configured in mach-malta/kernel-init.h */ + pr_info("Enhanced Virtual Addressing (EVA) activated\n"); mips_pcibios_init(); @@ -274,9 +287,7 @@ plat_setup_iocoherency(); -#ifdef CONFIG_BLK_DEV_IDE pci_clock_check(); -#endif #ifdef CONFIG_BLK_DEV_FD fd_activate();