diff options
author | Tom Rini <trini@konsulko.com> | 2019-04-17 09:19:13 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-17 09:19:13 -0400 |
commit | 14b8c420b88a90e7ca0c979a2ee413bf459941e8 (patch) | |
tree | 89805507eebb3a6b14c94fe62c95546bacbe7f5a /board | |
parent | 88d5ab3d67c7507160792991e99bda9fff34d106 (diff) | |
parent | 350cfe79a8fb288e9066d5668af7c5ab6857edea (diff) | |
download | u-boot-14b8c420b88a90e7ca0c979a2ee413bf459941e8.tar.gz |
Merge tag 'xilinx-for-v2019.07' of git://git.denx.de/u-boot-microblaze
Xilinx/FPGA changes for v2019.07
fpga:
- Add support for external data in FIT
- Extend testing for external data case
- Inform user about a need to run post config on Zynq
arm:
- Tune zynq command functions
- Fix internal variable setting
arm64:
- Add support for zc39dr decoding
- Disable WDT for zcu100
- Small changes in reset_reason()
- Some DT changes (spi)
- Tune qspi-mini configuration
- Remove useless eeprom setting
- Fix two sdhci boot case
spi:
- Fix tap delay programming
clk:
- Enable i2c in SPL
net:
- Fix gem phydev handling
- Remove phy detection code from gem driver
general:
- Correct EXT_DTB usage for MULTI_DTB_FIT configuration
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/zynq/cmds.c | 9 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 20 |
2 files changed, 22 insertions, 7 deletions
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c index 8b48ea3a03..27d44b760d 100644 --- a/board/xilinx/zynq/cmds.c +++ b/board/xilinx/zynq/cmds.c @@ -414,9 +414,13 @@ static int do_zynq_rsa(cmd_tbl_t *cmdtp, int flag, int argc, u32 src_ptr; char *endp; + if (argc != cmdtp->maxargs) + return CMD_RET_FAILURE; + src_ptr = simple_strtoul(argv[2], &endp, 16); if (*argv[2] == 0 || *endp != 0) return CMD_RET_USAGE; + if (zynq_verify_image(src_ptr)) return CMD_RET_FAILURE; @@ -432,6 +436,9 @@ static int zynq_decrypt_image(cmd_tbl_t *cmdtp, int flag, int argc, u32 srcaddr, srclen, dstaddr, dstlen; int status; + if (argc < 5 && argc > cmdtp->maxargs) + return CMD_RET_USAGE; + srcaddr = simple_strtoul(argv[2], &endp, 16); if (*argv[2] == 0 || *endp != 0) return CMD_RET_USAGE; @@ -485,7 +492,7 @@ static int do_zynq(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_USAGE; zynq_cmd = find_cmd_tbl(argv[1], zynq_commands, ARRAY_SIZE(zynq_commands)); - if (!zynq_cmd || argc != zynq_cmd->maxargs) + if (!zynq_cmd) return CMD_RET_USAGE; ret = zynq_cmd->cmd(zynq_cmd, flag, argc, argv); diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index db27247850..5189925beb 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -170,6 +170,10 @@ static const struct { .id = 0x62, .name = "29dr", }, + { + .id = 0x66, + .name = "39dr", + }, }; #endif @@ -482,18 +486,20 @@ static const struct { {} }; -static u32 reset_reason(void) +static int reset_reason(void) { - u32 ret; - int i; + u32 reg; + int i, ret; const char *reason = NULL; - ret = readl(&crlapb_base->reset_reason); + ret = zynqmp_mmio_read((ulong)&crlapb_base->reset_reason, ®); + if (ret) + return -EINVAL; puts("Reset reason:\t"); for (i = 0; i < ARRAY_SIZE(reset_reasons); i++) { - if (ret & reset_reasons[i].bit) { + if (reg & reset_reasons[i].bit) { reason = reset_reasons[i].name; printf("%s ", reset_reasons[i].name); break; @@ -504,7 +510,9 @@ static u32 reset_reason(void) env_set("reset_reason", reason); - writel(~0, &crlapb_base->reset_reason); + ret = zynqmp_mmio_write(~0, ~0, (ulong)&crlapb_base->reset_reason); + if (ret) + return -EINVAL; return ret; } |