diff options
author | Ye.Li <B37916@freescale.com> | 2014-11-20 13:14:14 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-11-21 14:30:12 (GMT) |
commit | 7a264168473b8a9ad94352d55a0392ae251676a8 (patch) | |
tree | 0bf7a7c8374ab2ad281bccfa0fea8747e48650c5 /arch/arm/cpu/armv7/mx6 | |
parent | e3568d2ecadda3e6c24ffab1670b77763df7419f (diff) | |
download | u-boot-fsl-qoriq-7a264168473b8a9ad94352d55a0392ae251676a8.tar.xz |
mx6: thermal: Check cpu temperature via thermal sensor
Add imx6 thermal device to mx6 soc file. Read the cpu temperature
using this device to access onchip thermal sensor.
Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx6')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index 5fd2a63..5f5f497 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -22,6 +22,8 @@ #include <asm/arch/mxc_hdmi.h> #include <asm/arch/crm_regs.h> #include <asm/bootm.h> +#include <dm.h> +#include <imx_thermal.h> enum ldo_reg { LDO_ARM, @@ -37,6 +39,19 @@ struct scu_regs { u32 fpga_rev; }; +#if defined(CONFIG_IMX6_THERMAL) +static const struct imx_thermal_plat imx6_thermal_plat = { + .regs = (void *)ANATOP_BASE_ADDR, + .fuse_bank = 1, + .fuse_word = 6, +}; + +U_BOOT_DEVICE(imx6_thermal) = { + .name = "imx_thermal", + .platdata = &imx6_thermal_plat, +}; +#endif + u32 get_nr_cpus(void) { struct scu_regs *scu = (struct scu_regs *)SCU_BASE_ADDR; |