diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-03-09 13:57:13 +0800 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 14:42:13 +0100 |
commit | 3b2ca32241435af884803e6b852cceb066077979 (patch) | |
tree | e8dc0bbebab8e43a6b2aa6c57a8c837cb5777c0e /drivers | |
parent | 09dcc345b2604dc598a6d77c2eb721bd43ad5e16 (diff) |
MLK-10774-28 imx:thermal Fix temperature checking issue
This patch is from commit c83c6cc7dedf9759bf193044ff5c3572d5f6afd2
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 0bd9cfd0304..4e1e41299c7 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -122,7 +122,7 @@ int imx_thermal_get_temp(struct udevice *dev, int *temp) int cpu_tmp = 0; cpu_tmp = read_cpu_temperature(dev); - while (cpu_tmp > TEMPERATURE_MIN && cpu_tmp < TEMPERATURE_MAX) { + while (cpu_tmp > TEMPERATURE_MIN) { if (cpu_tmp >= TEMPERATURE_HOT) { printf("CPU Temperature is %d C, too hot to boot, waiting...\n", cpu_tmp); @@ -153,7 +153,7 @@ static int imx_thermal_probe(struct udevice *dev) fuse_read(pdata->fuse_bank, pdata->fuse_word, &fuse); /* Check for valid fuse */ - if (fuse == 0 || fuse == ~0) { + if (fuse == 0 || fuse == ~0 || (fuse & 0xfff00000) == 0) { printf("CPU: Thermal invalid data, fuse: 0x%x\n", fuse); return -EPERM; } |