/*1* Copyright (C) 2009 Texas Instruments Inc2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation; either version 2 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA16*17* vpss - video processing subsystem module header file.18*19* Include this header file if a driver needs to configure vpss system20* module. It exports a set of library functions for video drivers to21* configure vpss system module functions such as clock enable/disable,22* vpss interrupt mux to arm, and other common vpss system module23* functions.24*/25#ifndef _VPSS_H26#define _VPSS_H2728/* selector for ccdc input selection on DM355 */29enum vpss_ccdc_source_sel {30VPSS_CCDCIN,31VPSS_HSSIIN,32VPSS_PGLPBK, /* for DM365 only */33VPSS_CCDCPG /* for DM365 only */34};3536struct vpss_sync_pol {37unsigned int ccdpg_hdpol:1;38unsigned int ccdpg_vdpol:1;39};4041struct vpss_pg_frame_size {42short hlpfr;43short pplen;44};4546/* Used for enable/disable VPSS Clock */47enum vpss_clock_sel {48/* DM355/DM365 */49VPSS_CCDC_CLOCK,50VPSS_IPIPE_CLOCK,51VPSS_H3A_CLOCK,52VPSS_CFALD_CLOCK,53/*54* When using VPSS_VENC_CLOCK_SEL in vpss_enable_clock() api55* following applies:-56* en = 0 selects ENC_CLK57* en = 1 selects ENC_CLK/258*/59VPSS_VENC_CLOCK_SEL,60VPSS_VPBE_CLOCK,61/* DM365 only clocks */62VPSS_IPIPEIF_CLOCK,63VPSS_RSZ_CLOCK,64VPSS_BL_CLOCK,65/*66* When using VPSS_PCLK_INTERNAL in vpss_enable_clock() api67* following applies:-68* en = 0 disable internal PCLK69* en = 1 enables internal PCLK70*/71VPSS_PCLK_INTERNAL,72/*73* When using VPSS_PSYNC_CLOCK_SEL in vpss_enable_clock() api74* following applies:-75* en = 0 enables MMR clock76* en = 1 enables VPSS clock77*/78VPSS_PSYNC_CLOCK_SEL,79VPSS_LDC_CLOCK_SEL,80VPSS_OSD_CLOCK_SEL,81VPSS_FDIF_CLOCK,82VPSS_LDC_CLOCK83};8485/* select input to ccdc on dm355 */86int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel);87/* enable/disable a vpss clock, 0 - success, -1 - failure */88int vpss_enable_clock(enum vpss_clock_sel clock_sel, int en);89/* set sync polarity, only for DM365*/90void dm365_vpss_set_sync_pol(struct vpss_sync_pol);91/* set the PG_FRAME_SIZE register, only for DM365 */92void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size);9394/* wbl reset for dm644x */95enum vpss_wbl_sel {96VPSS_PCR_AEW_WBL_0 = 16,97VPSS_PCR_AF_WBL_0,98VPSS_PCR_RSZ4_WBL_0,99VPSS_PCR_RSZ3_WBL_0,100VPSS_PCR_RSZ2_WBL_0,101VPSS_PCR_RSZ1_WBL_0,102VPSS_PCR_PREV_WBL_0,103VPSS_PCR_CCDC_WBL_O,104};105/* clear wbl overflow flag for DM6446 */106int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel);107#endif108109110