summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-ls102xa
diff options
context:
space:
mode:
authorShengzhou Liu <Shengzhou.Liu@freescale.com>2015-11-20 15:52:02 +0800
committerYork Sun <yorksun@freescale.com>2015-12-13 18:27:28 -0800
commit0c028a03284aabceb89a85736e23661d6fe7915e (patch)
tree66521c44a5610455e0bffbe1b0798699e84568e4 /arch/arm/include/asm/arch-ls102xa
parent1aaf3f9ae471929a70509f86a48a61da6fbfb19f (diff)
downloadtalos-obmc-uboot-0c028a03284aabceb89a85736e23661d6fe7915e.tar.gz
talos-obmc-uboot-0c028a03284aabceb89a85736e23661d6fe7915e.zip
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/include/asm/arch-ls102xa')
-rw-r--r--arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
index 1bcdf04dd4..c12706d908 100644
--- a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
+++ b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
@@ -11,6 +11,8 @@
#define SVR_MIN(svr) (((svr) >> 0) & 0xf)
#define SVR_SOC_VER(svr) (((svr) >> 8) & 0x7ff)
#define IS_E_PROCESSOR(svr) (svr & 0x80000)
+#define IS_SVR_REV(svr, maj, min) \
+ ((SVR_MAJ(svr) == maj) && (SVR_MIN(svr) == min))
#define SOC_VER_SLS1020 0x00
#define SOC_VER_LS1020 0x10
@@ -422,4 +424,7 @@ struct ccsr_ahci {
u32 pberr; /* port 0/1 BIST error */
u32 cmds; /* port 0/1 CMD status error */
};
+
+uint get_svr(void);
+
#endif /* __ASM_ARCH_LS102XA_IMMAP_H_ */
OpenPOWER on IntegriCloud