[PATCH v1 13/20] arm: socfpga: Export board ID as U-Boot environment variable

Chee, Tien Fong tien.fong.chee at intel.com
Tue Sep 24 09:30:20 CEST 2024


Hi,

> -----Original Message-----
> From: Marek Vasut <marex at denx.de>
> Sent: Saturday, September 21, 2024 9:54 PM
> To: Chee, Tien Fong <tien.fong.chee at intel.com>; u-boot at lists.denx.de
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>; Meng, Tingting
> <tingting.meng at intel.com>; Yuslaimi, Alif Zakuan
> <alif.zakuan.yuslaimi at intel.com>; Hea, Kok Kiang
> <kok.kiang.hea at intel.com>
> Subject: Re: [PATCH v1 13/20] arm: socfpga: Export board ID as U-Boot
> environment variable
> 
> On 9/20/24 9:02 AM, tien.fong.chee at intel.com wrote:
> > From: Tien Fong Chee <tien.fong.chee at intel.com>
> >
> > Board ID is exported as environment variable for use to boot Linux
> > with FIT configuration.
> >
> > Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
> > ---
> >   arch/arm/mach-socfpga/include/mach/misc.h | 1 +
> >   arch/arm/mach-socfpga/misc_soc64.c        | 5 +++++
> >   2 files changed, 6 insertions(+)
> >
> > diff --git a/arch/arm/mach-socfpga/include/mach/misc.h
> > b/arch/arm/mach-socfpga/include/mach/misc.h
> > index 8460acb00d9..e62bea017b0 100644
> > --- a/arch/arm/mach-socfpga/include/mach/misc.h
> > +++ b/arch/arm/mach-socfpga/include/mach/misc.h
> > @@ -52,5 +52,6 @@ void set_regular_boot(unsigned int status);
> >   void socfpga_pl310_clear(void);
> >   void socfpga_get_managers_addr(void);
> >   int qspi_flash_software_reset(void);
> > +u8 socfpga_get_board_id(void);
> >
> >   #endif /* _SOCFPGA_MISC_H_ */
> > diff --git a/arch/arm/mach-socfpga/misc_soc64.c
> > b/arch/arm/mach-socfpga/misc_soc64.c
> > index 95e1c07e39f..e34c54518a3 100644
> > --- a/arch/arm/mach-socfpga/misc_soc64.c
> > +++ b/arch/arm/mach-socfpga/misc_soc64.c
> > @@ -60,10 +60,15 @@ int print_cpuinfo(void)
> >   int arch_misc_init(void)
> >   {
> >   	char qspi_string[13];
> > +	char id[3];
> >
> >   	sprintf(qspi_string, "<0x%08x>", cm_get_qspi_controller_clk_hz());
> >   	env_set("qspi_clock", qspi_string);
> >
> > +	/* Export board_id as environment variable */
> > +	sprintf(id, "%u", socfpga_get_board_id());
> > +	env_set("board_id", id);
> env_set_ulong()

OK, we will change it.

Regards,
Tien Fong


More information about the U-Boot mailing list