diff options
author | Anson Huang <b20788@freescale.com> | 2012-08-01 00:52:55 +0800 |
---|---|---|
committer | Anson Huang <b20788@freescale.com> | 2012-08-01 20:29:40 +0800 |
commit | 71c992daf271d8c6c820c1e7eb4aff7a3df02910 (patch) | |
tree | 0cb1c75d1b5a3adf609c722781afdbe566512f60 /arch | |
parent | edafa36df5a0f16586aea50a404e9cb83ae570ea (diff) |
ENGR00218810-1 [Thermal]Add thermal alarm function
Add thermal irq alarm function.
Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx-anatop-thermal.c | 18 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/devices-common.h | 1 |
2 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx-anatop-thermal.c b/arch/arm/plat-mxc/devices/platform-imx-anatop-thermal.c index b96bc6fa7846..352d0f0cd6ff 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-anatop-thermal.c +++ b/arch/arm/plat-mxc/devices/platform-imx-anatop-thermal.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -20,9 +20,11 @@ #include <mach/hardware.h> #include <mach/devices-common.h> -#define imx_anatop_thermal_imx_data_entry_single(soc) \ - { \ +#define imx_anatop_thermal_imx_data_entry_single(soc) \ + { \ .iobase = ANATOP_BASE_ADDR, \ + .calibration_addr = OCOTP_BASE_ADDR + 0x4E0, \ + .irq = MXC_INT_ANATOP_TEMPSNSR \ } #ifdef CONFIG_SOC_IMX6Q @@ -40,6 +42,16 @@ struct platform_device *__init imx_add_anatop_thermal_imx( .end = data->iobase + SZ_4K - 1, .flags = IORESOURCE_MEM, }, + { + .start = data->calibration_addr, + .end = data->calibration_addr + SZ_4 - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = data->irq, + .end = data->irq, + .flags = IORESOURCE_IRQ, + }, }; return imx_add_platform_device("anatop_thermal", 0, diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 4b6110712d1b..4512751cbd11 100755 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h @@ -530,6 +530,7 @@ struct platform_device *__init imx_add_viv_gpu( struct imx_anatop_thermal_imx_data { int id; resource_size_t iobase; + resource_size_t calibration_addr; resource_size_t irq; }; struct platform_device *__init imx_add_anatop_thermal_imx( |