Patchwork [U-Boot,04/20] x86: Make calculate_relocation_address an overridable function

login
register
mail settings
Submitter Simon Glass
Date Nov. 3, 2012, 9:41 p.m.
Message ID <1351978902-23719-5-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/196953/
State Accepted, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - Nov. 3, 2012, 9:41 p.m.
From: Gabe Black <gabeblack@chromium.org>

Different systems may have different mechanisms for picking a suitable place
to relocate U-Boot to.

Signed-off-by: Gabe Black <gabeblack@chromium.org>

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/x86/lib/init_helpers.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index 6032ee5..fc28af7 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -32,6 +32,7 @@ 
 #include <status_led.h>
 #include <asm/processor.h>
 #include <asm/u-boot-x86.h>
+#include <linux/compiler.h>
 
 #include <asm/init_helpers.h>
 
@@ -72,7 +73,7 @@  int init_baudrate_f(void)
 	return 0;
 }
 
-int calculate_relocation_address(void)
+__weak int calculate_relocation_address(void)
 {
 	ulong text_start = (ulong)&__text_start;
 	/* keep .bss variables aligned */