diff options
author | Michal Simek <michal.simek@xilinx.com> | 2021-10-25 11:10:52 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2021-10-29 14:00:52 +0300 |
commit | e8b43c6409a064429285e8c2bf6e1a27879f995a (patch) | |
tree | d4b901e8493d5b68f6110357fa78a90bc73c0720 /board | |
parent | 4f9d25537ce969b3792c217298aa69df9116477b (diff) | |
download | u-boot-e8b43c6409a064429285e8c2bf6e1a27879f995a.tar.xz |
xilinx: zynqmp: Save multiboot as variable
Save multiboot register as u-boot variable. And use it as primary source
for composing dfu_alt_info for capsule update. If variable is not defined
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Link: https://lore.kernel.org/r/96556221443489c952717bcb340b4707901c9bdd.1635149450.git.michal.simek@xilinx.com
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 6335184467..6c17b92f41 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -640,7 +640,7 @@ int board_late_init(void) const char *mode; char *new_targets; char *env_targets; - int ret; + int ret, multiboot; #if defined(CONFIG_USB_ETHER) && !defined(CONFIG_USB_GADGET_DOWNLOAD) usb_ether_init(); @@ -658,6 +658,10 @@ int board_late_init(void) if (ret) return ret; + multiboot = multi_boot(); + if (multiboot >= 0) + env_set_hex("multiboot", multiboot); + bootmode = zynqmp_get_bootmode(); puts("Bootmode: "); @@ -864,6 +868,10 @@ void set_dfu_alt_info(char *interface, char *devstr) memset(buf, 0, sizeof(buf)); multiboot = multi_boot(); + if (multiboot < 0) + multiboot = 0; + + multiboot = env_get_hex("multiboot", multiboot); debug("Multiboot: %d\n", multiboot); switch (zynqmp_get_bootmode()) { |