Browse Source

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: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 5d944b0f18)
Ye Li 3 years ago
parent
commit
526cce0e41
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      arch/arm/imx-common/cpu.c

+ 6
- 2
arch/arm/imx-common/cpu.c View File

@ -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);


Loading…
Cancel
Save