[U-Boot] [PATCH] Add i.MX6 CPU temperature sensor support

Fabio Estevam festevam at gmail.com
Mon Sep 1 04:06:44 CEST 2014


On Sun, Aug 31, 2014 at 12:03 PM,  <nitin.garg at freescale.com> wrote:
> From: Nitin Garg <nitin.garg at freescale.com>
>
> Support CPU temperature sensors on i.MX6 SoC.
>
> Signed-off-by: Nitin Garg <nitin.garg at freescale.com>

Please run checkpatch on all the patches and fix the issues prior to
submitting them:

CHECK: Alignment should match open parenthesis
#67: FILE: arch/arm/cpu/armv7/mx6/soc.c:251:
+        writel(BM_ANADIG_USB1_PLL_480_CTRL_POWER,
+                &anatop->usb1_pll_480_ctrl_set);

CHECK: Alignment should match open parenthesis
#75: FILE: arch/arm/cpu/armv7/mx6/soc.c:259:
+        writel(BM_ANADIG_USB1_PLL_480_CTRL_BYPASS,
+                &anatop->usb1_pll_480_ctrl_clr);

CHECK: Alignment should match open parenthesis
#78: FILE: arch/arm/cpu/armv7/mx6/soc.c:262:
+        writel(BM_ANADIG_USB1_PLL_480_CTRL_ENABLE,
+                &anatop->usb1_pll_480_ctrl_set);

CHECK: braces {} should be used on all arms of this statement
#157: FILE: arch/arm/cpu/armv7/mx6/soc.c:341:
+        if (cpu_tmp >= TEMPERATURE_HOT) {
[...]
+        } else
[...]

CHECK: Alignment should match open parenthesis
#159: FILE: arch/arm/cpu/armv7/mx6/soc.c:343:
+            printf("CPU is %d C, too hot to boot, waiting...\n",
+                cpu_tmp);

CHECK: Alignment should match open parenthesis
#167: FILE: arch/arm/cpu/armv7/mx6/soc.c:351:
+        printf("CPU:   Temperature %d C, calibration data: 0x%x\n",
+            cpu_tmp, fuse);

CHECK: extern prototypes should be avoided in .h files
#785: FILE: arch/arm/include/asm/arch-mx6/imx-regs.h:814:
+extern void check_cpu_temperature(void);

total: 1 errors, 0 warnings, 7 checks, 749 lines checked

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE
USLEEP_RANGE


> ---
>  arch/arm/cpu/armv7/mx6/soc.c             |  137 +++++++-
>  arch/arm/imx-common/cpu.c                |    7 +-
>  arch/arm/include/asm/arch-mx6/crm_regs.h |  543 +++++++++++++++++++++++++++++-
>  arch/arm/include/asm/arch-mx6/imx-regs.h |    9 +-
>  4 files changed, 692 insertions(+), 4 deletions(-)

It would be better to add a config option for this temperature sensor support.

This would allow people to disable it if they are not interested in
this feature without increasing the final U-boot binary size.


More information about the U-Boot mailing list