[PATCH] mpc83xx: implement ppcDW{load,store} accessors for e300c2

Kim Phillips kim.phillips at freescale.com
Fri Apr 9 01:22:13 CEST 2010


e300c2 core based processors (MPC832x) don't have an FPU: provide
alternative, gpr based accessor functions for code compatibility.

Suggested-by: Joakim Tjernlund <joakim.tjernlund at transmode.se>
Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
---
 arch/ppc/cpu/mpc83xx/start.S |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/ppc/cpu/mpc83xx/start.S b/arch/ppc/cpu/mpc83xx/start.S
index 68bb620..6bfce57 100644
--- a/arch/ppc/cpu/mpc83xx/start.S
+++ b/arch/ppc/cpu/mpc83xx/start.S
@@ -139,14 +139,28 @@ get_pvr:
 
 	.globl	ppcDWstore
 ppcDWstore:
+#if !defined(CONFIG_MPC832x)
 	lfd	1, 0(r4)
 	stfd	1, 0(r3)
+#else
+	lwz	r5, 0(r4)
+	stw	r5, 0(r3)
+	lwz	r5, 4(r4)
+	stw	r5, 4(r3)
+#endif
 	blr
 
 	.globl	ppcDWload
 ppcDWload:
+#if !defined(CONFIG_MPC832x)
 	lfd	1, 0(r3)
 	stfd	1, 0(r4)
+#else
+	lwz	r5, 0(r3)
+	stw	r5, 0(r4)
+	lwz	r5, 4(r3)
+	stw	r5, 4(r4)
+#endif
 	blr
 
 #ifndef CONFIG_DEFAULT_IMMR
-- 
1.7.0.5


but 83xx is still missing (at least) the post_word_{load,store} functions:

post/libpost.a(post.o): In function `post_bootmode_get':
/home/kim/git/u-boot/post/post.c:107: undefined reference to `post_word_load'
post/libpost.a(post.o): In function `post_bootmode_test_on':
/home/kim/git/u-boot/post/post.c:154: undefined reference to `post_word_load'
/home/kim/git/u-boot/post/post.c:160: undefined reference to `post_word_store'
post/libpost.a(post.o): In function `post_bootmode_test_off':
/home/kim/git/u-boot/post/post.c:165: undefined reference to `post_word_load'
/home/kim/git/u-boot/post/post.c:169: undefined reference to `post_word_store'
post/libpost.a(post.o): In function `post_bootmode_init':
/home/kim/git/u-boot/post/post.c:90: undefined reference to `post_word_load'
/home/kim/git/u-boot/post/post.c:99: undefined reference to `post_word_store'

Michael, can you resubmit something more comprehensive, something that
builds for 83xx with CONFIG_POST turned on?

Kim


More information about the U-Boot mailing list