Merge tag 'u-boot-at91-fixes-2023.10-b' of https://source.denx.de/u-boot/custodians...
authorTom Rini <trini@konsulko.com>
Fri, 29 Sep 2023 14:40:34 +0000 (10:40 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 29 Sep 2023 14:40:34 +0000 (10:40 -0400)
Second set of u-boot-atmel fixes for the 2023.10 cycle:

Two small fixes , one for an array not initialized and the second one
fixes an error case when a DT property is missing for the atmel NAND
driver.

arch/riscv/Kconfig
board/starfive/visionfive2/starfive_visionfive2.c
board/storopack/smegw01/smegw01.env
configs/iot2050_defconfig
configs/smegw01_defconfig
doc/usage/cmd/load.rst
include/env/ti/ti_armv7_common.env
tools/binman/binman.rst

index 6771d8d..1c62c23 100644 (file)
@@ -26,6 +26,7 @@ config TARGET_SIFIVE_UNMATCHED
 
 config TARGET_STARFIVE_VISIONFIVE2
        bool "Support StarFive VisionFive2 Board"
+       select BOARD_LATE_INIT
 
 config TARGET_TH1520_LPI4A
        bool "Support Sipeed's TH1520 Lichee PI 4A Board"
index 07e171c..19b7b44 100644 (file)
@@ -5,16 +5,22 @@
  */
 
 #include <common.h>
-#include <asm/io.h>
-#include <asm/sections.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <env.h>
+#include <asm/arch/eeprom.h>
+#include <asm/io.h>
+#include <asm/sections.h>
 #include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 #define JH7110_L2_PREFETCHER_BASE_ADDR         0x2030000
 #define JH7110_L2_PREFETCHER_HART_OFFSET       0x2000
+#define FDTFILE_VISIONFIVE2_1_2A \
+       "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"
+#define FDTFILE_VISIONFIVE2_1_3B \
+       "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"
 
 /* enable U74-mc hart1~hart4 prefetcher */
 static void enable_prefetcher(void)
@@ -35,6 +41,31 @@ static void enable_prefetcher(void)
        }
 }
 
+/**
+ * set_fdtfile() - set the $fdtfile variable based on the board revision
+ */
+static void set_fdtfile(void)
+{
+       u8 version;
+       const char *fdtfile;
+
+       version = get_pcb_revision_from_eeprom();
+       switch (version) {
+       case 'a':
+       case 'A':
+               fdtfile = FDTFILE_VISIONFIVE2_1_2A;
+               break;
+
+       case 'b':
+       case 'B':
+       default:
+               fdtfile = FDTFILE_VISIONFIVE2_1_3B;
+               break;
+       };
+
+       env_set("fdtfile", fdtfile);
+}
+
 int board_init(void)
 {
        enable_caches();
@@ -43,6 +74,14 @@ int board_init(void)
        return 0;
 }
 
+int board_late_init(void)
+{
+       if (CONFIG_IS_ENABLED(ID_EEPROM))
+               set_fdtfile();
+
+       return 0;
+}
+
 void *board_fdt_blob_setup(int *err)
 {
        *err = 0;
index 528310d..93de866 100644 (file)
@@ -67,9 +67,9 @@ mmcboot=
                run altbootcmd;
        fi;
 #ifdef CONFIG_SYS_BOOT_LOCKED
-       hab_auth_img ${fileaddr} ${filesize};
-#else
        hab_auth_img_or_fail ${fileaddr} ${filesize};
+#else
+       hab_auth_img ${fileaddr} ${filesize};
 #endif
        run mmcargs;
        if bootm; then
index bcbaa92..4fc3bcb 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_DM_GPIO=y
 CONFIG_SPL_DM_SPI=y
 CONFIG_DEFAULT_DEVICE_TREE="k3-am6528-iot2050-basic"
 CONFIG_SPL_TEXT_BASE=0x80080000
-CONFIG_SYS_PROMPT="IOT2050> "
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_SPL_SERIAL=y
@@ -41,7 +40,6 @@ CONFIG_AUTOBOOT_FLUSH_STDIN=y
 CONFIG_AUTOBOOT_PROMPT="Hit SPACE to stop autoboot in %d seconds...\n"
 CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_BOOTCOMMAND="run start_watchdog; run distro_bootcmd"
-CONFIG_CONSOLE_MUX=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_MAX_SIZE=0x58000
 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
@@ -62,6 +60,7 @@ CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x380000
+CONFIG_SYS_PROMPT="IOT2050> "
 CONFIG_SYS_MAXARGS=64
 CONFIG_SYS_PBSIZE=1050
 CONFIG_CMD_ASKENV=y
index 6160383..03d403d 100644 (file)
@@ -7,7 +7,7 @@ CONFIG_ENV_OFFSET=0x100000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7d-smegw01"
 CONFIG_TARGET_SMEGW01=y
-# CONFIG_SYS_BOOT_LOCKED is not set
+CONFIG_SYS_BOOT_LOCKED=y
 CONFIG_ENV_OFFSET_REDUND=0x110000
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 # CONFIG_ARMV7_VIRT is not set
index 1efee77..2c892ee 100644 (file)
@@ -40,7 +40,7 @@ bytes
 pos
     number of bytes to skip
 
-addr, bytes, pos are hexadecimal numbers.
+part, addr, bytes, pos are hexadecimal numbers.
 
 Example
 -------
index e87a41a..f5d8421 100644 (file)
@@ -15,10 +15,10 @@ boot_fit=0
 addr_fit=0x90000000
 name_fit=fitImage
 update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
-get_overlaystring=
-       for overlay in $name_overlays;
-       do;
-       setenv overlaystring ${overlaystring}'#'${overlay};
+get_fit_overlaystring=
+       for overlay in $name_overlays; do;
+               setexpr name_fit_overlay gsub / _ conf-${overlay};
+               setenv overlaystring ${overlaystring}'#'${name_fit_overlay};
        done;
 get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
 run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
@@ -28,7 +28,7 @@ bootcmd_ti_mmc=
        run main_cpsw0_qsgmii_phyinit; run boot_rprocs;
 #endif
        if test ${boot_fit} -eq 1;
-               then run get_fit_${boot}; run get_overlaystring; run run_fit;
+               then run get_fit_${boot}; run get_fit_overlaystring; run run_fit;
        else;
                run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;
        fi;
index 8945b19..020988d 100644 (file)
@@ -1480,8 +1480,6 @@ as set in stone, so Binman will ensure it doesn't change. Without this feature,
 repacking an entry might cause it to disobey the original constraints provided
 when it was created.
 
- Repacking an image involves
-
 
 Signing FIT container with private key in an image
 --------------------------------------------------