From: James Yang

Speed up get_tbclk() by referencing pre-computed bus clock
frequency value from global data instead of sys_info_t.  Fix
rounding of result to nearest; previously it was rounding
upwards.

Signed-off-by: James Yang
Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---

In my git tree as well.

 cpu/mpc85xx/cpu.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
index ac8b018..558ab0c 100644
--- a/cpu/mpc85xx/cpu.c
+++ b/cpu/mpc85xx/cpu.c
@@ -30,6 +30,8 @@
 #include <command.h>
 #include <asm/cache.h>

+DECLARE_GLOBAL_DATA_PTR;
+
 int checkcpu (void)
 {
        sys_info_t sysinfo;
@@ -190,11 +192,7 @@ int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int 
argc, char *argv[])
  */
 unsigned long get_tbclk (void)
 {
-
-       sys_info_t  sys_info;
-
-       get_sys_info(&sys_info);
-       return ((sys_info.freqSystemBus + 7L) / 8L);
+       return (gd->bus_clk + 4UL)/8UL;
 }


-- 
1.5.3.8


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to