diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-29 11:31:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-29 11:31:06 -0400 |
commit | f3a0d2c1af630cc09a34c2159aa2dfa12b831762 (patch) | |
tree | 08a339ed98c9daeb06d4471ea6a01b42cae37842 /board | |
parent | 3d2f8bc673d8a8c0ecb2ba27d21f8c54152281ca (diff) | |
parent | b00bad9dc81ee0337761cc50443dffa22a6cdedf (diff) | |
download | u-boot-f3a0d2c1af630cc09a34c2159aa2dfa12b831762.tar.gz u-boot-f3a0d2c1af630cc09a34c2159aa2dfa12b831762.tar.xz u-boot-f3a0d2c1af630cc09a34c2159aa2dfa12b831762.zip |
Merge tag 'xilinx-for-v2021.07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2021.07-rc2
xilinx:
- Enable saving variables based on bootmode
- Cleanup usb dfu setup and wire it up with usb bootmode
- Fix bootscript address logic
- Remove GD references (spi, Versal)
- Enable capsule update
clk:
- Small Kconfig fix
net:
- Fix gmii2rgmii bridge binding
usb:
- Propagate error (dfu gadget)
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/common/board.c | 6 | ||||
-rw-r--r-- | board/xilinx/versal/board.c | 32 | ||||
-rw-r--r-- | board/xilinx/zynq/board.c | 32 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 2 |
4 files changed, 66 insertions, 6 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 475628b925..92b61d83ca 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -378,14 +378,12 @@ int board_late_init_xilinx(void) int i, id, macid = 0; struct xilinx_board_description *desc; phys_size_t bootm_size = gd->ram_size; - struct bd_info *bd = gd->bd; - if (!CONFIG_IS_ENABLED(MICROBLAZE) && bd->bi_dram[0].start) { + if (!CONFIG_IS_ENABLED(MICROBLAZE)) { ulong scriptaddr; scriptaddr = env_get_hex("scriptaddr", 0); - ret |= env_set_hex("scriptaddr", - bd->bi_dram[0].start + scriptaddr); + ret |= env_set_hex("scriptaddr", gd->ram_base + scriptaddr); } if (CONFIG_IS_ENABLED(ARCH_ZYNQ) || CONFIG_IS_ENABLED(MICROBLAZE)) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index e2f9d13c12..6045eb2baa 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -9,6 +9,7 @@ #include <env.h> #include <fdtdec.h> #include <init.h> +#include <env_internal.h> #include <log.h> #include <malloc.h> #include <time.h> @@ -129,7 +130,7 @@ int board_late_init(void) switch (bootmode) { case USB_MODE: puts("USB_MODE\n"); - mode = "dfu_usb"; + mode = "usb_dfu0 usb_dfu1"; break; case JTAG_MODE: puts("JTAG_MODE\n"); @@ -245,3 +246,32 @@ int dram_init(void) void reset_cpu(void) { } + +enum env_location env_get_location(enum env_operation op, int prio) +{ + u32 bootmode = versal_get_bootmode(); + + if (prio) + return ENVL_UNKNOWN; + + switch (bootmode) { + case EMMC_MODE: + case SD_MODE: + case SD1_LSHFT_MODE: + case SD_MODE1: + if (IS_ENABLED(CONFIG_ENV_IS_IN_FAT)) + return ENVL_FAT; + if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4)) + return ENVL_EXT4; + return ENVL_UNKNOWN; + case OSPI_MODE: + case QSPI_MODE_24BIT: + case QSPI_MODE_32BIT: + if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) + return ENVL_SPI_FLASH; + return ENVL_UNKNOWN; + case JTAG_MODE: + default: + return ENVL_NOWHERE; + } +} diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 7533dddb9b..e2e9b3f0f7 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -9,6 +9,7 @@ #include <log.h> #include <dm/uclass.h> #include <env.h> +#include <env_internal.h> #include <fdtdec.h> #include <fpga.h> #include <malloc.h> @@ -119,3 +120,34 @@ int dram_init(void) return 0; } #endif + +enum env_location env_get_location(enum env_operation op, int prio) +{ + u32 bootmode = zynq_slcr_get_boot_mode() & ZYNQ_BM_MASK; + + if (prio) + return ENVL_UNKNOWN; + + switch (bootmode) { + case ZYNQ_BM_SD: + if (IS_ENABLED(CONFIG_ENV_IS_IN_FAT)) + return ENVL_FAT; + if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4)) + return ENVL_EXT4; + return ENVL_UNKNOWN; + case ZYNQ_BM_NAND: + if (IS_ENABLED(CONFIG_ENV_IS_IN_NAND)) + return ENVL_NAND; + if (IS_ENABLED(CONFIG_ENV_IS_IN_UBI)) + return ENVL_UBI; + return ENVL_UNKNOWN; + case ZYNQ_BM_NOR: + case ZYNQ_BM_QSPI: + if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) + return ENVL_SPI_FLASH; + return ENVL_UNKNOWN; + case ZYNQ_BM_JTAG: + default: + return ENVL_NOWHERE; + } +} diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 23c12f45ea..d05f0b2e12 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -571,7 +571,7 @@ int board_late_init(void) switch (bootmode) { case USB_MODE: puts("USB_MODE\n"); - mode = "usb"; + mode = "usb_dfu0 usb_dfu1"; env_set("modeboot", "usb_dfu_spl"); break; case JTAG_MODE: |