提交 4bebab69 编写于 作者: P Pali Rohár 提交者: Stefan Roese

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: NPali Rohár <pali@kernel.org>
Reviewed-by: NMarek Behún <marek.behun@nic.cz>
Reviewed-by: NStefan Roese <sr@denx.de>
上级 82c5a0ac
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册