diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-03-09 13:57:13 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-29 14:58:51 +0800 |
commit | e618f5c5de08879d7078cd38eae0a8f74fb55d0b (patch) | |
tree | 1423ac127c43000a4641bd321ccc21e9427546d9 /drivers | |
parent | ed8fa5dabf062d73a0be00f092d807f0e3d69895 (diff) | |
download | u-boot-imx-e618f5c5de08879d7078cd38eae0a8f74fb55d0b.zip u-boot-imx-e618f5c5de08879d7078cd38eae0a8f74fb55d0b.tar.gz u-boot-imx-e618f5c5de08879d7078cd38eae0a8f74fb55d0b.tar.bz2 |
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 0bd9cfd..4e1e412 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; } |