]> git.baikalelectronics.ru Git - uboot.git/commitdiff
mips: octeon: cpu.c: Move bootmem init to arch_early_init_r()
authorStefan Roese <sr@denx.de>
Thu, 7 Apr 2022 07:11:46 +0000 (09:11 +0200)
committerStefan Roese <sr@denx.de>
Wed, 4 May 2022 01:38:21 +0000 (03:38 +0200)
Call octeon_bootmem_init() earlier in the boot process, so that this
bootmemory infrastructure is already initialized when e.g. the
networking support gets probed.

Signed-off-by: Stefan Roese <sr@denx.de>
arch/mips/Kconfig
arch/mips/mach-octeon/cpu.c

index 06cae68ee57668de90f5469861463af646288c3a..9b62764f4fe684c411f08d7fb7c3a0434c733cf1 100644 (file)
@@ -101,6 +101,7 @@ config ARCH_JZ47XX
 
 config ARCH_OCTEON
        bool "Support Marvell Octeon CN7xxx platforms"
+       select ARCH_EARLY_INIT_R
        select CPU_CAVIUM_OCTEON
        select DISPLAY_CPUINFO
        select DMA_ADDR_T_64BIT
index 6cfcc3eae04e397c43018ac4bbbe1310e0269658..fffd9dfb858023207335731337d3222095e15826 100644 (file)
@@ -393,14 +393,25 @@ static int init_bootcmd_console(void)
        return ret;
 }
 
-int arch_misc_init(void)
+int arch_early_init_r(void)
 {
        int ret;
 
+       /*
+        * Needs to be called pretty early, so that e.g. networking etc
+        * can access the bootmem infrastructure
+        */
        ret = octeon_bootmem_init();
        if (ret)
                return ret;
 
+       return 0;
+}
+
+int arch_misc_init(void)
+{
+       int ret;
+
        ret = octeon_configure_load_memory();
        if (ret)
                return ret;