diff options
author | Heiko Stuebner <heiko@sntech.de> | 2012-05-12 16:22:18 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-12 16:22:18 +0900 |
commit | 2473f713ec78e477b9c97d122f9304ad9bc7d98a (patch) | |
tree | 971d053e26695d5b8f1cac15eee8805e4210bd37 /arch/arm/mach-s3c24xx/common.c | |
parent | de7bfff1b251395be9a229ee14191105d8d1385d (diff) | |
download | blackbird-op-linux-2473f713ec78e477b9c97d122f9304ad9bc7d98a.tar.gz blackbird-op-linux-2473f713ec78e477b9c97d122f9304ad9bc7d98a.zip |
ARM: S3C24XX: move common clock init into common.c
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c24xx/common.c')
-rw-r--r-- | arch/arm/mach-s3c24xx/common.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index 5e4ac347f01e..d42423aa231c 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c @@ -41,6 +41,7 @@ #include <asm/mach/arch.h> #include <asm/mach/map.h> +#include <mach/regs-clock.h> #include <mach/regs-gpio.h> #include <plat/regs-serial.h> @@ -52,6 +53,8 @@ #include <plat/s3c2416.h> #include <plat/s3c244x.h> #include <plat/s3c2443.h> +#include <plat/cpu-freq.h> +#include <plat/pll.h> /* table of supported CPUs */ @@ -307,3 +310,18 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { .nr_resources = ARRAY_SIZE(s3c2410_uart3_resource), }, }; + +/* initialise all the clocks */ + +void __init_or_cpufreq s3c24xx_setup_clocks(unsigned long fclk, + unsigned long hclk, + unsigned long pclk) +{ + clk_upll.rate = s3c24xx_get_pll(__raw_readl(S3C2410_UPLLCON), + clk_xtal.rate); + + clk_mpll.rate = fclk; + clk_h.rate = hclk; + clk_p.rate = pclk; + clk_f.rate = fclk; +} |