ARM: S3C24XX: move common clock init into common.c
From: Heiko Stuebner <heiko@...> Date: Thu, 3 May 2012 08:43:58 +0200
Commit-Message
Signed-off-by: Heiko Stuebner <heiko@...>
Patch-Comment
arch/arm/mach-s3c24xx/common.c | 18 ++++++++++++ arch/arm/plat-s3c24xx/Makefile | 1 - arch/arm/plat-s3c24xx/clock.c | 59 ---------------------------------------- 3 files changed, 18 insertions(+), 60 deletions(-) delete mode 100644 arch/arm/plat-s3c24xx/clock.c
Statistics
- 18 lines added
- 60 lines removed
Changes
------------------------ arch/arm/mach-s3c24xx/common.c ------------------------
index bf1cd36..bcc99e9 100644
@@ -42,6 +42,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>
#include <plat/regs-irqtype.h>
@@ -56,6 +57,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 */
@@ -949,3 +952,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;
+}
------------------------ arch/arm/plat-s3c24xx/Makefile ------------------------
index 937fc67..6472416 100644
@@ -12,7 +12,6 @@ obj- :=
# Core files
obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o
obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpu-freq.o
------------------------ arch/arm/plat-s3c24xx/clock.c -------------------------
deleted file mode 100644
index 931d26d..0000000
@@ -1,59 +0,0 @@