]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/cpu.c
TX6 Release 2013-04-22
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / cpu.c
index 091e3e0842d5506b2b6351a404ee06e8cb75d594..bf481de3ba8eff9e86516dd2c5e232b0b50fec93 100644 (file)
 
 #include <common.h>
 #include <command.h>
+#include <lcd.h>
 #include <asm/system.h>
 #include <asm/cache.h>
 #include <asm/armv7.h>
+#include <linux/compiler.h>
 
-void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
-{
-}
-
-void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
-       __attribute__((weak, alias("save_boot_params_default")));
+void __weak cpu_cache_initialization(void){}
 
 int cleanup_before_linux(void)
 {
@@ -52,7 +49,17 @@ int cleanup_before_linux(void)
         *
         * we turn off caches etc ...
         */
+#ifndef CONFIG_SPL_BUILD
        disable_interrupts();
+#ifdef CONFIG_LCD
+       {
+               /* switch off LCD panel */
+               lcd_panel_disable();
+               /* disable LCD controller */
+               lcd_disable();
+       }
+#endif /* CONFIG_LCD */
+#endif /* CONFIG_SPL_BUILD */
 
        /*
         * Turn off I-cache and invalidate it
@@ -65,6 +72,7 @@ int cleanup_before_linux(void)
         * dcache_disable() in turn flushes the d-cache and disables MMU
         */
        dcache_disable();
+       v7_outer_cache_disable();
 
        /*
         * After D-cache is flushed and before it is disabled there may
@@ -78,5 +86,10 @@ int cleanup_before_linux(void)
         */
        invalidate_dcache_all();
 
+       /*
+        * Some CPU need more cache attention before starting the kernel.
+        */
+       cpu_cache_initialization();
+
        return 0;
 }