]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: imx6: dh-imx6: Use sf update instead of sf erase and write
authorMarek Vasut <marex@denx.de>
Wed, 28 Sep 2022 16:45:18 +0000 (18:45 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 21 Oct 2022 09:54:13 +0000 (11:54 +0200)
With sf update fixed to support unaligned start offset, use plain
sf update to update the bootloader in SPI NOR. This also helps
avoid the case where not enough SPI NOR has been erased and the
bootloader has been written to unerased area, and thus corrupted.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
include/configs/dh_imx6.h

index 0f7e1c5c451621d4fd54df9e3470118863dd4773..2040deb2b87777f682b1c0f5a1079a3cee158beb 100644 (file)
@@ -60,8 +60,7 @@
        "fdtfile=imx6q-dhcom-pdk2.dtb\0"\
        "update_sf=" /* Erase SPI NOR and install U-Boot from SD */     \
                "load mmc 0:1 ${loadaddr} /boot/u-boot-with-spl.imx && "\
-               "sf probe && sf erase 0x0 0x100000 && "                 \
-               "sf write ${loadaddr} 0x400 ${filesize}\0"              \
+               "sf probe && sf update ${loadaddr} 0x400 ${filesize}\0" \
        BOOTENV
 
 #define BOOT_TARGET_DEVICES(func) \