diff options
author | Shengzhou Liu <Shengzhou.Liu@freescale.com> | 2015-11-20 07:52:02 (GMT) |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-12-14 02:27:28 (GMT) |
commit | 0c028a03284aabceb89a85736e23661d6fe7915e (patch) | |
tree | 66521c44a5610455e0bffbe1b0798699e84568e4 /arch/arm/cpu | |
parent | 1aaf3f9ae471929a70509f86a48a61da6fbfb19f (diff) | |
download | u-boot-0c028a03284aabceb89a85736e23661d6fe7915e.tar.xz |
arm: ls102x: add get_svr and IS_SVR_REV helper
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv7/ls102xa/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index 2215fe9..2f0df65 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) { |