ARM: davinci:add support for dm644x vpbe display driver
v5 cover ARM: davinci:add support for dm644x vpbe display driver
Re-arrange definitions and remove unnecessary code so that we can have a common header for all davinci platforms. This will enable us to share defines and enable common routines to be used without polluting hardware.h.
This is consistent with Russel's pet peaves notes regarding non-pollution of include/mach.
Having this as the base, have a common system module base address (DAVINCI_SYSTEM_MODULE_BASE) and removing IO_ADDRESS macro,add support for dm644x VPBE display driver.
Manjunath Hadli (11):
davinci: vpif: remove obsolete header file inclusion
ARM: davinci: dm644x: remove the macros from the header to move to c
file
ARM: davinci: dm365: remove the macros from the header to move to c
file
ARM: davinci: dm646x: remove the macros from the header to move to c
file
ARM: davinci: create new common platform header for davinci
davinci: eliminate use of IO_ADDRESS() on sysmod
davinci: dm644x: Replace register base value with a defined macro
davinci: dm644x: change vpfe capture structure variables for
consistency
davinci: dm644x: move vpfe init from soc to board specific files
davinci: dm644x: add support for v4l2 video display
davinci: dm644x EVM: add support for VPBE display
arch/arm/mach-davinci/board-dm355-evm.c | 2 +- arch/arm/mach-davinci/board-dm355-leopard.c | 2 +- arch/arm/mach-davinci/board-dm365-evm.c | 2 +- arch/arm/mach-davinci/board-dm644x-evm.c | 133 ++++++++++++++++-- arch/arm/mach-davinci/board-dm646x-evm.c | 2 +- arch/arm/mach-davinci/board-neuros-osd2.c | 2 +- arch/arm/mach-davinci/board-sffsdr.c | 2 +- arch/arm/mach-davinci/davinci.h | 101 +++++++++++++ arch/arm/mach-davinci/devices.c | 25 ++-- arch/arm/mach-davinci/dm355.c | 3 +- arch/arm/mach-davinci/dm365.c | 19 +++- arch/arm/mach-davinci/dm644x.c | 186 ++++++++++++++++++++++--- arch/arm/mach-davinci/dm646x.c | 10 ++- arch/arm/mach-davinci/include/mach/dm355.h | 32 ----- arch/arm/mach-davinci/include/mach/dm365.h | 52 ------- arch/arm/mach-davinci/include/mach/dm644x.h | 47 ------ arch/arm/mach-davinci/include/mach/dm646x.h | 41 ------ arch/arm/mach-davinci/include/mach/hardware.h | 2 - drivers/media/video/davinci/vpif.h | 2 +- drivers/media/video/davinci/vpif_display.c | 2 - 20 files changed, 438 insertions(+), 229 deletions(-) create mode 100644 arch/arm/mach-davinci/davinci.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm355.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm365.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm644x.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm646x.h
PATCH v5 1/11 davinci: vpif: remove obsolete header file inclusion
remove inclusion of header files from vpif.h and vpif_dispaly.c and add appropriate header file for building.
--- drivers/media/video/davinci/vpif.h | 2 +- drivers/media/video/davinci/vpif_display.c | 2 -- 2 files changed, 1 insertions(+), 3 deletions(-)
drivers/media/video/davinci/vpif.h +1 -1
@@ -19,7 +19,7 @@#include <linux/io.h> #include <linux/videodev2.h> #include <mach/hardware.h> -#include <mach/dm646x.h> +#include <linux/i2c.h> #include <media/davinci/vpif_types.h> /* Maximum channel allowed */
drivers/media/video/davinci/vpif_display.c +0 -2
@@ -39,8 +39,6 @@#include <media/v4l2-ioctl.h> #include <media/v4l2-chip-ident.h> -#include <mach/dm646x.h> -#include "vpif_display.h" #include "vpif.h"
Signature · 1 line
1.6.2.4
PATCH v5 2/11 ARM: davinci: dm644x: remove the macros from the header to move to c file
In reply to Manjunath Hadlimove the register base addresses and offsets used only by dm644x platform file from platform header dm644x.h to dm644x.c as they are used only in the c file.
--- arch/arm/mach-davinci/dm644x.c | 7 +++++++ arch/arm/mach-davinci/include/mach/dm644x.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-davinci/dm644x.c +7 -0
@@ -35,6 +35,13 @@*/ #define DM644X_REF_FREQ 27000000 +#define DM644X_EMAC_BASE 0x01c80000 +#define DM644X_EMAC_MDIO_BASE (DM644X_EMAC_BASE + 0x4000) +#define DM644X_EMAC_CNTRL_OFFSET 0x0000 +#define DM644X_EMAC_CNTRL_MOD_OFFSET 0x1000 +#define DM644X_EMAC_CNTRL_RAM_OFFSET 0x2000 +#define DM644X_EMAC_CNTRL_RAM_SIZE 0x2000 +static struct pll_data pll1_data = { .num =1 , .phys_base =DAVINCI_PLL1_BASE ,
arch/arm/mach-davinci/include/mach/dm644x.h +0 -7
@@ -27,13 +27,6 @@#include <mach/asp.h> #include <media/davinci/vpfe_capture.h> -#define DM644X_EMAC_BASE (0x01C80000) -#define DM644X_EMAC_MDIO_BASE (DM644X_EMAC_BASE + 0x4000) -#define DM644X_EMAC_CNTRL_OFFSET (0x0000) -#define DM644X_EMAC_CNTRL_MOD_OFFSET (0x1000) -#define DM644X_EMAC_CNTRL_RAM_OFFSET (0x2000) -#define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) -#define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01E00000#define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000#define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
Signature · 1 line
1.6.2.4
PATCH v5 3/11 ARM: davinci: dm365: remove the macros from the header to move to c file
In reply to Manjunath Hadlimove the register base addresses and offsets used only by dm365 platform file from platform header dm365.h to dm365.c as they are used only in the c file.
--- arch/arm/mach-davinci/dm365.c | 16 ++++++++++++++++ arch/arm/mach-davinci/include/mach/dm365.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/mach-davinci/dm365.c +16 -0
@@ -40,6 +40,22 @@#define DM365_REF_FREQ 24000000/* 24 MHz on the DM365 EVM */ +/* Base of key scan register bank */ +#define DM365_KEYSCAN_BASE 0x01c69400 + +#define DM365_RTC_BASE 0x01c69000 + +#define DAVINCI_DM365_VC_BASE 0x01d0c000 +#define DAVINCI_DMA_VC_TX 2 +#define DAVINCI_DMA_VC_RX 3 + +#define DM365_EMAC_BASE 0x01d07000 +#define DM365_EMAC_MDIO_BASE (DM365_EMAC_BASE + 0x4000) +#define DM365_EMAC_CNTRL_OFFSET 0x0000 +#define DM365_EMAC_CNTRL_MOD_OFFSET 0x3000 +#define DM365_EMAC_CNTRL_RAM_OFFSET 0x1000 +#define DM365_EMAC_CNTRL_RAM_SIZE 0x2000 +static struct pll_data pll1_data = { .num =1 , .phys_base =DAVINCI_PLL1_BASE ,
arch/arm/mach-davinci/include/mach/dm365.h +0 -16
@@ -20,22 +20,6 @@#include <mach/keyscan.h> #include <media/davinci/vpfe_capture.h> -#define DM365_EMAC_BASE (0x01D07000) -#define DM365_EMAC_MDIO_BASE (DM365_EMAC_BASE + 0x4000) -#define DM365_EMAC_CNTRL_OFFSET (0x0000) -#define DM365_EMAC_CNTRL_MOD_OFFSET (0x3000) -#define DM365_EMAC_CNTRL_RAM_OFFSET (0x1000) -#define DM365_EMAC_CNTRL_RAM_SIZE (0x2000) - -/* Base of key scan register bank */ -#define DM365_KEYSCAN_BASE (0x01C69400) - -#define DM365_RTC_BASE (0x01C69000) - -#define DAVINCI_DM365_VC_BASE (0x01D0C000) -#define DAVINCI_DMA_VC_TX 2 -#define DAVINCI_DMA_VC_RX 3 -#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01D10000#define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000#define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
Signature · 1 line
1.6.2.4
PATCH v5 4/11 ARM: davinci: dm646x: remove the macros from the header to move to c file
In reply to Manjunath Hadlimove the register base addresses and offsets used only by dm646x platform file from platform header dm646x.h to dm646x.c as they are used only in the c file.
--- arch/arm/mach-davinci/dm646x.c | 7 +++++++ arch/arm/mach-davinci/include/mach/dm646x.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-davinci/dm646x.c +7 -0
@@ -46,6 +46,13 @@#define DM646X_REF_FREQ 27000000#define DM646X_AUX_FREQ 24000000 +#define DM646X_EMAC_BASE 0x01c80000 +#define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) +#define DM646X_EMAC_CNTRL_OFFSET 0x0000 +#define DM646X_EMAC_CNTRL_MOD_OFFSET 0x1000 +#define DM646X_EMAC_CNTRL_RAM_OFFSET 0x2000 +#define DM646X_EMAC_CNTRL_RAM_SIZE 0x2000 +static struct pll_data pll1_data = { .num =1 , .phys_base =DAVINCI_PLL1_BASE ,
arch/arm/mach-davinci/include/mach/dm646x.h +0 -7
@@ -18,13 +18,6 @@#include <linux/davinci_emac.h> #include <media/davinci/vpif_types.h> -#define DM646X_EMAC_BASE (0x01C80000) -#define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) -#define DM646X_EMAC_CNTRL_OFFSET (0x0000) -#define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) -#define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) -#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) -#define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
Signature · 1 line
1.6.2.4
PATCH v5 5/11 ARM: davinci: create new common platform header for davinci
In reply to Manjunath Hadliremove the code from individual platform header files for dm365, dm355, dm644x and dm646x and consolidate it into a single and common header file davinci.h.
This reduces the pollution in the include/mach and is consistent with Russel's suggestions as part of his "pet peaves" mail.
The further patches in the series take advantage of this consolidation for easy implementation of IO_ADDRESS elimination.
--- arch/arm/mach-davinci/board-dm355-evm.c | 2 +- arch/arm/mach-davinci/board-dm355-leopard.c | 2 +- arch/arm/mach-davinci/board-dm365-evm.c | 2 +- arch/arm/mach-davinci/board-dm644x-evm.c | 2 +- arch/arm/mach-davinci/board-dm646x-evm.c | 2 +- arch/arm/mach-davinci/board-neuros-osd2.c | 2 +- arch/arm/mach-davinci/board-sffsdr.c | 2 +- arch/arm/mach-davinci/davinci.h | 87 +++++++++++++++++++++++++++ arch/arm/mach-davinci/dm355.c | 2 +- arch/arm/mach-davinci/dm365.c | 2 +- arch/arm/mach-davinci/dm644x.c | 2 +- arch/arm/mach-davinci/dm646x.c | 2 +- arch/arm/mach-davinci/include/mach/dm355.h | 32 ---------- arch/arm/mach-davinci/include/mach/dm365.h | 36 ----------- arch/arm/mach-davinci/include/mach/dm644x.h | 40 ------------ arch/arm/mach-davinci/include/mach/dm646x.h | 34 ---------- 16 files changed, 98 insertions(+), 153 deletions(-) create mode 100644 arch/arm/mach-davinci/davinci.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm355.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm365.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm644x.h delete mode 100644 arch/arm/mach-davinci/include/mach/dm646x.h
arch/arm/mach-davinci/board-dm355-evm.c +1 -1
@@ -26,7 +26,7 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <mach/dm355.h> +#include "davinci.h" #include <mach/i2c.h> #include <mach/serial.h> #include <mach/nand.h>
arch/arm/mach-davinci/board-dm355-leopard.c +1 -1
@@ -23,7 +23,7 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <mach/dm355.h> +#include "davinci.h" #include <mach/i2c.h> #include <mach/serial.h> #include <mach/nand.h>
arch/arm/mach-davinci/board-dm365-evm.c +1 -1
@@ -32,7 +32,7 @@#include <asm/mach/arch.h> #include <mach/mux.h> -#include <mach/dm365.h> +#include "davinci.h" #include <mach/common.h> #include <mach/i2c.h> #include <mach/serial.h>
arch/arm/mach-davinci/board-dm644x-evm.c +1 -1
@@ -30,7 +30,7 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <mach/dm644x.h> +#include "davinci.h" #include <mach/common.h> #include <mach/i2c.h> #include <mach/serial.h>
arch/arm/mach-davinci/board-dm646x-evm.c +1 -1
@@ -36,7 +36,7 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <mach/dm646x.h> +#include "davinci.h" #include <mach/common.h> #include <mach/serial.h> #include <mach/i2c.h>
arch/arm/mach-davinci/board-neuros-osd2.c +1 -1
@@ -30,7 +30,7 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <mach/dm644x.h> +#include "davinci.h" #include <mach/common.h> #include <mach/i2c.h> #include <mach/serial.h>
arch/arm/mach-davinci/board-sffsdr.c +1 -1
@@ -35,7 +35,7 @@#include <asm/mach/arch.h> #include <asm/mach/flash.h> -#include <mach/dm644x.h> +#include "davinci.h" #include <mach/common.h> #include <mach/i2c.h> #include <mach/serial.h>
arch/arm/mach-davinci/davinci.h new file +87 -0
87 lines not on this page · raw message
arch/arm/mach-davinci/dm355.c +1 -1
@@ -18,7 +18,7 @@#include <asm/mach/map.h> -#include <mach/dm355.h> +#include "davinci.h" #include <mach/cputype.h> #include <mach/edma.h> #include <mach/psc.h>
arch/arm/mach-davinci/dm365.c +1 -1
@@ -21,7 +21,7 @@#include <asm/mach/map.h> -#include <mach/dm365.h> +#include "davinci.h" #include <mach/cputype.h> #include <mach/edma.h> #include <mach/psc.h>
arch/arm/mach-davinci/dm644x.c +1 -1
@@ -15,7 +15,7 @@#include <asm/mach/map.h> -#include <mach/dm644x.h> +#include "davinci.h" #include <mach/cputype.h> #include <mach/edma.h> #include <mach/irqs.h>
arch/arm/mach-davinci/dm646x.c +1 -1
@@ -16,7 +16,7 @@#include <asm/mach/map.h> -#include <mach/dm646x.h> +#include "davinci.h" #include <mach/cputype.h> #include <mach/edma.h> #include <mach/irqs.h>
arch/arm/mach-davinci/include/mach/dm355.h deleted +0 -32
@@ -1,32 +0,0 @@ -/* -* Chip specific defines for DM355 SoC -* -* Author: Kevin Hilman, Deep Root Systems, LLC -* -* 2007 (c) Deep Root Systems, LLC. This file is licensed under -* the terms of the GNU General Public License version 2. This program -* is licensed "as is" without any warranty of any kind, whether express -* or implied. -*/ -#ifndef __ASM_ARCH_DM355_H -#define __ASM_ARCH_DM355_H - -#include <mach/hardware.h> -#include <mach/asp.h> -#include <media/davinci/vpfe_capture.h> - -#define DM355_ASYNC_EMIF_CONTROL_BASE 0x01E10000 -#define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 - -#define ASP1_TX_EVT_EN 1 -#define ASP1_RX_EVT_EN 2 - -struct spi_board_info ; - -void __init dm355_init (void ); -void dm355_init_spi0 (unsigned chipselect_mask, -struct spi_board_info *info,unsigned len); -void __init dm355_init_asp1 (u32 evt_enable,struct snd_platform_data *pdata); -void dm355_set_vpfe_config (struct vpfe_config *cfg); - -#endif /* __ASM_ARCH_DM355_H */
arch/arm/mach-davinci/include/mach/dm365.h deleted +0 -36
@@ -1,36 +0,0 @@ -/* -* Copyright (C) 2009 Texas Instruments Incorporated -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation version 2. -* -* This program is distributed "as is" WITHOUT ANY WARRANTY of any -* kind, whether express or implied; without even the implied warranty -* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -*/ -#ifndef __ASM_ARCH_DM365_H -#define __ASM_ARCH_DM665_H - -#include <linux/platform_device.h> -#include <linux/davinci_emac.h> -#include <mach/hardware.h> -#include <mach/asp.h> -#include <mach/keyscan.h> -#include <media/davinci/vpfe_capture.h> - -#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01D10000 -#define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 -#define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000 - -void __init dm365_init (void ); -void __init dm365_init_asp (struct snd_platform_data *pdata); -void __init dm365_init_vc (struct snd_platform_data *pdata); -void __init dm365_init_ks (struct davinci_ks_platform_data *pdata); -void __init dm365_init_rtc (void ); -void dm365_init_spi0 (unsigned chipselect_mask, -struct spi_board_info *info,unsigned len); - -void dm365_set_vpfe_config (struct vpfe_config *cfg); -#endif /* __ASM_ARCH_DM365_H */
arch/arm/mach-davinci/include/mach/dm644x.h deleted +0 -40
@@ -1,40 +0,0 @@ -/* -* This file contains the processor specific definitions -* of the TI DM644x. -* -* Copyright (C) 2008 Texas Instruments. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -#ifndef __ASM_ARCH_DM644X_H -#define __ASM_ARCH_DM644X_H - -#include <linux/davinci_emac.h> -#include <mach/hardware.h> -#include <mach/asp.h> -#include <media/davinci/vpfe_capture.h> - -#define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01E00000 -#define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 -#define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000 -#define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000 -#define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000 - -void __init dm644x_init (void ); -void __init dm644x_init_asp (struct snd_platform_data *pdata); -void dm644x_set_vpfe_config (struct vpfe_config *cfg); - -#endif /* __ASM_ARCH_DM644X_H */
arch/arm/mach-davinci/include/mach/dm646x.h deleted +0 -34
@@ -1,34 +0,0 @@ -/* -* Chip specific defines for DM646x SoC -* -* Author: Kevin Hilman, Deep Root Systems, LLC -* -* 2007 (c) Deep Root Systems, LLC. This file is licensed under -* the terms of the GNU General Public License version 2. This program -* is licensed "as is" without any warranty of any kind, whether express -* or implied. -*/ -#ifndef __ASM_ARCH_DM646X_H -#define __ASM_ARCH_DM646X_H - -#include <mach/hardware.h> -#include <mach/asp.h> -#include <linux/i2c.h> -#include <linux/videodev2.h> -#include <linux/davinci_emac.h> -#include <media/davinci/vpif_types.h> - -#define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 -#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000 - -void __init dm646x_init (void ); -void __init dm646x_init_mcasp0 (struct snd_platform_data *pdata); -void __init dm646x_init_mcasp1 (struct snd_platform_data *pdata); -int __init dm646x_init_edma (struct edma_rsv_info *rsv); - -void dm646x_video_init (void ); - -void dm646x_setup_vpif (struct vpif_display_config *, -struct vpif_capture_config *); - -#endif /* __ASM_ARCH_DM646X_H */
Signature · 1 line
1.6.2.4
PATCH v5 6/11 davinci: eliminate use of IO_ADDRESS() on sysmod
In reply to Manjunath HadliCurrent devices.c file has a number of instances where IO_ADDRESS() is used for system module register access. Eliminate this in favor of a ioremap() based access.
--- arch/arm/mach-davinci/davinci.h | 9 +++++++++ arch/arm/mach-davinci/devices.c | 25 ++++++++++++++++--------- arch/arm/mach-davinci/dm355.c | 1 + arch/arm/mach-davinci/dm365.c | 1 + arch/arm/mach-davinci/dm644x.c | 1 + arch/arm/mach-davinci/dm646x.c | 1 + arch/arm/mach-davinci/include/mach/hardware.h | 2 -- 7 files changed, 29 insertions(+), 11 deletions(-)
arch/arm/mach-davinci/davinci.h +9 -0
@@ -20,12 +20,21 @@#include <linux/clk.h> #include <linux/i2c.h> #include <mach/keyscan.h> +#include <mach/hardware.h> #include <linux/videodev2.h> #include <linux/davinci_emac.h> #include <linux/platform_device.h> #include <media/davinci/vpfe_capture.h> #include <media/davinci/vpif_types.h> +#define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000 + +#ifndef __ASSEMBLER__ +extern void __iomem *davinci_sysmodbase; +#define DAVINCI_SYSMODULE_VIRT (x) (davinci_sysmodbase + (x)) +void davinci_map_sysmod (void ); +#endif +/* DM355 base addresses */ #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000#define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
arch/arm/mach-davinci/devices.c +16 -9
@@ -22,6 +22,7 @@#include <mach/edma.h> #include <mach/mmc.h> #include <mach/time.h> +#include "davinci.h" #include "clock.h"
@@ -36,6 +37,14 @@/* System control register offsets */ #define DM64XX_VDD3P3V_PWDN 0x48 +void __iomem *davinci_sysmodbase; + +void davinci_map_sysmod (void ) +{ + davinci_sysmodbase =ioremap_nocache (DAVINCI_SYSTEM_MODULE_BASE ,0x800 ); +WARN_ON (!davinci_sysmodbase); +} +static struct resource i2c_resources[] = { { .start =DAVINCI_I2C_BASE ,
@@ -212,12 +221,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)davinci_cfg_reg (DM355_SD1_DATA2 );davinci_cfg_reg (DM355_SD1_DATA3 ); }else if (cpu_is_davinci_dm365 ()) { -void __iomem *pupdctl1 = -IO_ADDRESS (DAVINCI_SYSTEM_MODULE_BASE +0x7c ); -/* Configure pull down control */ -__raw_writel ((__raw_readl (pupdctl1) & ~0xfc0 ), - pupdctl1); +void __iomem *pupdctl1 =DAVINCI_SYSMODULE_VIRT (0x7c ); +unsigned v; + + v =__raw_readl (pupdctl1); +__raw_writel (v & ~0xfc0 , pupdctl1); mmcsd1_resources[0 ].start =DM365_MMCSD1_BASE ; mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
@@ -246,11 +255,9 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config) mmcsd0_resources[2 ].start =IRQ_DM365_SDIOINT0 ; }else if (cpu_is_davinci_dm644x ()) {/* REVISIT: should this be in board-init code? */ -void __iomem *base = -IO_ADDRESS (DAVINCI_SYSTEM_MODULE_BASE ); -/* Power-on 3.3V IO cells */ -__raw_writel (0 , base +DM64XX_VDD3P3V_PWDN ); +__raw_writel (0 , +DAVINCI_SYSMODULE_VIRT (DM64XX_VDD3P3V_PWDN ));/*Set up the pull regiter for MMC */ davinci_cfg_reg (DM644X_MSTK ); }
arch/arm/mach-davinci/dm355.c +1 -0
@@ -872,6 +872,7 @@ void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata)void __init dm355_init (void ) {davinci_common_init (&davinci_soc_info_dm355); +davinci_map_sysmod (); }static int __init dm355_init_devices (void )
arch/arm/mach-davinci/dm365.c +1 -0
@@ -1139,6 +1139,7 @@ void __init dm365_init_rtc(void)void __init dm365_init (void ) {davinci_common_init (&davinci_soc_info_dm365); +davinci_map_sysmod (); }static struct resource dm365_vpss_resources[] = {
arch/arm/mach-davinci/dm644x.c +1 -0
@@ -787,6 +787,7 @@ void __init dm644x_init_asp(struct snd_platform_data *pdata)void __init dm644x_init (void ) {davinci_common_init (&davinci_soc_info_dm644x); +davinci_map_sysmod (); }static int __init dm644x_init_devices (void )
arch/arm/mach-davinci/dm646x.c +1 -0
@@ -914,6 +914,7 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv)void __init dm646x_init (void ) {davinci_common_init (&davinci_soc_info_dm646x); +davinci_map_sysmod (); }static int __init dm646x_init_devices (void )
arch/arm/mach-davinci/include/mach/hardware.h +0 -2
@@ -19,8 +19,6 @@* and the chip/board init code should then explicitly include * <chipname>.h */ -#define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000 -/* * I/O mapping */
Signature · 1 line
1.6.2.4
PATCH v5 7/11 davinci: dm644x: Replace register base value with a defined macro
In reply to Manjunath HadliReplace hard coded value of vpss register base to a define macro DM644X_VPSS_REG_BASE for proper readability
--- arch/arm/mach-davinci/dm644x.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
arch/arm/mach-davinci/dm644x.c +5 -3
@@ -594,13 +594,15 @@ static struct platform_device dm644x_asp_device = { .resource = dm644x_asp_resources, }; +#define DM644X_VPSS_REG_BASE 0x01c73400 +static struct resource dm644x_vpss_resources[] = { {/* VPSS Base address */ .name ="vpss" , - .start =0x01c73400 , - .end =0x01c73400 +0xff , - .flags =IORESOURCE_MEM , + .start =DM644X_VPSS_REG_BASE , + .end =DM644X_VPSS_REG_BASE +0xff , + .flags =IORESOURCE_MEM , }, };
Signature · 1 line
1.6.2.4
PATCH v5 7/11 davinci: dm644x: Replace register base value with a defined macro
Hello.
Quoted 14 lines · Manjunath Hadli
Replace hard coded value of vpss register base to a define macro
DM644X_VPSS_REG_BASEfor proper readabilitySigned-off-by Manjunath Hadli<[email protected]>Acked-by Sekhar Nori<[email protected]>--- arch/arm/mach-davinci/dm644x.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)arch/arm/mach-davinci/dm644x.c +0
-0
arch/arm/mach-davinci/dm644x.c static struct platform_device dm644x_asp_device = { · line 598
Quoted 5 lines
arch/arm/mach-davinci/dm644x.c +2
-0@@ -594,13 +594,15 @@ static struct platform_device dm644x_asp_device = { .resource = dm644x_asp_resources, }; +#define DM644X_VPSS_REG_BASE 0x01c73400 +
Why not simply DM644X_VPSS_BASE, like all the other #define's?
WBR, Sergei
PATCH v5 7/11 davinci: dm644x: Replace register base value with a defined macro
Sergei,
Quoted 21 lines · Sergei Shtylyov
Hello.
Quoted 17 lines · Manjunath Hadli
Replace hard coded value of vpss register base to a define macro
DM644X_VPSS_REG_BASEfor proper readabilitySigned-off-by Manjunath Hadli<[email protected]>Acked-by Sekhar Nori<[email protected]>--- arch/arm/mach-davinci/dm644x.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-davinci/dm644x.cindex 6b1d473..3802b59 100644arch/arm/mach-davinci/dm644x.c +0
-0@@ -594,13 +594,15 @@ static struct platform_device dm644x_asp_device = { .resource = dm644x_asp_resources, };
Quoted 4 lines
arch/arm/mach-davinci/dm644x.c static struct platform_device dm644x_asp_device = { · line 598
Quoted 2 lines
arch/arm/mach-davinci/dm644x.c +2
-0+#define DM644X_VPSS_REG_BASE 0x01c73400 +Why not simply
DM644X_VPSS_BASE, like all the other #define's?
There are #defines with _REG also like DAVINCI_DM646X_MCASP0_REG_BASE. But in the spirit of keeping it same for this file, I will change it.
Quoted 3 lines
WBR, Sergei
Thx,
-Manju
PATCH v5 8/11 davinci: dm644x: change vpfe capture structure variables for consistency
In reply to Manjunath HadliAdd SoC and board prefixes to variable names so that it is consistent with the rest of the file.
--- arch/arm/mach-davinci/board-dm644x-evm.c | 24 ++++++++++++------------ arch/arm/mach-davinci/dm644x.c | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-)
arch/arm/mach-davinci/board-dm644x-evm.c +12 -12
@@ -189,7 +189,7 @@ static struct platform_device davinci_fb_device = { .num_resources = 0, }; -static struct tvp514x_platform_data tvp5146_pdata = { +static struct tvp514x_platform_data dm644xevm_tvp5146_pdata = { .clk_polarity =0 , .hs_polarity =1 , .vs_polarity =1
@@ -197,7 +197,7 @@ static struct tvp514x_platform_data tvp5146_pdata = {#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)/* Inputs available at the TVP5146 */ -static struct v4l2_input tvp5146_inputs[] = { +static struct v4l2_input dm644xevm_tvp5146_inputs[] = { { .index =0 , .name ="Composite" ,
@@ -217,7 +217,7 @@ static struct v4l2_input tvp5146_inputs[] = {* ouput that goes to vpfe. There is a one to one correspondence * with tvp5146_inputs */ -static struct vpfe_route tvp5146_routes[] = { +static struct vpfe_route dm644xevm_tvp5146_routes[] = { { .input =INPUT_CVBS_VI2B , .output =OUTPUT_10BIT_422_EMBEDDED_SYNC ,
@@ -228,13 +228,13 @@ static struct vpfe_route tvp5146_routes[] = { }, }; -static struct vpfe_subdev_info vpfe_sub_devs[] = { +static struct vpfe_subdev_info dm644xevm_vpfe_sub_devs[] = { { .name ="tvp5146" , .grp_id =0 , - .num_inputs =ARRAY_SIZE (tvp5146_inputs), - .inputs = tvp5146_inputs, - .routes = tvp5146_routes, + .num_inputs =ARRAY_SIZE (dm644xevm_tvp5146_inputs), + .inputs = dm644xevm_tvp5146_inputs, + .routes = dm644xevm_tvp5146_routes, .can_route =1 , .ccdc_if_params = { .if_type =VPFE_BT656 ,
@@ -243,15 +243,15 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = { }, .board_info = { I2C_BOARD_INFO("tvp5146", 0x5d), - .platform_data = &tvp5146_pdata, + .platform_data = &dm644xevm_tvp5146_pdata, }, }, }; -static struct vpfe_config vpfe_cfg = { - .num_subdevs =ARRAY_SIZE (vpfe_sub_devs), +static struct vpfe_config dm644xevm_capture_cfg = { + .num_subdevs =ARRAY_SIZE (dm644xevm_vpfe_sub_devs), .i2c_adapter_id =1 , - .sub_devs = vpfe_sub_devs, + .sub_devs = dm644xevm_vpfe_sub_devs, .card_name ="DM6446 EVM" , .ccdc ="DM6446 CCDC" , };
@@ -625,7 +625,7 @@ static void __initdavinci_evm_map_io (void) {/* setup input configuration for VPFE input devices */ -dm644x_set_vpfe_config (&vpfe_cfg); +dm644x_set_vpfe_config (&dm644xevm_capture_cfg);dm644x_init (); }
arch/arm/mach-davinci/dm644x.c +6 -6
@@ -614,7 +614,7 @@ static struct platform_device dm644x_vpss_device = { .resource = dm644x_vpss_resources, }; -static struct resource vpfe_resources[] = { +static struct resource dm644x_vpfe_resources[] = { { .start =IRQ_VDINT0 , .end =IRQ_VDINT0 ,
@@ -648,11 +648,11 @@ static struct platform_device dm644x_ccdc_dev = { }, }; -static struct platform_device vpfe_capture_dev = { +static struct platform_device dm644x_vpfe_dev = { .name =CAPTURE_DRV_NAME , .id =-1 , - .num_resources =ARRAY_SIZE (vpfe_resources), - .resource = vpfe_resources, + .num_resources =ARRAY_SIZE (dm644x_vpfe_resources), + .resource = dm644x_vpfe_resources, .dev = { .dma_mask = &vpfe_capture_dma_mask, .coherent_dma_mask =DMA_BIT_MASK (32 ),
@@ -661,7 +661,7 @@ static struct platform_device vpfe_capture_dev = {void dm644x_set_vpfe_config (struct vpfe_config *cfg) { - vpfe_capture_dev.dev.platform_data = cfg; + dm644x_vpfe_dev.dev.platform_data = cfg; }/*----------------------------------------------------------------------*/
@@ -809,7 +809,7 @@ static int __init dm644x_init_devices(void)platform_device_register (&dm644x_vpss_device);platform_device_register (&dm644x_ccdc_dev); -platform_device_register (&vpfe_capture_dev); +platform_device_register (&dm644x_vpfe_dev);return 0 ; }
Signature · 1 line
1.6.2.4
PATCH v5 9/11 davinci: dm644x: move vpfe init from soc to board specific files
In reply to Manjunath HadliMove all vpfe platform device registrations to the board specific file like the rest of the devices, and have all of them together.
This would remove the restriction of inclusion and registration of vpfe platform devices for non-vpfe boards.
--- arch/arm/mach-davinci/board-dm644x-evm.c | 3 +-- arch/arm/mach-davinci/davinci.h | 2 +- arch/arm/mach-davinci/dm644x.c | 29 +++++++++++++++++------------ 3 files changed, 19 insertions(+), 15 deletions(-)
arch/arm/mach-davinci/board-dm644x-evm.c +1 -2
@@ -624,8 +624,6 @@ static struct davinci_uart_config uart_config __initdata = {static void __init davinci_evm_map_io (void ) { -/* setup input configuration for VPFE input devices */ -dm644x_set_vpfe_config (&dm644xevm_capture_cfg);dm644x_init (); }
@@ -697,6 +695,7 @@ static __init void davinci_evm_init(void)evm_init_i2c ();davinci_setup_mmc (0 , &dm6446evm_mmc_config); +dm644x_init_video (&dm644xevm_capture_cfg);davinci_serial_init (&uart_config);dm644x_init_asp (&dm644x_evm_snd_data);
arch/arm/mach-davinci/davinci.h +1 -1
@@ -81,7 +81,7 @@ void dm365_set_vpfe_config(struct vpfe_config *cfg);/* DM644x function declarations */ void __init dm644x_init (void );void __init dm644x_init_asp (struct snd_platform_data *pdata); -void dm644x_set_vpfe_config (struct vpfe_config *cfg); +int __init dm644x_init_video (struct vpfe_config *);/* DM646x function declarations */ void __init dm646x_init (void );
arch/arm/mach-davinci/dm644x.c +17 -12
@@ -659,11 +659,6 @@ static struct platform_device dm644x_vpfe_dev = { }, }; -void dm644x_set_vpfe_config (struct vpfe_config *cfg) -{ - dm644x_vpfe_dev.dev.platform_data = cfg; -} -/*----------------------------------------------------------------------*/ static struct map_desc dm644x_io_desc[] = {
@@ -792,14 +787,28 @@ void __init dm644x_init(void)davinci_map_sysmod (); } +static struct platform_device *dm644x_video_devices[]__initdata = { + &dm644x_vpss_device, + &dm644x_ccdc_dev, + &dm644x_vpfe_dev, +}; + +int __init dm644x_init_video (struct vpfe_config *vpfe_cfg) +{ + dm644x_vpfe_dev.dev.platform_data = vpfe_cfg; +/* Add ccdc clock aliases */ +clk_add_alias ("master" , dm644x_ccdc_dev.name,"vpss_master" ,NULL ); +clk_add_alias ("slave" , dm644x_ccdc_dev.name,"vpss_slave" ,NULL ); +platform_add_devices (dm644x_video_devices, +ARRAY_SIZE (dm644x_video_devices)); +return 0 ; +} +static int __init dm644x_init_devices (void ) {if (!cpu_is_davinci_dm644x ())return 0 ; -/* Add ccdc clock aliases */ -clk_add_alias ("master" , dm644x_ccdc_dev.name,"vpss_master" ,NULL ); -clk_add_alias ("slave" , dm644x_ccdc_dev.name,"vpss_slave" ,NULL );platform_device_register (&dm644x_edma_device);platform_device_register (&dm644x_mdio_device);
@@ -807,10 +816,6 @@ static int __init dm644x_init_devices(void)clk_add_alias (NULL ,dev_name (&dm644x_mdio_device.dev),NULL , &dm644x_emac_device.dev); -platform_device_register (&dm644x_vpss_device); -platform_device_register (&dm644x_ccdc_dev); -platform_device_register (&dm644x_vpfe_dev); -return 0 ; }postcore_initcall (dm644x_init_devices);
Signature · 1 line
1.6.2.4
PATCH v5 10/11 davinci: dm644x: add support for v4l2 video display
In reply to Manjunath HadliCreate platform devices for various video modules like venc,osd, vpbe and v4l2 driver for dm644x. Change the dm644x_init_video to make room for display config, and register the vpfe or vpbe devices based on the config pointer validity to make sure boards without vpfe or vpbe can be built with minimal changes.
--- arch/arm/mach-davinci/board-dm644x-evm.c | 2 +- arch/arm/mach-davinci/davinci.h | 7 +- arch/arm/mach-davinci/dm644x.c | 163 +++++++++++++++++++++++++++--- 3 files changed, 154 insertions(+), 18 deletions(-)
arch/arm/mach-davinci/board-dm644x-evm.c +1 -1
@@ -695,7 +695,7 @@ static __init void davinci_evm_init(void)evm_init_i2c ();davinci_setup_mmc (0 , &dm6446evm_mmc_config); -dm644x_init_video (&dm644xevm_capture_cfg); +dm644x_init_video (&dm644xevm_capture_cfg,NULL );davinci_serial_init (&uart_config);dm644x_init_asp (&dm644x_evm_snd_data);
arch/arm/mach-davinci/davinci.h +6 -1
@@ -26,6 +26,11 @@#include <linux/platform_device.h> #include <media/davinci/vpfe_capture.h> #include <media/davinci/vpif_types.h> +#include <media/davinci/vpss.h> +#include <media/davinci/vpbe_types.h> +#include <media/davinci/vpbe_venc.h> +#include <media/davinci/vpbe.h> +#include <media/davinci/vpbe_osd.h> #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
@@ -81,7 +86,7 @@ void dm365_set_vpfe_config(struct vpfe_config *cfg);/* DM644x function declarations */ void __init dm644x_init (void );void __init dm644x_init_asp (struct snd_platform_data *pdata); -int __init dm644x_init_video (struct vpfe_config *); +int __init dm644x_init_video (struct vpfe_config *,struct vpbe_config *);/* DM646x function declarations */ void __init dm646x_init (void );
arch/arm/mach-davinci/dm644x.c +147 -16
188 lines not on this page · raw message
Signature · 1 line
1.6.2.4
PATCH v5 10/11 davinci: dm644x: add support for v4l2 video display
Hello.
Quoted 7 lines · Manjunath Hadli
Create platform devices for various video modules like venc,osd, vpbe and v4l2 driver for dm644x. Change the
dm644x_init_videoto make room for display config, and register the vpfe or vpbe devices based on the config pointer validity to make sure boards without vpfe or vpbe can be built with minimal changes.Signed-off-by Manjunath Hadli<[email protected]>
[...]
Quoted 4 lines
arch/arm/mach-davinci/dm644x.c +0
-0
[...]
Quoted 1 line
arch/arm/mach-davinci/dm644x.c +0
-0@@ -654,7 +654,127 @@ static struct platform_device dm644x_vpfe_dev = {
[...]
Quoted 1 line
+#define
DM644X_OSD_REG_BASE0x01c72600
[...]
Quoted 1 line
+#define
DM644X_VENC_REG_BASE0x01c72400
Why not without _REG, like all the other #define's?
arch/arm/mach-davinci/dm644x.c static struct platform_device dm644x_vpfe_dev = { · line 704
Quoted 7 lines
arch/arm/mach-davinci/dm644x.c +7
-0+static int dm644x_venc_setup_clock (enum vpbe_enc_timings_type type, +unsigned int mode) +{ +int ret =0 ; +void __iomem *vpss_clkctl_reg; + + vpss_clkctl_reg =DAVINCI_SYSMODULE_VIRT (0x44 );
Why not in the initializer?
arch/arm/mach-davinci/dm644x.c static struct platform_device dm644x_vpfe_dev = { · line 711
Quoted 6 lines
arch/arm/mach-davinci/dm644x.c +6
-0+switch (type) { +case VPBE_ENC_STD : +writel (0x18 , vpss_clkctl_reg); +break ; +case VPBE_ENC_DV_PRESET : +switch ((unsigned int )mode) {
'mode' is already 'unsigned int'.
WBR, Sergei
PATCH v5 10/11 davinci: dm644x: add support for v4l2 video display
Sergei,
Quoted 18 lines · Sergei Shtylyov
Hello.
Quoted 7 lines · Manjunath Hadli
Create platform devices for various video modules like venc,osd, vpbe and v4l2 driver for dm644x. Change the
dm644x_init_videoto make room for display config, and register the vpfe or vpbe devices based on the config pointer validity to make sure boards without vpfe or vpbe can be built with minimal changes.Signed-off-by Manjunath Hadli<[email protected]>[...]
Quoted 4 lines
(quoted diff) +0
-0
b/arch/arm/mach-davinci/dm644x.cindex 6c034fd..2e408d8 100644arch/arm/mach-davinci/dm644x.c +0
-0[...]
Quoted 8 lines
Quoted 2 lines
arch/arm/mach-davinci/dm644x.c +0
-0@@ -654,7 +654,127 @@ static struct platform_device dm644x_vpfe_dev = {[...]
Quoted 1 line
+#define
DM644X_OSD_REG_BASE0x01c72600[...]
Quoted 1 line
+#define
DM644X_VENC_REG_BASE0x01c72400Why not without
_REG, like all the other #define's?
Ok.
Quoted 10 lines
arch/arm/mach-davinci/dm644x.c static struct platform_device dm644x_vpfe_dev = { · line 704
Quoted 8 lines
arch/arm/mach-davinci/dm644x.c +7
-0+static int dm644x_venc_setup_clock (enum vpbe_enc_timings_type type, +unsigned int mode) +{ +int ret =0 ; +void __iomem *vpss_clkctl_reg; + + vpss_clkctl_reg =DAVINCI_SYSMODULE_VIRT (0x44 );Why not in the initializer?
Because it is used only for clock control. I think it is fine here.
Quoted 9 lines
arch/arm/mach-davinci/dm644x.c static struct platform_device dm644x_vpfe_dev = { · line 711
Quoted 7 lines
arch/arm/mach-davinci/dm644x.c +6
-0+switch (type) { +case VPBE_ENC_STD : +writel (0x18 , vpss_clkctl_reg); +break ; +case VPBE_ENC_DV_PRESET : +switch ((unsigned int )mode) {'mode' is already 'unsigned int'.
Ok.
Thx,
-Manju
Quoted 4 lines
WBR, Sergei
PATCH v5 11/11 davinci: dm644x EVM: add support for VPBE display
In reply to Manjunath HadliThis patch adds support for V4L2 video display to DM6446 EVM. Support for SD and ED modes is provided, along with Composite and Component outputs.Also added vpbe_config as a parameter for dm644x_init_video to allow for registration of vpbe platform devices.
--- arch/arm/mach-davinci/board-dm644x-evm.c | 108 +++++++++++++++++++++++++++++- 1 files changed, 107 insertions(+), 1 deletions(-)
arch/arm/mach-davinci/board-dm644x-evm.c +107 -1
@@ -612,6 +612,112 @@ static void __init evm_init_i2c(void)i2c_register_board_info (1 , i2c_info,ARRAY_SIZE (i2c_info)); } +#define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) + +/* venc standard timings */ +static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { + { + .name ="ntsc" , + .timings_type =VPBE_ENC_STD , + .timings = {V4L2_STD_525_60 }, + .interlaced =1 , + .xres =720 , + .yres =480 , + .aspect = {11 ,10 }, + .fps = {30000 ,1001 }, + .left_margin =0x79 , + .upper_margin =0x10 , + }, + { + .name ="pal" , + .timings_type =VPBE_ENC_STD , + .timings = {V4L2_STD_625_50 }, + .interlaced =1 , + .xres =720 , + .yres =576 , + .aspect = {54 ,59 }, + .fps = {25 ,1 }, + .left_margin =0x7e , + .upper_margin =0x16 , + }, +}; + +/* venc dv preset timings */ +static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { + { + .name ="480p59_94" , + .timings_type =VPBE_ENC_DV_PRESET , + .timings = {V4L2_DV_480P59_94 }, + .interlaced =0 , + .xres =720 , + .yres =480 , + .aspect = {1 ,1 }, + .fps = {5994 ,100 }, + .left_margin =0x80 , + .upper_margin =0x20 , + }, + { + .name ="576p50" , + .timings_type =VPBE_ENC_DV_PRESET , + .timings = {V4L2_DV_576P50 }, + .interlaced =0 , + .xres =720 , + .yres =576 , + .aspect = {1 ,1 }, + .fps = {50 ,1 }, + .left_margin =0x7e , + .upper_margin =0x30 , + }, +}; + +/* +* The outputs available from VPBE + encoders. Keep the order same +* as that of encoders. First those from venc followed by that from +* encoders. Index in the output refers to index on a particular encoder. +* Driver uses this index to pass it to encoder when it supports more than +* one output. Application uses index of the array to set an output. +*/ +static struct vpbe_output dm644xevm_vpbe_outputs[] = { + { + .output = { + .index =0 , + .name ="Composite" , + .type =V4L2_OUTPUT_TYPE_ANALOG , + .std =VENC_STD_ALL , + .capabilities =V4L2_OUT_CAP_STD , + }, + .subdev_name =VPBE_VENC_SUBDEV_NAME , + .default_mode ="ntsc" , + .num_modes =ARRAY_SIZE (dm644xevm_enc_std_timing), + .modes = dm644xevm_enc_std_timing, + }, + { + .output = { + .index =1 , + .name ="Component" , + .type =V4L2_OUTPUT_TYPE_ANALOG , + .capabilities =V4L2_OUT_CAP_PRESETS , + }, + .subdev_name =VPBE_VENC_SUBDEV_NAME , + .default_mode ="480p59_94" , + .num_modes =ARRAY_SIZE (dm644xevm_enc_preset_timing), + .modes = dm644xevm_enc_preset_timing, + }, +}; + +static struct vpbe_config dm644xevm_display_cfg = { + .module_name ="dm644x-vpbe-display" , + .i2c_adapter_id =1 , + .osd = { + .module_name =VPBE_OSD_SUBDEV_NAME , + }, + .venc = { + .module_name =VPBE_VENC_SUBDEV_NAME , + }, + .num_outputs =ARRAY_SIZE (dm644xevm_vpbe_outputs), + .outputs = dm644xevm_vpbe_outputs, +}; +static struct platform_device *davinci_evm_devices[]__initdata = { &davinci_fb_device, &rtc_dev,
@@ -695,7 +801,7 @@ static __init void davinci_evm_init(void)evm_init_i2c ();davinci_setup_mmc (0 , &dm6446evm_mmc_config); -dm644x_init_video (&dm644xevm_capture_cfg,NULL ); +dm644x_init_video (&dm644xevm_capture_cfg, &dm644xevm_display_cfg);davinci_serial_init (&uart_config);dm644x_init_asp (&dm644x_evm_snd_data);
Signature · 1 line
1.6.2.4