On Thu, 8 Apr 2010 10:37:08 +0200 Joakim Tjernlund <joakim.tjernl...@transmode.se> wrote:
> Kim Phillips <kim.phill...@freescale.com> wrote on 2010-04-08 10:27:03: > > > > The documentation is confusing: the e300c2 has its FPU chopped off - > > the FP registers are simply not there. > > > > this is a good catch by Jocke - it would be best if generic 83xx code > > didn't depend on the ppcDW* accessors. > > That or one could impl. ppcDW* using normal load/store insns for 832x. > Either way the ppcDW* should be inlined as the overhead for doing > function calls isn't something you want when looking for speed. another good point, but it seems they were added primarily for code density benefits. I think we can do something like this in the meantime: >From 686d3bb7a732ec36beec169c4eaf4882382d3aa2 Mon Sep 17 00:00:00 2001 From: Kim Phillips <kim.phill...@freescale.com> Date: Thu, 8 Apr 2010 18:22:13 -0500 Subject: [PATCH] mpc83xx: implement ppcDW{load,store} accessors for e300c2 e300c2 core based processors (MPC832x) don't have an FPU: provide alternative, gpr based accessor functions for code compatibility. Suggested-by: Joakim Tjernlund <joakim.tjernl...@transmode.se> Signed-off-by: Kim Phillips <kim.phill...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot