[U-Boot] [PATCH 3/4 v2] smdk5250: enable support for tmu throttling
Akshay Saraswat
akshay.s at samsung.com
Mon May 13 07:19:15 CEST 2013
Adding tmu throttling support to smdk5250.
Signed-off-by: Akshay Saraswat <akshay.s at samsung.com>
Acked-by: Simon Glass <sjg at chromium.org>
---
Changes since v1:
- Added "Acked-by: Simon Glass".
board/samsung/smdk5250/smdk5250.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 8b09e1d..301dcf8 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -38,6 +38,8 @@
#include <power/pmic.h>
#include <power/max77686_pmic.h>
#include <tmu.h>
+#include <asm/arch/cpufreq.h>
+#include <asm/arch/clk.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -58,6 +60,15 @@ static void boot_temp_check(void)
break;
case TMU_STATUS_WARNING:
puts("EXYNOS_TMU: WARNING! Temperature very high\n");
+#ifdef CONFIG_EXYNOS_CPUFREQ
+ exynos_set_frequency(CPU_FREQ_L400);
+#endif
+ break;
+ case TMU_STATUS_NORMAL:
+#ifdef CONFIG_EXYNOS_CPUFREQ
+ if (get_pll_clk(APLL) != 1700000000)
+ exynos_set_frequency(CPU_FREQ_L1700);
+#endif
break;
/*
* TMU_STATUS_INIT means something is wrong with temperature sensing
@@ -110,6 +121,13 @@ int board_init(void)
boot_temp_check();
#endif
+#if defined CONFIG_EXYNOS_CPUFREQ
+ if (exynos_cpufreq_init()) {
+ debug("%s: Failed to init CPU frequency scaling\n", __func__);
+ return -1;
+ }
+#endif
+
#ifdef CONFIG_EXYNOS_SPI
spi_init();
#endif
@@ -119,6 +137,7 @@ int board_init(void)
#ifdef CONFIG_SOUND_MAX98095
board_enable_audio_codec();
#endif
+
return 0;
}
--
1.7.10.4
More information about the U-Boot
mailing list