summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorSriram Dash <sriram.dash@nxp.com>2016-06-13 09:58:32 +0530
committerMarek Vasut <marex@denx.de>2016-06-13 15:16:38 +0200
commit6fb522dc774db981e1c8463e71898287e039c5f4 (patch)
treed30725d2b5185275d7851aab13126f598e8668e9 /arch/arm/cpu
parent1653cd18eee1555e1fd4a8c2fd88048d53bdc619 (diff)
downloadtalos-obmc-uboot-6fb522dc774db981e1c8463e71898287e039c5f4.tar.gz
talos-obmc-uboot-6fb522dc774db981e1c8463e71898287e039c5f4.zip
arm64: fsl-layerscape: add get_svr and IS_SVR_REV helper
Adds get_svr and IS_SVR_REV helpers for ARMv8 platforms, similar to PPC and ARMv7. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 9a5a6b53f7..9c575c14d7 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -528,6 +528,13 @@ u32 fsl_qoriq_core_to_type(unsigned int core)
return -1; /* cannot identify the cluster */
}
+uint get_svr(void)
+{
+ struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+
+ return gur_in32(&gur->svr);
+}
+
#ifdef CONFIG_DISPLAY_CPUINFO
int print_cpuinfo(void)
{
OpenPOWER on IntegriCloud