diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-10-01 10:39:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 13:27:18 -0400 |
commit | 368640827c0be2582d836cd74ae2cff03e6bfc02 (patch) | |
tree | 1012c886f4ce621b6d9284ffac81f3b79c3a95f7 /arch/arm | |
parent | 182b967e1119d22889e334c8f1c1b75df41f9165 (diff) |
[media] dm644x: replace the obsolete preset API by the timings API
This patch replaces the preset API by the timings API, and
appropriate changes in board file.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 17 |
2 files changed, 12 insertions, 20 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index d34ed55912b2..3baf56d0a84f 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/phy.h> | 23 | #include <linux/phy.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | #include <linux/v4l2-dv-timings.h> | ||
26 | #include <linux/export.h> | 27 | #include <linux/export.h> |
27 | 28 | ||
28 | #include <media/tvp514x.h> | 29 | #include <media/tvp514x.h> |
@@ -620,7 +621,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | |||
620 | { | 621 | { |
621 | .name = "ntsc", | 622 | .name = "ntsc", |
622 | .timings_type = VPBE_ENC_STD, | 623 | .timings_type = VPBE_ENC_STD, |
623 | .timings = {V4L2_STD_525_60}, | 624 | .std_id = V4L2_STD_525_60, |
624 | .interlaced = 1, | 625 | .interlaced = 1, |
625 | .xres = 720, | 626 | .xres = 720, |
626 | .yres = 480, | 627 | .yres = 480, |
@@ -632,7 +633,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | |||
632 | { | 633 | { |
633 | .name = "pal", | 634 | .name = "pal", |
634 | .timings_type = VPBE_ENC_STD, | 635 | .timings_type = VPBE_ENC_STD, |
635 | .timings = {V4L2_STD_625_50}, | 636 | .std_id = V4L2_STD_625_50, |
636 | .interlaced = 1, | 637 | .interlaced = 1, |
637 | .xres = 720, | 638 | .xres = 720, |
638 | .yres = 576, | 639 | .yres = 576, |
@@ -647,8 +648,8 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | |||
647 | static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { | 648 | static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { |
648 | { | 649 | { |
649 | .name = "480p59_94", | 650 | .name = "480p59_94", |
650 | .timings_type = VPBE_ENC_DV_PRESET, | 651 | .timings_type = VPBE_ENC_CUSTOM_TIMINGS, |
651 | .timings = {V4L2_DV_480P59_94}, | 652 | .dv_timings = V4L2_DV_BT_CEA_720X480P59_94, |
652 | .interlaced = 0, | 653 | .interlaced = 0, |
653 | .xres = 720, | 654 | .xres = 720, |
654 | .yres = 480, | 655 | .yres = 480, |
@@ -659,8 +660,8 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { | |||
659 | }, | 660 | }, |
660 | { | 661 | { |
661 | .name = "576p50", | 662 | .name = "576p50", |
662 | .timings_type = VPBE_ENC_DV_PRESET, | 663 | .timings_type = VPBE_ENC_CUSTOM_TIMINGS, |
663 | .timings = {V4L2_DV_576P50}, | 664 | .dv_timings = V4L2_DV_BT_CEA_720X576P50, |
664 | .interlaced = 0, | 665 | .interlaced = 0, |
665 | .xres = 720, | 666 | .xres = 720, |
666 | .yres = 576, | 667 | .yres = 576, |
@@ -698,7 +699,7 @@ static struct vpbe_output dm644xevm_vpbe_outputs[] = { | |||
698 | .index = 1, | 699 | .index = 1, |
699 | .name = "Component", | 700 | .name = "Component", |
700 | .type = V4L2_OUTPUT_TYPE_ANALOG, | 701 | .type = V4L2_OUTPUT_TYPE_ANALOG, |
701 | .capabilities = V4L2_OUT_CAP_PRESETS, | 702 | .capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS, |
702 | }, | 703 | }, |
703 | .subdev_name = VPBE_VENC_SUBDEV_NAME, | 704 | .subdev_name = VPBE_VENC_SUBDEV_NAME, |
704 | .default_mode = "480p59_94", | 705 | .default_mode = "480p59_94", |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index c8b866657fcb..79d2880c9d2d 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 | ||
703 | static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, | 703 | static 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: |