]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Add a default implementation for cleanup_before_linux()
authorGabe Black <gabeblack@chromium.org>
Sat, 20 Oct 2012 12:33:10 +0000 (12:33 +0000)
committerSimon Glass <sjg@chromium.org>
Fri, 30 Nov 2012 21:44:04 +0000 (13:44 -0800)
This function provides an opportunity for some last minute cleanup and
reconfiguration before control is handed over to Linux. It's possible this
may need to do something in the future, but for now it's left empty. It's set
up as a weak symbol so it can be overridden if necessary on a case by case
basis.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/cpu.c
arch/x86/include/asm/u-boot-x86.h

index 9c2db9f21e44b8dd21744967d2d5c9e2093f8c9c..fabfbd1bf7f9f5deb40ffdcf04f81ec42eb6c52b 100644 (file)
@@ -115,6 +115,11 @@ void setup_gdt(gd_t *id, u64 *gdt_addr)
        load_fs(X86_GDT_ENTRY_32BIT_FS);
 }
 
+int __weak x86_cleanup_before_linux(void)
+{
+       return 0;
+}
+
 int x86_cpu_init_f(void)
 {
        const u32 em_rst = ~X86_CR0_EM;
index 878a1ee77b116da67f5b9a43179f395c8daefe95..a4a5ae05d119a92bd456b94b59e6eac7e5231499 100644 (file)
@@ -40,6 +40,7 @@ int cpu_init_f(void);
 void init_gd(gd_t *id, u64 *gdt_addr);
 void setup_gdt(gd_t *id, u64 *gdt_addr);
 int init_cache(void);
+int cleanup_before_linux(void);
 
 /* cpu/.../timer.c */
 void timer_isr(void *);