[U-Boot] [PATCH v4 4/5] mx6: thermal: Check cpu temperature via thermal sensor

Nitin Garg nitin.garg at freescale.com
Tue Sep 16 18:48:57 CEST 2014


read cpu temperature using the onchip thermal
sensor.

Signed-off-by: Nitin Garg <nitin.garg at freescale.com>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/imx-common/cpu.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index ed826a0..10e1b05 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -2,7 +2,7 @@
  * (C) Copyright 2007
  * Sascha Hauer, Pengutronix
  *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2014 Freescale Semiconductor, Inc.
  *
  * SPDX-License-Identifier:	GPL-2.0+
  */
@@ -15,6 +15,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
 #include <ipu_pixfmt.h>
+#include <imx_thermal.h>
 
 #ifdef CONFIG_FSL_ESDHC
 #include <fsl_esdhc.h>
@@ -139,6 +140,11 @@ int print_cpuinfo(void)
 		(cpurev & 0x000F0) >> 4,
 		(cpurev & 0x0000F) >> 0,
 		mxc_get_clock(MXC_ARM_CLK) / 1000000);
+
+#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL)
+	check_cpu_temperature();
+#endif
+
 	printf("Reset cause: %s\n", get_reset_cause());
 	return 0;
 }
-- 
1.7.9.5



More information about the U-Boot mailing list