[PATCH u-boot-marvell 07/13] tools: kwboot: Correctly set configuration of UART for BootROM messages

Stefan Roese sr at denx.de
Tue Oct 26 07:45:16 CEST 2021


On 25.10.21 15:12, Marek Behún wrote:
> From: Pali Rohár <pali at kernel.org>
> 
> 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 at kernel.org>
> Reviewed-by: Marek Behún <marek.behun at nic.cz>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   tools/kwboot.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/tools/kwboot.c b/tools/kwboot.c
> index 1131c2eb1c..6228838228 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;
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list