From 0c028a03284aabceb89a85736e23661d6fe7915e Mon Sep 17 00:00:00 2001 From: Shengzhou Liu Date: Fri, 20 Nov 2015 15:52:02 +0800 Subject: arm: ls102x: add get_svr and IS_SVR_REV helper Signed-off-by: Shengzhou Liu Reviewed-by: York Sun --- arch/arm/cpu/armv7/ls102xa/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm/cpu/armv7/ls102xa/cpu.c') diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index 2215fe93cf..2f0df65582 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -218,6 +218,14 @@ void enable_caches(void) } #endif /* #ifndef CONFIG_SYS_DCACHE_OFF */ + +uint get_svr(void) +{ + struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); + + return in_be32(&gur->svr); +} + #if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo(void) { -- cgit