From 2f88566aaa85c9b217baa749e6fa6538a1b1d2b2 Mon Sep 17 00:00:00 2001
From: Holger Brunck <holger.brunck@keymile.com>
Date: Thu, 24 Nov 2011 03:09:10 +0000
Subject: [PATCH 1/2] post: fix compile issue for post tests on kirkwood

commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
but kirkwood has currently no implementation for this. So
undefine this for kirkwood boards.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
---
 post/post.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/post/post.c b/post/post.c
index 45e08f8ccc..d62f10aa53 100644
--- a/post/post.c
+++ b/post/post.c
@@ -495,7 +495,7 @@ void post_reloc(void)
  */
 unsigned long post_time_ms(unsigned long base)
 {
-#if defined(CONFIG_PPC) || defined(CONFIG_ARM)
+#if defined(CONFIG_PPC) || defined(CONFIG_ARM) && !defined(CONFIG_KIRKWOOD)
 	return (unsigned long)lldiv(get_ticks(), get_tbclk() / CONFIG_SYS_HZ)
 		- base;
 #else

From 953209bf5ef0889a1baa02aa0ed5324f53ff8fda Mon Sep 17 00:00:00 2001
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Thu, 10 Nov 2011 01:51:29 +0000
Subject: [PATCH 2/2] arm: add __aeabi_unwind_cpp_pr1() function to avoid
 linker complaints

With the ELDK 5.1 (beta) "armv7a" toolchain I'm get the following
build failure:

  $ ./MAKEALL mx51evk
  ...
  /opt/eldk-5.1/armv7a/sysroots/arm-linux-gnueabi/usr/lib/arm-linux-
  gnueabi/4.6.1/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined
  reference to `__aeabi_unwind_cpp_pr1'
  make: *** [u-boot] Error 1

This patch fixes the issue similar to commit
d442b6e7ad6a86e2fd0e6297291fe8872ff26fc6 but I don't know if it's
general enough or if it does harm when using other toolchains.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
---
 arch/arm/lib/eabi_compat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index e1b87bebad..2028dbd715 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -23,3 +23,7 @@ int raise (int signum)
 void __aeabi_unwind_cpp_pr0(void)
 {
 };
+
+void __aeabi_unwind_cpp_pr1(void)
+{
+};