aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm644x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 0755d466221a..cd0c8b1e1ecf 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -701,7 +701,7 @@ static struct resource dm644x_venc_resources[] = {
701#define DM644X_VPSS_DACCLKEN BIT(4) 701#define DM644X_VPSS_DACCLKEN BIT(4)
702 702
703static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, 703static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
704 unsigned int mode) 704 unsigned int pclock)
705{ 705{
706 int ret = 0; 706 int ret = 0;
707 u32 v = DM644X_VPSS_VENCLKEN; 707 u32 v = DM644X_VPSS_VENCLKEN;
@@ -711,27 +711,18 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
711 v |= DM644X_VPSS_DACCLKEN; 711 v |= DM644X_VPSS_DACCLKEN;
712 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); 712 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
713 break; 713 break;
714 case VPBE_ENC_DV_PRESET: 714 case VPBE_ENC_CUSTOM_TIMINGS:
715 switch (mode) { 715 if (pclock <= 27000000) {
716 case V4L2_DV_480P59_94:
717 case V4L2_DV_576P50:
718 v |= DM644X_VPSS_MUXSEL_PLL2_MODE | 716 v |= DM644X_VPSS_MUXSEL_PLL2_MODE |
719 DM644X_VPSS_DACCLKEN; 717 DM644X_VPSS_DACCLKEN;
720 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); 718 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
721 break; 719 } else {
722 case V4L2_DV_720P60:
723 case V4L2_DV_1080I60:
724 case V4L2_DV_1080P30:
725 /* 720 /*
726 * For HD, use external clock source since 721 * For HD, use external clock source since
727 * HD requires higher clock rate 722 * HD requires higher clock rate
728 */ 723 */
729 v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE; 724 v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE;
730 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); 725 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
731 break;
732 default:
733 ret = -EINVAL;
734 break;
735 } 726 }
736 break; 727 break;
737 default: 728 default: