]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: Show silicon version in SPL
authorMichal Simek <michal.simek@xilinx.com>
Tue, 2 Feb 2021 15:34:48 +0000 (16:34 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 10 Feb 2021 12:21:12 +0000 (13:21 +0100)
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@xilinx.com>
arch/arm/mach-zynqmp/include/mach/hardware.h
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c

index b328837c694f26890679b42e3b29fdb435e8bef9..3d3c48e24731238c5b2b3c71c579932e134426d1 100644 (file)
@@ -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];
index 7ac069aaafdf26685ae554120b742302ddcd3abb..0fc11a48f14c9532ceee6b81f60ed86cd2ef2459 100644 (file)
@@ -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;
 }
 
index 459d9b1e47e10b13dea3ce4aeb173bce149cc9c6..a216eeb35f1550122ad097d91b36515484ce40e7 100644 (file)
@@ -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();