mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 17:10:11 +00:00
imx: Fix market segment fuse offset on iMX8MP
iMX8MP has shifted market segment fuse one bit from 0x440 [7:6] to [6:5], correct it in imx common codes. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
42a49754e2
commit
79e0217a8e
1 changed files with 7 additions and 1 deletions
|
@ -385,6 +385,9 @@ u32 get_cpu_speed_grade_hz(void)
|
|||
*/
|
||||
#define OCOTP_TESTER3_TEMP_SHIFT 6
|
||||
|
||||
/* iMX8MP uses OCOTP_TESTER3[6:5] for Market segment */
|
||||
#define IMX8MP_OCOTP_TESTER3_TEMP_SHIFT 5
|
||||
|
||||
u32 get_cpu_temp_grade(int *minc, int *maxc)
|
||||
{
|
||||
struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
|
||||
|
@ -394,6 +397,9 @@ u32 get_cpu_temp_grade(int *minc, int *maxc)
|
|||
uint32_t val;
|
||||
|
||||
val = readl(&fuse->tester3);
|
||||
if (is_imx8mp())
|
||||
val >>= IMX8MP_OCOTP_TESTER3_TEMP_SHIFT;
|
||||
else
|
||||
val >>= OCOTP_TESTER3_TEMP_SHIFT;
|
||||
val &= 0x3;
|
||||
|
||||
|
|
Loading…
Reference in a new issue