[PATCH] fastboot: read fastboot buffer address from fastboot_addr_r
Quentin Schulz
quentin.schulz at cherry.de
Thu May 7 13:01:39 CEST 2026
Hi Łukasz,
On 4/30/26 10:14 PM, Łukasz Stelmach wrote:
> [You don't often get email from l.stelmach at samsung.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Following the previous advice (link below) check fastbooot_addr_r
> environment variable for fastboot buffer address.
>
> Link: https://lore.kernel.org/u-boot/aWiWFrdwvy7-IK63@sumit-xelite/
> Signed-off-by: Łukasz Stelmach <l.stelmach at samsung.com>
> ---
> drivers/fastboot/fb_common.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index 68f92c4b887..4579f30b52e 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -226,7 +226,9 @@ void fastboot_set_progress_callback(void (*progress)(const char *msg))
> */
> void fastboot_init(void *buf_addr, u32 buf_size)
> {
> - fastboot_buf_addr = buf_addr ? buf_addr :
> + void *_buf_addr = (void *)env_get_hex("fastboot_addr_r", 0);
> +
> + fastboot_buf_addr = buf_addr ? buf_addr : _buf_addr ? _buf_addr :
> (void *)CONFIG_FASTBOOT_BUF_ADDR;
Nested ternary conditions are unreadable.
I'm assuming this is the same as
fastboot_buf_addr = buf_addr ? buf_addr : (void
*)env_get_hex("fastboot_addr_r", CONFIG_FASTBOOT_BUF_ADDR);
?
Cheers,
Quentin
More information about the U-Boot
mailing list