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

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 <>
Acked-by: default avatarPeng Fan <>
parent f883de99
......@@ -196,7 +196,7 @@ int print_cpuinfo(void)
cpurev = get_cpu_rev();
#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);
#if defined(CONFIG_IMX_THERMAL) || defined(CONFIG_NXP_TMU)
puts("CPU: ");
switch (get_cpu_temp_grade(&minc, &maxc)) {
......@@ -236,7 +236,11 @@ int print_cpuinfo(void)
printf("(%dC to %dC)", minc, maxc);
#if defined(CONFIG_NXP_TMU)
ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal", &thermal_dev);
ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev);
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