diff options
author | T Karthik Reddy <t.karthik.reddy@xilinx.com> | 2021-08-10 06:50:19 -0600 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2021-08-26 08:08:11 +0200 |
commit | 42e20f52d9a4c76f4740ef6310edaa820028e070 (patch) | |
tree | 2f63bbd19637b874b31a5e76d527ce67b96d3908 /arch/arm | |
parent | a890a53ad2cdda973959947619245832203cd7f3 (diff) | |
download | u-boot-42e20f52d9a4c76f4740ef6310edaa820028e070.zip u-boot-42e20f52d9a4c76f4740ef6310edaa820028e070.tar.gz u-boot-42e20f52d9a4c76f4740ef6310edaa820028e070.tar.bz2 |
soc: xilinx: versal: Add soc_xilinx_versal driver
soc_xilinx_versal driver allows identification of family & revision
of versal SoC. This driver is selected by CONFIG_SOC_XILINX_VERSAL.
Probe this driver using platdata U_BOOT_DEVICE structure which is
defined at mach-versal/cpu.c.
Add this config to xilinx_versal_virt_defconfig &
xilinx_versal_mini_ospi_defconfig file to select this driver.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-versal/cpu.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-versal/include/mach/hardware.h | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3e8a31f..0cc4326 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1055,6 +1055,7 @@ config ARCH_VERSAL select DM_SERIAL select GPIO_EXTRA_HEADER select OF_CONTROL + select SOC_DEVICE imply BOARD_LATE_INIT imply ENV_VARS_UBOOT_RUNTIME_CONFIG diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c index a35aac2..9dc308b 100644 --- a/arch/arm/mach-versal/cpu.c +++ b/arch/arm/mach-versal/cpu.c @@ -13,6 +13,7 @@ #include <asm/arch/hardware.h> #include <asm/arch/sys_proto.h> #include <asm/cache.h> +#include <dm/platdata.h> DECLARE_GLOBAL_DATA_PTR; @@ -120,3 +121,7 @@ int arm_reserve_mmu(void) return 0; } #endif + +U_BOOT_DRVINFO(soc_xilinx_versal) = { + .name = "soc_xilinx_versal", +}; diff --git a/arch/arm/mach-versal/include/mach/hardware.h b/arch/arm/mach-versal/include/mach/hardware.h index 9af5afd..7b728ac 100644 --- a/arch/arm/mach-versal/include/mach/hardware.h +++ b/arch/arm/mach-versal/include/mach/hardware.h @@ -65,6 +65,10 @@ struct crp_regs { #define crp_base ((struct crp_regs *)VERSAL_CRP_BASEADDR) +#define VERSAL_PS_PMC_VERSION 0xF11A0004 +#define VERSAL_PS_VER_MASK GENMASK(7, 0) +#define VERSAL_PS_VER_SHIFT 12 + /* Bootmode setting values */ #define BOOT_MODES_MASK 0x0000000F #define QSPI_MODE_24BIT 0x00000001 |