aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUK KIM <w0806.kim@samsung.com>2010-09-13 17:40:39 -0700
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:45:34 -0800
commit50ac1d2dc5750aef5df94cf641246aa44e475f75 (patch)
tree9dbe4398c5e67a23dd329fedbfd418a642f84c29
parent29b0d709e8b46184cc72fbe46a7c367f96ac241c (diff)
downloadkernel_samsung_crespo-50ac1d2dc5750aef5df94cf641246aa44e475f75.zip
kernel_samsung_crespo-50ac1d2dc5750aef5df94cf641246aa44e475f75.tar.gz
kernel_samsung_crespo-50ac1d2dc5750aef5df94cf641246aa44e475f75.tar.bz2
S5PC11X: SOUND: added clock source structure and enable function for codec's MCLK clock.
Signed-off-by: UK KIM <w0806.kim@samsung.com> Change-Id: I142fa3f572bd786b542f497f3af7b5bd008b6fa5
-rw-r--r--arch/arm/mach-s5pv210/clock.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index d7cee0c..840729e 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -34,6 +34,8 @@
static unsigned long xtal;
+static int s5pv210_usbosc_enable(struct clk *clk, int enable);
+
static struct clksrc_clk clk_mout_apll = {
.clk = {
.name = "mout_apll",
@@ -582,6 +584,11 @@ static struct clk init_clocks_off[] = {
.parent = &clk_hclk_dsys.clk,
.enable = s5pv210_clk_ip1_ctrl,
.ctrlbit = (1 << 8),
+ }, {
+ .name = "usb_osc",
+ .id = -1,
+ .enable = s5pv210_usbosc_enable,
+ .ctrlbit = (1 << 1),
},
};
@@ -1319,6 +1326,19 @@ static struct clksrc_clk *sysclks[] = {
&clk_dout_audio_bus_clk_i2s,
};
+static int s5pv210_usbosc_enable(struct clk *clk, int enable)
+{
+ unsigned int ctrlbit = clk->ctrlbit;
+ unsigned int usbosc_con = __raw_readl(S5P_SLEEP_CFG) & ~ctrlbit;
+
+ if (enable)
+ usbosc_con |= ctrlbit;
+
+ writel(usbosc_con, S5P_SLEEP_CFG);
+
+ return 0;
+}
+
static u32 epll_div[][6] = {
{ 48000000, 0, 48, 3, 3, 0 },
{ 96000000, 0, 48, 3, 2, 0 },