Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / arm / mach-socfpga / spl_gen5.c
index e19f55aa9b5e9fbfe85cb57aa441505c622002af..5a7c5ef76d5d097873fa1bc8c7e16e86c099febe 100644 (file)
@@ -4,6 +4,9 @@
  */
 
 #include <common.h>
+#include <hang.h>
+#include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
@@ -21,6 +24,7 @@
 #include <fdtdec.h>
 #include <watchdog.h>
 #include <dm/uclass.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -48,7 +52,7 @@ u32 spl_boot_device(void)
 }
 
 #ifdef CONFIG_SPL_MMC_SUPPORT
-u32 spl_boot_mode(const u32 boot_device)
+u32 spl_mmc_boot_mode(const u32 boot_device)
 {
 #if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_FS_EXT4)
        return MMCSD_MODE_FS;
@@ -137,10 +141,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 */