s5pc110: Display more fancy
authorKyungmin Park <kyungmin.park@samsung.com>
Tue, 28 Jul 2009 04:56:10 +0000 (13:56 +0900)
committerKyungmin Park <kyungmin.park@samsung.com>
Tue, 28 Jul 2009 04:56:10 +0000 (13:56 +0900)
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
cpu/arm_cortexa8/s5pc1xx/clock.c
cpu/arm_cortexa8/s5pc1xx/cpu_info.c

index 69709c5..16d92d3 100644 (file)
@@ -66,6 +66,7 @@ static int s5p1xx_clock_read_reg(int offset)
 unsigned long get_pll_clk(int pllreg)
 {
        unsigned long r, m, p, s, mask, fout;
+       unsigned int freq;
 
        switch (pllreg) {
        case APLL:
@@ -117,14 +118,17 @@ unsigned long get_pll_clk(int pllreg)
        s = r & 0x7;
 
        if (cpu_is_s5pc110()) {
+               freq = CONFIG_SYS_CLK_FREQ_C110;
                if (pllreg == APLL) {
                        if (s < 1)
                                s = 1;
-                       fout = m * (CONFIG_SYS_CLK_FREQ_C110 / (p * (1 << (s - 1))));
+                       fout = m * (freq / (p * (1 << (s - 1))));
                } else
-                       fout = m * (CONFIG_SYS_CLK_FREQ_C110 / (p * (1 << s)));
-       } else
-               fout = m * (CONFIG_SYS_CLK_FREQ_C100 / (p * (1 << s)));
+                       fout = m * (freq / (p * (1 << s)));
+       } else {
+               freq = CONFIG_SYS_CLK_FREQ_C100;
+               fout = m * (freq / (p * (1 << s)));
+       }
 
        return fout;
 }
index bf174a6..1fac4b9 100644 (file)
@@ -52,7 +52,7 @@ int print_cpuinfo(void)
                        get_hclk_sys(CLK_M) / 1000000,
                        get_hclk_sys(CLK_D) / 1000000,
                        get_hclk_sys(CLK_P) / 1000000);
-               printf("\tPclk: Msys %luMhz, Dsys %luMhz, Psys %luMhz\n",
+               printf("\tPclk: Msys %3luMhz, Dsys %3luMhz, Psys %3luMhz\n",
                        get_pclk_sys(CLK_M) / 1000000,
                        get_pclk_sys(CLK_D) / 1000000,
                        get_pclk_sys(CLK_P) / 1000000);