mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
imx: mx6 correct get_cpu_rev
The DIGPROG register map: 23 ------- 16 | 15 ------ 8 | 7 --- 0 | Major upper | Major Lower | Minor | We also need to account for Major Lower. Signed-off-by: Ye.Li <B37916@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
This commit is contained in:
parent
b65d9d868e
commit
dfd4861c22
1 changed files with 3 additions and 1 deletions
|
@ -62,6 +62,7 @@ u32 get_cpu_rev(void)
|
|||
struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
|
||||
u32 reg = readl(&anatop->digprog_sololite);
|
||||
u32 type = ((reg >> 16) & 0xff);
|
||||
u32 major;
|
||||
|
||||
if (type != MXC_CPU_MX6SL) {
|
||||
reg = readl(&anatop->digprog);
|
||||
|
@ -79,8 +80,9 @@ u32 get_cpu_rev(void)
|
|||
}
|
||||
|
||||
}
|
||||
major = ((reg >> 8) & 0xff);
|
||||
reg &= 0xff; /* mx6 silicon revision */
|
||||
return (type << 12) | (reg + 0x10);
|
||||
return (type << 12) | (reg + (0x10 * (major + 1)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue