diff options
author | Werner Almesberger <werner@openmoko.org> | 2009-03-04 22:43:14 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-05-07 06:14:27 -0400 |
commit | e2c977dca2901012ddabdc2a7b3c47a80c94d431 (patch) | |
tree | dcd05f54c29e56a7c72fee0c286dc638664c898a | |
parent | a19339f430d8ba5fc2ca840ae95f8aa7c49ea9d7 (diff) |
[ARM] S3C6410: Add CAMIF clock
Add camera interface clock to S3C6410.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r-- | arch/arm/plat-s3c64xx/s3c6400-clock.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c index 05b17528041e..6dd187d04743 100644 --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c | |||
@@ -520,6 +520,33 @@ static struct clksrc_clk clk_irda = { | |||
520 | .reg_divider = S3C_CLK_DIV2, | 520 | .reg_divider = S3C_CLK_DIV2, |
521 | }; | 521 | }; |
522 | 522 | ||
523 | static struct clk *clkset_camif_list[] = { | ||
524 | &clk_h2, | ||
525 | }; | ||
526 | |||
527 | static struct clk_sources clkset_camif = { | ||
528 | .sources = clkset_camif_list, | ||
529 | .nr_sources = ARRAY_SIZE(clkset_camif_list), | ||
530 | }; | ||
531 | |||
532 | static struct clksrc_clk clk_camif = { | ||
533 | .clk = { | ||
534 | .name = "camera", | ||
535 | .id = -1, | ||
536 | .ctrlbit = S3C_CLKCON_SCLK_CAM, | ||
537 | .enable = s3c64xx_sclk_ctrl, | ||
538 | .set_parent = s3c64xx_setparent_clksrc, | ||
539 | .get_rate = s3c64xx_getrate_clksrc, | ||
540 | .set_rate = s3c64xx_setrate_clksrc, | ||
541 | .round_rate = s3c64xx_roundrate_clksrc, | ||
542 | }, | ||
543 | .shift = 0, | ||
544 | .mask = 0, | ||
545 | .sources = &clkset_camif, | ||
546 | .divider_shift = S3C6400_CLKDIV0_CAM_SHIFT, | ||
547 | .reg_divider = S3C_CLK_DIV0, | ||
548 | }; | ||
549 | |||
523 | /* Clock initialisation code */ | 550 | /* Clock initialisation code */ |
524 | 551 | ||
525 | static struct clksrc_clk *init_parents[] = { | 552 | static struct clksrc_clk *init_parents[] = { |
@@ -536,6 +563,7 @@ static struct clksrc_clk *init_parents[] = { | |||
536 | &clk_audio0, | 563 | &clk_audio0, |
537 | &clk_audio1, | 564 | &clk_audio1, |
538 | &clk_irda, | 565 | &clk_irda, |
566 | &clk_camif, | ||
539 | }; | 567 | }; |
540 | 568 | ||
541 | static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk) | 569 | static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk) |
@@ -635,6 +663,7 @@ static struct clk *clks[] __initdata = { | |||
635 | &clk_audio0.clk, | 663 | &clk_audio0.clk, |
636 | &clk_audio1.clk, | 664 | &clk_audio1.clk, |
637 | &clk_irda.clk, | 665 | &clk_irda.clk, |
666 | &clk_camif.clk, | ||
638 | }; | 667 | }; |
639 | 668 | ||
640 | void __init s3c6400_register_clocks(void) | 669 | void __init s3c6400_register_clocks(void) |