diff mbox series

[02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop

Message ID 20241212235735.164272-3-jonas@kwiboo.se
State Accepted
Commit 01048aa9f8d669869a4dff8399e2238dd39b0531
Delegated to: Kever Yang
Headers show
Series rockchip: rk3399: Migrate to use TPL on bob and kevin | expand

Commit Message

Jonas Karlman Dec. 12, 2024, 11:57 p.m. UTC
Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option
instead of a hardcoded 0x40000 for the FIT payload offset.

This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +-
 arch/arm/dts/rk3399-u-boot.dtsi     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Kever Yang Jan. 3, 2025, 6:43 a.m. UTC | #1
On 2024/12/13 07:57, Jonas Karlman wrote:
> Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option
> instead of a hardcoded 0x40000 for the FIT payload offset.
>
> This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +-
>   arch/arm/dts/rk3399-u-boot.dtsi     | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
> index 6bdc892bd913..2505d9b01b8a 100644
> --- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
> @@ -11,7 +11,7 @@
>   	};
>   
>   	config {
> -		u-boot,spl-payload-offset = <0x40000>;
> +		u-boot,spl-payload-offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
>   	};
>   };
>   
> diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
> index 2bec139d8338..81a3c6fc972b 100644
> --- a/arch/arm/dts/rk3399-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-u-boot.dtsi
> @@ -43,7 +43,7 @@
>   			};
>   		};
>   		u-boot-img {
> -			offset = <0x40000>;
> +			offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
>   		};
>   		u-boot {
>   			offset = <0x300000>;
Simon Glass Feb. 8, 2025, 11:04 p.m. UTC | #2
Hi Jonas,

On Thu, 12 Dec 2024 at 16:57, Jonas Karlman <jonas@kwiboo.se> wrote:
>
> Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option
> instead of a hardcoded 0x40000 for the FIT payload offset.
>
> This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.

When you add CONFIG options into a devicetree, it makes it difficult
to build it. We have to individually build U-Boot for each target just
to get the right values.

For rk3399-generic, this means I have to drop gru.

Can we not use a binman symbols instead?

>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
>  arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +-
>  arch/arm/dts/rk3399-u-boot.dtsi     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Regards,
SImon
Jonas Karlman Feb. 9, 2025, 1:27 a.m. UTC | #3
Hi Simon,

On 2025-02-09 00:04, Simon Glass wrote:
> Hi Jonas,
> 
> On Thu, 12 Dec 2024 at 16:57, Jonas Karlman <jonas@kwiboo.se> wrote:
>>
>> Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option
>> instead of a hardcoded 0x40000 for the FIT payload offset.
>>
>> This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
> 
> When you add CONFIG options into a devicetree, it makes it difficult
> to build it. We have to individually build U-Boot for each target just
> to get the right values.

This only aligned everything with the simple-bin-spi image and prepared
for moving the SPI flash payload offset to 0xE0000.

If you are looking at this now, please also take a look at [1]. There
where some questions directed at you there :-)

[1] https://patchwork.ozlabs.org/project/uboot/patch/20241212235735.164272-7-jonas@kwiboo.se/

> 
> For rk3399-generic, this means I have to drop gru.
> 
> Can we not use a binman symbols instead?

All RK3399 targets having support for building a SPI flash image now use
CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 after these changes where merged.

Regards,
Jonas

> 
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>>  arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +-
>>  arch/arm/dts/rk3399-u-boot.dtsi     | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Regards,
> SImon
Simon Glass Feb. 9, 2025, 2:28 p.m. UTC | #4
Hi Jonas,

On Sat, 8 Feb 2025 at 18:27, Jonas Karlman <jonas@kwiboo.se> wrote:
>
> Hi Simon,
>
> On 2025-02-09 00:04, Simon Glass wrote:
> > Hi Jonas,
> >
> > On Thu, 12 Dec 2024 at 16:57, Jonas Karlman <jonas@kwiboo.se> wrote:
> >>
> >> Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option
> >> instead of a hardcoded 0x40000 for the FIT payload offset.
> >>
> >> This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
> >
> > When you add CONFIG options into a devicetree, it makes it difficult
> > to build it. We have to individually build U-Boot for each target just
> > to get the right values.
>
> This only aligned everything with the simple-bin-spi image and prepared
> for moving the SPI flash payload offset to 0xE0000.
>
> If you are looking at this now, please also take a look at [1]. There
> where some questions directed at you there :-)
>
> [1] https://patchwork.ozlabs.org/project/uboot/patch/20241212235735.164272-7-jonas@kwiboo.se/
>
> >
> > For rk3399-generic, this means I have to drop gru.
> >
> > Can we not use a binman symbols instead?
>
> All RK3399 targets having support for building a SPI flash image now use
> CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 after these changes where merged.

OK, but why have this config option? Binman is designed to remove the
need for it.

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
index 6bdc892bd913..2505d9b01b8a 100644
--- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
@@ -11,7 +11,7 @@ 
 	};
 
 	config {
-		u-boot,spl-payload-offset = <0x40000>;
+		u-boot,spl-payload-offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
 	};
 };
 
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index 2bec139d8338..81a3c6fc972b 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -43,7 +43,7 @@ 
 			};
 		};
 		u-boot-img {
-			offset = <0x40000>;
+			offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
 		};
 		u-boot {
 			offset = <0x300000>;