summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common/cpu.c
diff options
context:
space:
mode:
authorAdrian Alonso <aalonso@freescale.com>2015-09-02 13:54:13 -0500
committerStefano Babic <sbabic@denx.de>2015-09-13 10:11:53 +0200
commit1368f99346b1a6c566095bcb1df662cdbdb129b3 (patch)
tree62c61701a30e15abd3e7adf2a21dd19fbe32233a /arch/arm/imx-common/cpu.c
parent15c52b3ddd1e46743f5fb604f0cbcae144237ed5 (diff)
downloadu-boot-imx-1368f99346b1a6c566095bcb1df662cdbdb129b3.zip
u-boot-imx-1368f99346b1a6c566095bcb1df662cdbdb129b3.tar.gz
u-boot-imx-1368f99346b1a6c566095bcb1df662cdbdb129b3.tar.bz2
thermal: imx_thermal: rework driver to be reused
Rework imx_thermal driver to be used across i.MX processor that support thermal sensor Signed-off-by: Adrian Alonso <aalonso@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'arch/arm/imx-common/cpu.c')
-rw-r--r--arch/arm/imx-common/cpu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index e27546c..38cd0c8 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -154,14 +154,12 @@ int print_cpuinfo(void)
u32 cpurev;
__maybe_unused u32 max_freq;
-#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL)
+ cpurev = get_cpu_rev();
+
+#if defined(CONFIG_IMX_THERMAL)
struct udevice *thermal_dev;
int cpu_tmp, minc, maxc, ret;
-#endif
- cpurev = get_cpu_rev();
-
-#if defined(CONFIG_MX6)
printf("CPU: Freescale i.MX%s rev%d.%d",
get_imx_type((cpurev & 0xFF000) >> 12),
(cpurev & 0x000F0) >> 4,
@@ -181,7 +179,7 @@ int print_cpuinfo(void)
mxc_get_clock(MXC_ARM_CLK) / 1000000);
#endif
-#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL)
+#if defined(CONFIG_IMX_THERMAL)
puts("CPU: ");
switch (get_cpu_temp_grade(&minc, &maxc)) {
case TEMP_AUTOMOTIVE: