[PATCH] xilinx: Show silicon version in SPL

Michal Simek monstr at monstr.eu
Wed Feb 10 13:21:04 CET 2021


út 2. 2. 2021 v 16:51 odesílatel Michal Simek <michal.simek at xilinx.com> napsal:
>
> Both Zynq and ZynqMP can show silicon versions in SPL boot flow. It is
> useful to be aware.
> The patch is also fixing possition of these bits on ZynqMP.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
>  arch/arm/mach-zynqmp/include/mach/hardware.h | 4 ++--
>  board/xilinx/zynq/board.c                    | 3 +++
>  board/xilinx/zynqmp/zynqmp.c                 | 1 +
>  3 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
> index b328837c694f..3d3c48e24731 100644
> --- a/arch/arm/mach-zynqmp/include/mach/hardware.h
> +++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
> @@ -128,8 +128,8 @@ struct apu_regs {
>
>  #define ZYNQMP_CSU_VERSION_EMPTY_SHIFT         20
>
> -#define ZYNQMP_SILICON_VER_MASK                0xF000
> -#define ZYNQMP_SILICON_VER_SHIFT       12
> +#define ZYNQMP_SILICON_VER_MASK                0xF
> +#define ZYNQMP_SILICON_VER_SHIFT       0
>
>  struct csu_regs {
>         u32 reserved0[4];
> diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
> index 7ac069aaafdf..0fc11a48f14c 100644
> --- a/board/xilinx/zynq/board.c
> +++ b/board/xilinx/zynq/board.c
> @@ -24,6 +24,9 @@ DECLARE_GLOBAL_DATA_PTR;
>
>  int board_init(void)
>  {
> +       if (IS_ENABLED(CONFIG_SPL_BUILD))
> +               printf("Silicon version:\t%d\n", zynq_get_silicon_version());
> +
>         return 0;
>  }
>
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index d18c992e3f8f..8968cf90760f 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -328,6 +328,7 @@ int board_init(void)
>         if (sizeof(CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE) > 1)
>                 zynqmp_pmufw_load_config_object(zynqmp_pm_cfg_obj,
>                                                 zynqmp_pm_cfg_obj_size);
> +       printf("Silicon version:\t%d\n", zynqmp_get_silicon_version());
>  #else
>         if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))
>                 xilinx_read_eeprom();
> --
> 2.30.0
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


More information about the U-Boot mailing list