85xx: get_tbclk() speed up and rounding fix
PATCH 1/1 85xx: get_tbclk() speed up and rounding fix
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(-)
cpu/mpc85xx/cpu.c +3 -5
@@ -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 ; }
Signature · 1 line
1.5.3.8
Andy Fleming
AppliedPATCH 1/1 85xx: get_tbclk() speed up and rounding fix
Quoted 9 lines · Kumar Gala
From: James Yang
Speed up
get_tbclk()by referencing pre-computed bus clock frequency value from global data instead ofsys_info_t. Fix rounding of result to nearest; previously it was rounding upwards.Signed-off-by James YangSigned-off-by Kumar Gala <[email protected]>
Applied to for-1.3.3, thanks
Andy