public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] arm: ls102x: add get_svr and IS_SVR_REV helper
@ 2015-11-20  7:52 Shengzhou Liu
  2015-11-20  7:52 ` [U-Boot] [PATCH 2/3] fsl/errata: move fsl_errata.h to common directory Shengzhou Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Shengzhou Liu @ 2015-11-20  7:52 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 arch/arm/cpu/armv7/ls102xa/cpu.c                  | 8 ++++++++
 arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 5 +++++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index 14ae2a3..74cd2cb 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -209,6 +209,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)
 {
diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
index c59c93a..2d0832a 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
@@ -427,4 +429,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_ */
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-15  0:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-20  7:52 [U-Boot] [PATCH 1/3] arm: ls102x: add get_svr and IS_SVR_REV helper Shengzhou Liu
2015-11-20  7:52 ` [U-Boot] [PATCH 2/3] fsl/errata: move fsl_errata.h to common directory Shengzhou Liu
2015-12-15  0:43   ` York Sun
2015-11-20  7:52 ` [U-Boot] [PATCH 3/3] fsl/ddr: updated ddr errata-A008378 for arm and power SoCs Shengzhou Liu
2015-12-15  0:44   ` York Sun
2015-12-15  0:43 ` [U-Boot] [PATCH 1/3] arm: ls102x: add get_svr and IS_SVR_REV helper York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox