Re: [PATCH v2] board: freescale: p1_p2_rdb_pc: Simplify SPL offset macros

Tom Rini
2022-06-28T18:17:53Z

[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]

On Tue, Jun 28, 2022 at 07:53:55PM +0200, Pali Rohár wrote:

> Now when CONFIG_SYS_TEXT_BASE has sane value, use it for calculation of
> other SPL offset values: CONFIG_SPL_MAX_SIZE, CONFIG_SYS_MMC_U_BOOT_* and
> CONFIG_SYS_SPI_FLASH_U_BOOT_* macros.
>
> No functional change.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> Changes in v2:
> * Rebased on top of the U-Boot next branch, commit d61c11b8c894fad517677dc51ee82d1eade39c01
> ---
> include/configs/p1_p2_rdb_pc.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
> index 56a16502dcc7..7237e3c1a63c 100644
> --- a/include/configs/p1_p2_rdb_pc.h
> +++ b/include/configs/p1_p2_rdb_pc.h
> @@ -78,15 +78,15 @@
>
> #ifdef CONFIG_SDCARD
> #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10)
> -#define CONFIG_SYS_MMC_U_BOOT_DST (0x11000000)
> -#define CONFIG_SYS_MMC_U_BOOT_START (0x11000000)
> -#define CONFIG_SYS_MMC_U_BOOT_OFFS (128 << 10)
> +#define CONFIG_SYS_MMC_U_BOOT_DST CONFIG_SYS_TEXT_BASE
> +#define CONFIG_SYS_MMC_U_BOOT_START CONFIG_SYS_TEXT_BASE
> +#define CONFIG_SYS_MMC_U_BOOT_OFFS CONFIG_SPL_PAD_TO
> #define CONFIG_SYS_MPC85XX_NO_RESETVEC
> #elif defined(CONFIG_SPIFLASH)
> #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10)
> -#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x11000000)
> -#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x11000000)
> -#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (128 << 10)
> +#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST CONFIG_SYS_TEXT_BASE
> +#define CONFIG_SYS_SPI_FLASH_U_BOOT_START CONFIG_SYS_TEXT_BASE
> +#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS CONFIG_SPL_PAD_TO
> #define CONFIG_SYS_MPC85XX_NO_RESETVEC
> #elif defined(CONFIG_MTD_RAW_NAND)
> #ifdef CONFIG_TPL_BUILD

So, this is entirely a PowerPC spl set of CONFIG variables. Can we move
them to Kconfig, and use default xxx as you're changing them to above?
The other platforms using this look to be doing the same at first
glance.

--
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]