Merge tag 'u-boot-stm32-20211012' of https://source.denx.de/u-boot/custodians/u-boot-stm
[platform/kernel/u-boot.git] / arch / arm / mach-socfpga / spl_gen5.c
index 70f8455..441d893 100644 (file)
@@ -5,6 +5,9 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
+#include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
@@ -22,6 +25,7 @@
 #include <fdtdec.h>
 #include <watchdog.h>
 #include <dm/uclass.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -48,8 +52,8 @@ u32 spl_boot_device(void)
        }
 }
 
-#ifdef CONFIG_SPL_MMC_SUPPORT
-u32 spl_boot_mode(const u32 boot_device)
+#ifdef CONFIG_SPL_MMC
+u32 spl_mmc_boot_mode(const u32 boot_device)
 {
 #if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_FS_EXT4)
        return MMCSD_MODE_FS;
@@ -138,10 +142,7 @@ void board_init_f(ulong dummy)
                debug("Reset init failed: %d\n", ret);
 
 #ifdef CONFIG_SPL_NAND_DENALI
-       struct socfpga_reset_manager *reset_manager_base =
-               (struct socfpga_reset_manager *)SOCFPGA_RSTMGR_ADDRESS;
-
-       clrbits_le32(&reset_manager_base->per_mod_reset, BIT(4));
+       clrbits_le32(SOCFPGA_RSTMGR_ADDRESS + RSTMGR_GEN5_PERMODRST, BIT(4));
 #endif
 
        /* enable console uart printing */