[PATCH V7 2/4] ddr: imx8m: helper: load ddr firmware according to binman symbols

Alper Nebi Yasak alpernebiyasak at gmail.com
Tue Jun 28 16:08:26 CEST 2022


Hi Tom, Simon, Peng,

On 27/06/2022 06:41, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan at nxp.com>
> 
> By reading binman symbols, we no need hard coded IMEM_LEN/DMEM_LEN after
> we update the binman dtsi to drop 0x8000/0x4000 length for the firmware.
> 
> And that could save binary size for many KBs.
> 
> Tested-by: Tim Harvey <tharvey at gateworks.com> #imx8m[m,n,p]-venice
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> Reviewed-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
> [Alper: Check BINMAN_SYMS_OK instead]
> Signed-off-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
> ---
>  drivers/ddr/imx/phy/helper.c | 47 +++++++++++++++++++++++++++++++-----
>  1 file changed, 41 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/ddr/imx/phy/helper.c b/drivers/ddr/imx/phy/helper.c
> index 60d650e3089..e9e0294f87d 100644
> --- a/drivers/ddr/imx/phy/helper.c
> +++ b/drivers/ddr/imx/phy/helper.c
> @@ -4,6 +4,7 @@
>   */
>  
>  #include <common.h>
> +#include <binman_sym.h>
>  #include <log.h>
>  #include <spl.h>
>  #include <asm/global_data.h>
> @@ -24,15 +25,30 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define DMEM_OFFSET_ADDR 0x00054000
>  #define DDR_TRAIN_CODE_BASE_ADDR IP2APB_DDRPHY_IPS_BASE_ADDR(0)
>  
> +binman_sym_declare(ulong, ddr_1d_imem_fw, image_pos);
> +binman_sym_declare(ulong, ddr_1d_imem_fw, size);
> +
> +binman_sym_declare(ulong, ddr_1d_dmem_fw, image_pos);
> +binman_sym_declare(ulong, ddr_1d_dmem_fw, size);
> +
> +#if !IS_ENABLED(CONFIG_IMX8M_DDR3L)
> +binman_sym_declare(ulong, ddr_2d_imem_fw, image_pos);
> +binman_sym_declare(ulong, ddr_2d_imem_fw, size);
> +
> +binman_sym_declare(ulong, ddr_2d_dmem_fw, image_pos);
> +binman_sym_declare(ulong, ddr_2d_dmem_fw, size);
> +#endif
> +
> [...]

A terrible question popped into my head while thinking about binman
symbols, and I feel obliged to ask. Would this be considered 'linking'
these proprietary blobs to a GPL-licensed U-Boot SPL binary?


More information about the U-Boot mailing list