diff options
author | Tom Rini <trini@konsulko.com> | 2021-03-15 12:15:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-15 12:15:38 -0400 |
commit | 22fc991dafee0142fc6bf621e7bd558bd58020b4 (patch) | |
tree | e5da8826fd735de968519f432864dc1545d96017 /drivers/thermal/imx_tmu.c | |
parent | 1876b390f31afca15de334e499aa071b0bf64a44 (diff) | |
parent | 4103e13534141c31e4e9bf40848ab3a61dabce81 (diff) |
Merge tag 'v2021.04-rc4' into next
Prepare v2021.04-rc4
Diffstat (limited to 'drivers/thermal/imx_tmu.c')
-rw-r--r-- | drivers/thermal/imx_tmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c index 02cefecd0d..07766baf45 100644 --- a/drivers/thermal/imx_tmu.c +++ b/drivers/thermal/imx_tmu.c @@ -344,6 +344,7 @@ static int imx_tmu_bind(struct udevice *dev) ofnode node, offset; const char *name; const void *prop; + int minc, maxc; debug("%s dev name %s\n", __func__, dev->name); @@ -352,6 +353,10 @@ static int imx_tmu_bind(struct udevice *dev) return 0; pdata->zone_node = 1; + /* default alert/crit temps based on temp grade */ + get_cpu_temp_grade(&minc, &maxc); + pdata->critical = maxc * 1000; + pdata->alert = (maxc - 10) * 1000; node = ofnode_path("/thermal-zones"); ofnode_for_each_subnode(offset, node) { @@ -443,6 +448,7 @@ static int imx_tmu_probe(struct udevice *dev) if (pdata->zone_node) { imx_tmu_init(dev); imx_tmu_calibration(dev); + imx_tmu_enable_msite(dev); } else { imx_tmu_enable_msite(dev); } |