]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm64: zynqmp: Fix nand/qspi boot command
authorMichal Simek <michal.simek@xilinx.com>
Wed, 13 Feb 2019 12:28:47 +0000 (13:28 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 13 Feb 2019 12:30:46 +0000 (13:30 +0100)
If instance number is passed to func(, , 0) then it has to be reflected
by bootcmd_<name><instance number> command.
Do it in a more generic way that devtypel and instance numbers are taken
from parameters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
include/configs/xilinx_zynqmp.h

index 8bb4ee769ea9caf5ff01baa1cb6bfcf1d35f2384..53f1455112a3971875923a05877a10dedb7a84cb 100644 (file)
        "xilinx "
 
 #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
-       "bootcmd_qspi0=sf probe 0 0 0 && " \
+       "bootcmd_" #devtypel #instance "=sf probe " #instance " 0 0 && " \
                       "sf read $scriptaddr $script_offset_f $script_size_f && " \
                       "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
 
 #define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
-       "qspi "
+       #devtypel #instance " "
 
 #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
-       "bootcmd_nand0= nand info && " \
+       "bootcmd_" #devtypel #instance "= nand info && " \
                       "nand read $scriptaddr $script_offset_f $script_size_f && " \
                       "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
 
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
-       "nand "
+       #devtypel #instance " "
 
 #define BOOT_TARGET_DEVICES(func) \
        BOOT_TARGET_DEVICES_MMC(func) \