aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm355.c
diff options
context:
space:
mode:
authorMuralidharan Karicheri <m-karicheri2@ti.com>2009-09-16 12:02:50 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-09-16 13:25:45 -0400
commit51e68e27d310034332b67a6762914af9589b3db5 (patch)
treec59651f3b5a1509ff6217ea3b9fbf6e27316c687 /arch/arm/mach-davinci/dm355.c
parentab8e8df87421574fe053bf1770353af5b24a2bbb (diff)
davinci: DM355 - platform changes for vpfe capture
DM355 platform and board setup This has platform and board setup changes to support vpfe capture driver for DM355 EVMs. Tested video capture on DM355 using tvp514x Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart@skynet.be> Reviewed-by: David Brownell <david-b@pacbell.net> Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com> Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm355.c')
-rw-r--r--arch/arm/mach-davinci/dm355.c83
1 files changed, 83 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 4f42169c029c..059670018aff 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -488,6 +488,14 @@ MUX_CFG(DM355, VOUT_FIELD_G70, 1, 18, 3, 0, false)
488MUX_CFG(DM355, VOUT_HVSYNC, 1, 16, 1, 0, false) 488MUX_CFG(DM355, VOUT_HVSYNC, 1, 16, 1, 0, false)
489MUX_CFG(DM355, VOUT_COUTL_EN, 1, 0, 0xff, 0x55, false) 489MUX_CFG(DM355, VOUT_COUTL_EN, 1, 0, 0xff, 0x55, false)
490MUX_CFG(DM355, VOUT_COUTH_EN, 1, 8, 0xff, 0x55, false) 490MUX_CFG(DM355, VOUT_COUTH_EN, 1, 8, 0xff, 0x55, false)
491
492MUX_CFG(DM355, VIN_PCLK, 0, 14, 1, 1, false)
493MUX_CFG(DM355, VIN_CAM_WEN, 0, 13, 1, 1, false)
494MUX_CFG(DM355, VIN_CAM_VD, 0, 12, 1, 1, false)
495MUX_CFG(DM355, VIN_CAM_HD, 0, 11, 1, 1, false)
496MUX_CFG(DM355, VIN_YIN_EN, 0, 10, 1, 1, false)
497MUX_CFG(DM355, VIN_CINL_EN, 0, 0, 0xff, 0x55, false)
498MUX_CFG(DM355, VIN_CINH_EN, 0, 8, 3, 3, false)
491#endif 499#endif
492}; 500};
493 501
@@ -659,6 +667,67 @@ static struct platform_device dm355_asp1_device = {
659 .resource = dm355_asp1_resources, 667 .resource = dm355_asp1_resources,
660}; 668};
661 669
670static struct resource dm355_vpss_resources[] = {
671 {
672 /* VPSS BL Base address */
673 .name = "vpss",
674 .start = 0x01c70800,
675 .end = 0x01c70800 + 0xff,
676 .flags = IORESOURCE_MEM,
677 },
678 {
679 /* VPSS CLK Base address */
680 .name = "vpss",
681 .start = 0x01c70000,
682 .end = 0x01c70000 + 0xf,
683 .flags = IORESOURCE_MEM,
684 },
685};
686
687static struct platform_device dm355_vpss_device = {
688 .name = "vpss",
689 .id = -1,
690 .dev.platform_data = "dm355_vpss",
691 .num_resources = ARRAY_SIZE(dm355_vpss_resources),
692 .resource = dm355_vpss_resources,
693};
694
695static struct resource vpfe_resources[] = {
696 {
697 .start = IRQ_VDINT0,
698 .end = IRQ_VDINT0,
699 .flags = IORESOURCE_IRQ,
700 },
701 {
702 .start = IRQ_VDINT1,
703 .end = IRQ_VDINT1,
704 .flags = IORESOURCE_IRQ,
705 },
706 /* CCDC Base address */
707 {
708 .flags = IORESOURCE_MEM,
709 .start = 0x01c70600,
710 .end = 0x01c70600 + 0x1ff,
711 },
712};
713
714static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
715static struct platform_device vpfe_capture_dev = {
716 .name = CAPTURE_DRV_NAME,
717 .id = -1,
718 .num_resources = ARRAY_SIZE(vpfe_resources),
719 .resource = vpfe_resources,
720 .dev = {
721 .dma_mask = &vpfe_capture_dma_mask,
722 .coherent_dma_mask = DMA_BIT_MASK(32),
723 },
724};
725
726void dm355_set_vpfe_config(struct vpfe_config *cfg)
727{
728 vpfe_capture_dev.dev.platform_data = cfg;
729}
730
662/*----------------------------------------------------------------------*/ 731/*----------------------------------------------------------------------*/
663 732
664static struct map_desc dm355_io_desc[] = { 733static struct map_desc dm355_io_desc[] = {
@@ -792,6 +861,20 @@ static int __init dm355_init_devices(void)
792 861
793 davinci_cfg_reg(DM355_INT_EDMA_CC); 862 davinci_cfg_reg(DM355_INT_EDMA_CC);
794 platform_device_register(&dm355_edma_device); 863 platform_device_register(&dm355_edma_device);
864 platform_device_register(&dm355_vpss_device);
865 /*
866 * setup Mux configuration for vpfe input and register
867 * vpfe capture platform device
868 */
869 davinci_cfg_reg(DM355_VIN_PCLK);
870 davinci_cfg_reg(DM355_VIN_CAM_WEN);
871 davinci_cfg_reg(DM355_VIN_CAM_VD);
872 davinci_cfg_reg(DM355_VIN_CAM_HD);
873 davinci_cfg_reg(DM355_VIN_YIN_EN);
874 davinci_cfg_reg(DM355_VIN_CINL_EN);
875 davinci_cfg_reg(DM355_VIN_CINH_EN);
876 platform_device_register(&vpfe_capture_dev);
877
795 return 0; 878 return 0;
796} 879}
797postcore_initcall(dm355_init_devices); 880postcore_initcall(dm355_init_devices);