25 #include <linux/module.h>
26 #include <linux/kernel.h>
27 #include <linux/list.h>
28 #include <linux/errno.h>
30 #include <linux/device.h>
36 #include <mach/hardware.h>
40 #include <mach/regs-clock.h>
42 #include <plat/clock.h>
45 static int s3c2440_setparent_armclk(
struct clk *
clk,
struct clk *parent)
47 unsigned long camdivn;
52 else if (parent == &clk_h)
53 dvs = S3C2440_CAMDIVN_DVSEN;
60 camdivn &= ~S3C2440_CAMDIVN_DVSEN;
71 .set_parent = s3c2440_setparent_armclk,
77 unsigned long camdivn =
__raw_readl(S3C2440_CAMDIVN);
78 unsigned long clkdivn;
79 struct clk *clock_upll;
82 printk(
"S3C244X: Clock Support, DVS %s\n",
83 (camdivn & S3C2440_CAMDIVN_DVSEN) ?
"on" :
"off");
85 clk_arm.
parent = (camdivn & S3C2440_CAMDIVN_DVSEN) ? &clk_h : &clk_f;
94 if (IS_ERR(clock_upll)) {
105 spin_lock(&clocks_lock);
108 clkdivn |= S3C2440_CLKDIVN_UCLK;
111 spin_unlock(&clocks_lock);
118 .name =
"s3c2440_clk",
120 .add_dev = s3c244x_clk_add,
123 static int s3c2440_clk_init(
void)
131 .name =
"s3c2442_clk",
133 .add_dev = s3c244x_clk_add,
136 static int s3c2442_clk_init(
void)