Commit 878a4ff4 authored by Ye Li's avatar Ye Li Committed by Jason Liu

MLK-16238-2 imx: Update CPU info print to support TMU

Current cpu info common function in imx-common only supports imx-thermal, update
the codes to also support TMU.
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
Acked-by: default avatarPeng Fan <peng.fan@nxp.com>
parent f883de99
......@@ -196,7 +196,7 @@ int print_cpuinfo(void)
cpurev = get_cpu_rev();
#if defined(CONFIG_IMX_THERMAL)
#if defined(CONFIG_IMX_THERMAL) || defined(CONFIG_NXP_TMU)
struct udevice *thermal_dev;
int cpu_tmp, minc, maxc, ret;
......@@ -219,7 +219,7 @@ int print_cpuinfo(void)
mxc_get_clock(MXC_ARM_CLK) / 1000000);
#endif
#if defined(CONFIG_IMX_THERMAL)
#if defined(CONFIG_IMX_THERMAL) || defined(CONFIG_NXP_TMU)
puts("CPU: ");
switch (get_cpu_temp_grade(&minc, &maxc)) {
case TEMP_AUTOMOTIVE:
......@@ -236,7 +236,11 @@ int print_cpuinfo(void)
break;
}
printf("(%dC to %dC)", minc, maxc);
#if defined(CONFIG_NXP_TMU)
ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal", &thermal_dev);
#else
ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev);
#endif
if (!ret) {
ret = thermal_get_temp(thermal_dev, &cpu_tmp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment