diff options
author | Pali Rohár <pali@kernel.org> | 2021-10-25 15:12:58 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-11-03 06:45:27 +0100 |
commit | 4bebab69a9483fd6ae85b06a088790a6c77f90ce (patch) | |
tree | 6da07bee6ed2948a3247036b9b335aaa19e68448 /tools/kwboot.c | |
parent | 82c5a0ac713500f4da9d8562cd4764c733b65e56 (diff) | |
download | u-boot-4bebab69a9483fd6ae85b06a088790a6c77f90ce.zip u-boot-4bebab69a9483fd6ae85b06a088790a6c77f90ce.tar.gz u-boot-4bebab69a9483fd6ae85b06a088790a6c77f90ce.tar.bz2 |
tools: kwboot: Correctly set configuration of UART for BootROM messages
For kwbimage v1, tell BootROM to send BootROM messages to UART port number
0 (used also for UART booting) with default baudrate (which should be
115200) and do not touch UART MPP configuration.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools/kwboot.c')
-rw-r--r-- | tools/kwboot.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c index 1131c2e..6228838 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -1507,6 +1507,17 @@ kwboot_img_patch(void *img, size_t *size, int baudrate) } if (!is_secure) { + if (image_ver == 1) { + /* + * Tell BootROM to send BootROM messages to UART port + * number 0 (used also for UART booting) with default + * baudrate (which should be 115200) and do not touch + * UART MPP configuration. + */ + hdr->options &= ~0x1F; + hdr->options |= MAIN_HDR_V1_OPT_BAUD_DEFAULT; + hdr->options |= 0 << 3; + } if (image_ver == 0) ((struct main_hdr_v0 *)img)->nandeccmode = IBR_HDR_ECC_DISABLED; hdr->nandpagesize = 0; |