realtek: Enable Multithreading support in prom.c
authorBirger Koblitz <git@birger-koblitz.de>
Thu, 30 Dec 2021 21:53:55 +0000 (22:53 +0100)
committerPaul Spooren <mail@aparcar.org>
Wed, 2 Feb 2022 09:32:57 +0000 (10:32 +0100)
Adds Multithreading support functions in prom.c.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c

index 3390c043347ef259b7a5f5f6b6c101cbada61716..d1a4d704b5152714c003e18cc7e1c8dfdbec8d39 100644 (file)
@@ -18,6 +18,8 @@
 #include <asm/addrspace.h>
 #include <asm/page.h>
 #include <asm/cpu.h>
+#include <asm/smp-ops.h>
+#include <asm/mips-cps.h>
 
 #include <mach-rtl83xx.h>
 
@@ -179,5 +181,28 @@ void __init prom_init(void)
 
        pr_info("SoC Type: %s\n", get_system_type());
 
+       /* Early detection of CMP support */
+       if(soc_info.family == RTL9310_FAMILY_ID) {
+               mips_cm_probe();
+               mips_cpc_probe();
+       }
+
        prom_init_cmdline();
+
+#ifdef  CONFIG_MIPS_CPS
+       if (!register_cps_smp_ops()) {
+               return;
+       }
+#endif
+#ifdef  CONFIG_MIPS_CMP
+       if (!register_cmp_smp_ops()) {
+               return;
+       }
+#endif
+#ifdef CONFIG_MIPS_MT_SMP
+       if (!register_vsmp_smp_ops()) {
+               return;
+       }
+#endif
+       register_up_smp_ops();
 }