[U-Boot] [PATCH 2/5] ARM: lib: Add cpu_clock_teardown() call

Marek Vasut
2013-11-11T16:22:43Z

Add cpu_clock_teardown() call before the Linux kernel is started,
so the CPU code can stop clock that may hinder the Linux's boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/cpu/armv7/cpu.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 01cdb7e..75f8a33 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -23,6 +23,7 @@
#include <linux/compiler.h>

void __weak cpu_cache_initialization(void){}
+void __weak cpu_clock_teardown(void) {}

int cleanup_before_linux(void)
{
@@ -66,5 +67,8 @@ int cleanup_before_linux(void)
*/
cpu_cache_initialization();

+ /* Let CPUs stop clock that might hinder Linux's boot. */
+ cpu_clock_teardown();
+
return 0;
}
--
1.8.4.rc3