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>
This commit is contained in:
parent
1aaf3f9ae4
commit
0c028a0328
@ -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)
|
||||
{
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user