浏览代码

74xx_7xx: Fix rounding problem in CPU frequency calculation

This patch fixes a problem in the CPU frequency calculation. Without it
a 798MHz CPU is displayed as 368.503 MHz. And with it it's 798 MHz.

Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese 16 年之前
父节点
当前提交
c21f62d848
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      cpu/74xx_7xx/speed.c

+ 2 - 2
cpu/74xx_7xx/speed.c

@@ -149,8 +149,8 @@ int get_clocks (void)
 
 	case CPU_750GX:
 	case CPU_750FX:
-		clock = gd->bus_clk *
-			hid1_fx_multipliers_x_10[get_hid1 () >> 27] / 10;
+		clock = (gd->bus_clk / 10) *
+			hid1_fx_multipliers_x_10[get_hid1 () >> 27];
 		break;
 
 	case CPU_7450: