aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/clock.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-08-06 13:13:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-08-06 13:13:54 -0400
commit11e4afb49b7fa1fc8e1ffd850c1806dd86a08204 (patch)
tree9e57efcb106ae912f7bec718feb3f8ec607559bb /arch/arm/mach-s3c64xx/clock.c
parent162500b3a3ff39d941d29db49b41a16667ae44f0 (diff)
parent9b2a606d3898fcb2eedb6faded3bb37549590ac4 (diff)
Merge branches 'gemini' and 'misc' into devel
Diffstat (limited to 'arch/arm/mach-s3c64xx/clock.c')
-rw-r--r--arch/arm/mach-s3c64xx/clock.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index 2ac2e7d73e53..fbd85a9b7bbf 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -88,6 +88,12 @@ struct clk clk_48m = {
88 .enable = clk_48m_ctrl, 88 .enable = clk_48m_ctrl,
89}; 89};
90 90
91struct clk clk_xusbxti = {
92 .name = "xusbxti",
93 .id = -1,
94 .rate = 48000000,
95};
96
91static int inline s3c64xx_gate(void __iomem *reg, 97static int inline s3c64xx_gate(void __iomem *reg,
92 struct clk *clk, 98 struct clk *clk,
93 int enable) 99 int enable)
@@ -253,6 +259,12 @@ static struct clk init_clocks[] = {
253 .enable = s3c64xx_hclk_ctrl, 259 .enable = s3c64xx_hclk_ctrl,
254 .ctrlbit = S3C_CLKCON_HCLK_HSMMC2, 260 .ctrlbit = S3C_CLKCON_HCLK_HSMMC2,
255 }, { 261 }, {
262 .name = "otg",
263 .id = -1,
264 .parent = &clk_h,
265 .enable = s3c64xx_hclk_ctrl,
266 .ctrlbit = S3C_CLKCON_HCLK_USB,
267 }, {
256 .name = "timers", 268 .name = "timers",
257 .id = -1, 269 .id = -1,
258 .parent = &clk_p, 270 .parent = &clk_p,
@@ -518,6 +530,11 @@ static struct clk clk_iis_cd1 = {
518 .id = -1, 530 .id = -1,
519}; 531};
520 532
533static struct clk clk_iisv4_cd = {
534 .name = "iis_cdclk_v4",
535 .id = -1,
536};
537
521static struct clk clk_pcm_cd = { 538static struct clk clk_pcm_cd = {
522 .name = "pcm_cdclk", 539 .name = "pcm_cdclk",
523 .id = -1, 540 .id = -1,
@@ -549,6 +566,19 @@ static struct clksrc_sources clkset_audio1 = {
549 .nr_sources = ARRAY_SIZE(clkset_audio1_list), 566 .nr_sources = ARRAY_SIZE(clkset_audio1_list),
550}; 567};
551 568
569static struct clk *clkset_audio2_list[] = {
570 [0] = &clk_mout_epll.clk,
571 [1] = &clk_dout_mpll,
572 [2] = &clk_fin_epll,
573 [3] = &clk_iisv4_cd,
574 [4] = &clk_pcm_cd,
575};
576
577static struct clksrc_sources clkset_audio2 = {
578 .sources = clkset_audio2_list,
579 .nr_sources = ARRAY_SIZE(clkset_audio2_list),
580};
581
552static struct clk *clkset_camif_list[] = { 582static struct clk *clkset_camif_list[] = {
553 &clk_h2, 583 &clk_h2,
554}; 584};
@@ -652,6 +682,16 @@ static struct clksrc_clk clksrcs[] = {
652 .sources = &clkset_audio1, 682 .sources = &clkset_audio1,
653 }, { 683 }, {
654 .clk = { 684 .clk = {
685 .name = "audio-bus",
686 .id = -1, /* There's only one IISv4 port */
687 .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2,
688 .enable = s3c64xx_sclk_ctrl,
689 },
690 .reg_src = { .reg = S3C6410_CLK_SRC2, .shift = 0, .size = 3 },
691 .reg_div = { .reg = S3C_CLK_DIV2, .shift = 24, .size = 4 },
692 .sources = &clkset_audio2,
693 }, {
694 .clk = {
655 .name = "irda-bus", 695 .name = "irda-bus",
656 .id = 0, 696 .id = 0,
657 .ctrlbit = S3C_CLKCON_SCLK_IRDA, 697 .ctrlbit = S3C_CLKCON_SCLK_IRDA,
@@ -749,6 +789,7 @@ static struct clk *clks1[] __initdata = {
749 &clk_ext_xtal_mux, 789 &clk_ext_xtal_mux,
750 &clk_iis_cd0, 790 &clk_iis_cd0,
751 &clk_iis_cd1, 791 &clk_iis_cd1,
792 &clk_iisv4_cd,
752 &clk_pcm_cd, 793 &clk_pcm_cd,
753 &clk_mout_epll.clk, 794 &clk_mout_epll.clk,
754 &clk_mout_mpll.clk, 795 &clk_mout_mpll.clk,
@@ -762,6 +803,7 @@ static struct clk *clks[] __initdata = {
762 &clk_27m, 803 &clk_27m,
763 &clk_48m, 804 &clk_48m,
764 &clk_h2, 805 &clk_h2,
806 &clk_xusbxti,
765}; 807};
766 808
767/** 809/**