diff options
-rw-r--r-- | drivers/thermal/imx_scu_thermal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c index 321f905e3a..83ec753802 100644 --- a/drivers/thermal/imx_scu_thermal.c +++ b/drivers/thermal/imx_scu_thermal.c @@ -61,13 +61,15 @@ int imx_sc_thermal_get_temp(struct udevice *dev, int *temp) return ret; while (cpu_temp >= pdata->alert) { - printf("CPU Temperature (%dC) has beyond alert (%dC), close to critical (%dC)", + printf("CPU Temperature (%dC) beyond alert (%dC), close to critical (%dC)", cpu_temp, pdata->alert, pdata->critical); puts(" waiting...\n"); mdelay(pdata->polling_delay); ret = read_temperature(dev, &cpu_temp); if (ret) return ret; + if (cpu_temp >= pdata->alert && !pdata->alert) + break; } *temp = cpu_temp / 1000; |