
Hi Hatim,
On Tue, Nov 6, 2012 at 2:18 AM, Hatim Ali hatim.rv@samsung.com wrote:
From: Akshay Saraswat akshay.s@samsung.com
This adds call to tmu_init() and TMU status polling in board_poll_devices() funtion to monitor temperature change of the SOC.
Signed-off-by: Akshay Saraswat akshay.s@samsung.com
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index ac7346d..19eb2e0 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -32,15 +32,51 @@ #include <asm/arch/pinmux.h> #include <asm/arch/sromc.h> #include <pmic.h> +#include <asm/arch/exynos-tmu.h> +#include <asm/arch/power.h>
DECLARE_GLOBAL_DATA_PTR;
+/*
- Polling various devices on board for details and status monitoring purposes
- */
+void board_poll_devices(void) +{ +#if defined CONFIG_EXYNOS_TMU
int temp;
switch (tmu_monitor(&temp)) {
case TMU_STATUS_TRIPPED:
puts("EXYNOS_TMU: TRIPPING! Device power going down ...\n");
power_shutdown();
break;
case TMU_STATUS_WARNING:
puts("EXYNOS_TMU: WARNING! Temperature very high\n");
break;
case TMU_STATUS_INIT:
case TMU_STATUS_NORMAL:
debug("syetm is in normal temperature state\n");
typo: syetm
This probably doesn't add much - I suggest punting this line since otherwise if you enable DEBUG in this file it will flood the console.
break;
default:
debug("Unknown TMU state\n");
}
+#endif +}
int board_init(void) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); #if defined(CONFIG_PMIC) pmic_init(); #endif
+#if defined CONFIG_EXYNOS_TMU
if (tmu_init(gd->fdt_blob)) {
debug("%s: Failed to init TMU\n", __func__);
return -1;
}
+#endif
#ifdef CONFIG_EXYNOS_SPI spi_init();
#endif
1.7.2.3
Regards, Simon