U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fastboot: read fastboot buffer address from fastboot_addr_r
       [not found] <CGME20260430201556eucas1p21ad12913ce5c83e8bf5cef3c4f50d81b@eucas1p2.samsung.com>
@ 2026-04-30 20:14 ` Łukasz Stelmach
  2026-05-07 11:01   ` Quentin Schulz
  2026-05-13 11:45   ` Mattijs Korpershoek
  0 siblings, 2 replies; 3+ messages in thread
From: Łukasz Stelmach @ 2026-04-30 20:14 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Szyprowski, Łukasz Stelmach

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@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;
 	fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
 	fastboot_set_progress_callback(NULL);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fastboot: read fastboot buffer address from fastboot_addr_r
  2026-04-30 20:14 ` [PATCH] fastboot: read fastboot buffer address from fastboot_addr_r Łukasz Stelmach
@ 2026-05-07 11:01   ` Quentin Schulz
  2026-05-13 11:45   ` Mattijs Korpershoek
  1 sibling, 0 replies; 3+ messages in thread
From: Quentin Schulz @ 2026-05-07 11:01 UTC (permalink / raw)
  To: Łukasz Stelmach, u-boot; +Cc: Marek Szyprowski

Hi Łukasz,

On 4/30/26 10:14 PM, Łukasz Stelmach wrote:
> [You don't often get email from l.stelmach@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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fastboot: read fastboot buffer address from fastboot_addr_r
  2026-04-30 20:14 ` [PATCH] fastboot: read fastboot buffer address from fastboot_addr_r Łukasz Stelmach
  2026-05-07 11:01   ` Quentin Schulz
@ 2026-05-13 11:45   ` Mattijs Korpershoek
  1 sibling, 0 replies; 3+ messages in thread
From: Mattijs Korpershoek @ 2026-05-13 11:45 UTC (permalink / raw)
  To: Łukasz Stelmach, u-boot; +Cc: Marek Szyprowski, Łukasz Stelmach

Hi Łukasz,

Thank you for the patch.

Somehow, I was not in copy of this email so I could have missed it.
Please make sure to run get_maintainer.pl next time you submit something.

$ ./scripts/get_maintainer.pl -f drivers/fastboot/

See:
https://docs.u-boot.org/en/latest/CONTRIBUTE.html#contributions

On Thu, Apr 30, 2026 at 22:14, Łukasz Stelmach <l.stelmach@samsung.com> wrote:

> Following the previous advice (link below) check fastbooot_addr_r

fastbooot -> fastboot

> environment variable for fastboot buffer address.
>
> Link: https://lore.kernel.org/u-boot/aWiWFrdwvy7-IK63@sumit-xelite/
> Signed-off-by: Łukasz Stelmach <l.stelmach@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;

Please also have a look at Quentin's suggestion:
https://lore.kernel.org/all/453e3e7f-e975-42a6-9f44-5aaa9a5fd03f@cherry.de/

>  	fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
>  	fastboot_set_progress_callback(NULL);
> -- 
> 2.47.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-13 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20260430201556eucas1p21ad12913ce5c83e8bf5cef3c4f50d81b@eucas1p2.samsung.com>
2026-04-30 20:14 ` [PATCH] fastboot: read fastboot buffer address from fastboot_addr_r Łukasz Stelmach
2026-05-07 11:01   ` Quentin Schulz
2026-05-13 11:45   ` Mattijs Korpershoek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox