diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/clock.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/clock.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 8cf39e33579e..39c238d7a3dc 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -25,13 +25,13 @@ | |||
25 | 25 | ||
26 | #include <mach/regs-sys.h> | 26 | #include <mach/regs-sys.h> |
27 | #include <mach/regs-clock.h> | 27 | #include <mach/regs-clock.h> |
28 | #include <mach/pll.h> | ||
29 | 28 | ||
30 | #include <plat/cpu.h> | 29 | #include <plat/cpu.h> |
31 | #include <plat/devs.h> | 30 | #include <plat/devs.h> |
32 | #include <plat/cpu-freq.h> | 31 | #include <plat/cpu-freq.h> |
33 | #include <plat/clock.h> | 32 | #include <plat/clock.h> |
34 | #include <plat/clock-clksrc.h> | 33 | #include <plat/clock-clksrc.h> |
34 | #include <plat/pll.h> | ||
35 | 35 | ||
36 | /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call | 36 | /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call |
37 | * ext_xtal_mux for want of an actual name from the manual. | 37 | * ext_xtal_mux for want of an actual name from the manual. |
@@ -735,7 +735,8 @@ void __init_or_cpufreq s3c6400_setup_clocks(void) | |||
735 | /* For now assume the mux always selects the crystal */ | 735 | /* For now assume the mux always selects the crystal */ |
736 | clk_ext_xtal_mux.parent = xtal_clk; | 736 | clk_ext_xtal_mux.parent = xtal_clk; |
737 | 737 | ||
738 | epll = s3c6400_get_epll(xtal); | 738 | epll = s3c_get_pll6553x(xtal, __raw_readl(S3C_EPLL_CON0), |
739 | __raw_readl(S3C_EPLL_CON1)); | ||
739 | mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON)); | 740 | mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON)); |
740 | apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON)); | 741 | apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON)); |
741 | 742 | ||
@@ -744,7 +745,13 @@ void __init_or_cpufreq s3c6400_setup_clocks(void) | |||
744 | printk(KERN_INFO "S3C64XX: PLL settings, A=%ld, M=%ld, E=%ld\n", | 745 | printk(KERN_INFO "S3C64XX: PLL settings, A=%ld, M=%ld, E=%ld\n", |
745 | apll, mpll, epll); | 746 | apll, mpll, epll); |
746 | 747 | ||
747 | hclk2 = mpll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2); | 748 | if(__raw_readl(S3C64XX_OTHERS) & S3C64XX_OTHERS_SYNCMUXSEL) |
749 | /* Synchronous mode */ | ||
750 | hclk2 = apll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2); | ||
751 | else | ||
752 | /* Asynchronous mode */ | ||
753 | hclk2 = mpll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2); | ||
754 | |||
748 | hclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK); | 755 | hclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK); |
749 | pclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_PCLK); | 756 | pclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_PCLK); |
750 | 757 | ||