Patchwork [U-Boot,v2,3/4] arm920t/at91/reset: board_reset: define weak symbol

login
register
mail settings
Submitter Andreas Bießmann
Date Nov. 30, 2010, 7:45 p.m.
Message ID <1291146306-15103-4-git-send-email-andreas.devel@googlemail.com>
Download mbox | patch
Permalink /patch/73647/
State Accepted
Delegated to: Reinhard Meyer
Headers show

Comments

Andreas Bießmann - Nov. 30, 2010, 7:45 p.m.
From: Andreas Bießmann <biessmann@corscience.de>

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---
remove 'arm920t: fix linker skript for -pie linking' in favor of this patch

 arch/arm/cpu/arm920t/at91/reset.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Jens Scharsig - Dec. 2, 2010, 7 p.m.
Am 30.11.2010 20:45, schrieb Andreas Bießmann:
> From: Andreas Bießmann <biessmann@corscience.de>
> 
> Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
> ---

I can confirm this patch. It works with eb+cpux9k2 board.

regard Jens

Patch

diff --git a/arch/arm/cpu/arm920t/at91/reset.c b/arch/arm/cpu/arm920t/at91/reset.c
index ce9c156..7ba0814 100644
--- a/arch/arm/cpu/arm920t/at91/reset.c
+++ b/arch/arm/cpu/arm920t/at91/reset.c
@@ -35,7 +35,10 @@ 
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_st.h>
 
-void board_reset(void) __attribute__((__weak__));
+void  __attribute__((weak)) board_reset(void)
+{
+    /* true empty function for defining weak symbol */
+}
 
 void reset_cpu(ulong ignored)
 {
@@ -45,8 +48,7 @@  void reset_cpu(ulong ignored)
 	serial_exit();
 #endif
 
-	if (board_reset)
-		board_reset();
+	board_reset();
 
 	/* Reset the cpu by setting up the watchdog timer */
 	writel(AT91_ST_WDMR_RSTEN | AT91_ST_WDMR_EXTEN | AT91_ST_WDMR_WDV(2),