diff mbox

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

Message ID 1412167282-4134-5-git-send-email-nitin.garg@freescale.com
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Nitin Garg Oct. 1, 2014, 12:41 p.m. UTC
read cpu temperature using the onchip thermal
sensor.

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

 arch/arm/imx-common/cpu.c |    6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index ed826a0..a7b49bd 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -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;
 }