aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s5pv210/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pv210/common.c')
-rw-r--r--arch/arm/mach-s5pv210/common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 7024dcd0e40a..2e2202ac7173 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -25,6 +25,7 @@
#include <linux/dma-mapping.h>
#include <linux/serial_core.h>
#include <linux/serial_s3c.h>
+#include <linux/of.h>
#include <asm/proc-fns.h>
#include <asm/mach/arch.h>
@@ -35,7 +36,13 @@
#include <mach/regs-clock.h>
#include <plat/cpu.h>
+
+#ifdef CONFIG_S5P_CLOCK
#include <plat/clock.h>
+#else
+#include <linux/clk-provider.h>
+#endif
+
#include <plat/devs.h>
#include <plat/sdhci.h>
#include <plat/adc-core.h>
@@ -50,6 +57,9 @@
#include "common.h"
+/* External clock frequency */
+static unsigned long xusbxti_f;
+
static const char name_s5pv210[] = "S5PV210/S5PC110";
static struct cpu_table cpu_ids[] __initdata = {
@@ -229,18 +239,24 @@ void __init s5pv210_map_io(void)
void __init s5pv210_init_clocks(int xtal)
{
+#ifdef CONFIG_S5P_CLOCK
printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
s3c24xx_register_baseclocks(xtal);
s5p_register_clocks(xtal);
s5pv210_register_clocks();
s5pv210_setup_clocks();
+#else
+ xusbxti_f = xtal;
+#endif
}
void __init s5pv210_init_irq(void)
{
u32 vic[4]; /* S5PV210 supports 4 VIC */
+ s5pv210_clk_init(0, xusbxti_f, S3C_VA_SYS);
+
/* All the VICs are fully populated. */
vic[0] = ~0;
vic[1] = ~0;