Commit edcc566e authored by Muralidharan Karicheri's avatar Muralidharan Karicheri Committed by Kevin Hilman

davinci: video: remove outdated video driver files for dm6446

Remove outdated driver files from davinci git tree
Signed-off-by: default avatarMuralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 61e8d6d9
......@@ -479,26 +479,6 @@ config VIDEO_VIVI
Say Y here if you want to test video apps or debug V4L devices.
In doubt, say N.
config VIDEO_TVP5146
tristate "TVP5146 video decoder"
depends on I2C && ARCH_DAVINCI
help
Support for I2C bus based TVP5146 configuration.
To compile this driver as a module, choose M here: the
module will be called tvp5146.
config VIDEO_DAVINCI
tristate "Davinci Video Capture"
depends on VIDEO_DEV && VIDEO_TVP5146 && ARCH_DAVINCI
select VIDEOBUF_GEN
select VIDEOBUF_DMA_SG
help
Support for Davinci based frame grabber through CCDC.
To compile this driver as a module, choose M here: the
module will be called vpfe.
source "drivers/media/video/bt8xx/Kconfig"
config VIDEO_PMS
......
......@@ -10,8 +10,6 @@ stkwebcam-objs := stk-webcam.o stk-sensor.o
omap2cam-objs := omap24xxcam.o omap24xxcam-dma.o
davinci-vpfe-objs := ccdc_davinci.o davinci_vpfe.o
videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o
obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
......@@ -133,9 +131,6 @@ obj-$(CONFIG_USB_S2255) += s2255drv.o
obj-$(CONFIG_VIDEO_IVTV) += ivtv/
obj-$(CONFIG_VIDEO_CX18) += cx18/
obj-$(CONFIG_VIDEO_DAVINCI) += davinci-vpfe.o
obj-$(CONFIG_VIDEO_TVP5146) += tvp5146.o
obj-$(CONFIG_VIDEO_VIVI) += vivi.o
obj-$(CONFIG_VIDEO_CX23885) += cx23885/
......
/*
*
*
* Copyright (C) 2006 Texas Instruments Inc
*
* 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
*/
/* ccdc_davinci.c */
#include <media/ccdc_davinci.h>
#define debug_print(x...) //printk(x)
void ccdc_reset()
{
int i;
/* disable CCDC */
ccdc_enable(0);
/* set all registers to default value */
for (i = 0; i <= 0x94; i += 4) {
regw(0, i);
}
regw(0, PCR);
regw(0, SYN_MODE);
regw(0, HD_VD_WID);
regw(0, PIX_LINES);
regw(0, HORZ_INFO);
regw(0, VERT_START);
regw(0, VERT_LINES);
regw(0xffff00ff, CULLING);
regw(0, HSIZE_OFF);
regw(0, SDOFST);
regw(0, SDR_ADDR);
regw(0, VDINT);
regw(0, REC656IF);
regw(0, CCDCFG);
regw(0, FMTCFG);
regw(0, VP_OUT);
}
void ccdc_setwin(ccdc_params_ycbcr * params)
{
int horz_start, horz_nr_pixels;
int vert_start, vert_nr_lines;
/* configure horizonal and vertical starts and sizes */
horz_start = params->win.left << 1;
horz_nr_pixels = (params->win.width <<1) - 1;
regw((horz_start << 16) | horz_nr_pixels, HORZ_INFO);
vert_start = params->win.top;
if (params->frm_fmt == CCDC_FRMFMT_INTERLACED) {
vert_nr_lines = (params->win.height >> 1) - 1;
vert_start >>= 1;
} else {
vert_nr_lines = params->win.height - 1;
}
regw((vert_start << 16) | vert_start, VERT_START);
regw(vert_nr_lines, VERT_LINES);
}
void ccdc_config_ycbcr(ccdc_params_ycbcr * params)
{
u32 syn_mode;
/* first reset the CCDC */
/* all registers have default values after reset */
/* This is important since we assume default values to be set in */
/* a lot of registers that we didn't touch */
ccdc_reset();
/* configure pixel format */
syn_mode = (params->pix_fmt & 0x3) << 12;
/* configure video frame format */
syn_mode |= (params->frm_fmt & 0x1) << 7;
/* setup BT.656 sync mode */
if (params->bt656_enable) {
regw(3, REC656IF);
/* configure the FID, VD, HD pin polarity */
/* fld,hd pol positive, vd negative, 8-bit pack mode */
syn_mode |= 0x00000F04;
} else {/* y/c external sync mode */
syn_mode |= ((params->fid_pol & 0x1) << 4);
syn_mode |= ((params->hd_pol & 0x1) << 3);
syn_mode |= ((params->vd_pol & 0x1) << 2);
}
/* configure video window */
ccdc_setwin(params);
/* configure the order of y cb cr in SD-RAM */
regw((params->pix_order << 11) | 0x8000, CCDCFG);
/* configure the horizontal line offset */
/* this is done by rounding up width to a multiple of 16 pixels */
/* and multiply by two to account for y:cb:cr 4:2:2 data */
regw(((params->win.width * 2) + 31) & 0xffffffe0, HSIZE_OFF);
/* configure the memory line offset */
if (params->buf_type == CCDC_BUFTYPE_FLD_INTERLEAVED) {
/* two fields are interleaved in memory */
regw(0x00000249, SDOFST);
}
/* enable output to SDRAM */
syn_mode |= (0x1 << 17);
/* enable internal timing generator */
syn_mode |= (0x1 << 16);
regw(syn_mode, SYN_MODE);
}
This diff is collapsed.
This diff is collapsed.
/*
*
* Copyright (C) 2006 Texas Instruments Inc
*
* 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
*/
/* ccdc_davinci.h */
#ifndef CCDC_DAVINCI_H
#define CCDC_DAVINCI_H
#include <linux/types.h>
#ifdef __KERNEL__
#include <asm/arch/hardware.h>
#include <asm/io.h>
#endif
#include <linux/videodev.h>
typedef enum ccdc_pixfmt {
CCDC_PIXFMT_RAW = 0,
CCDC_PIXFMT_YCBCR_16BIT = 1,
CCDC_PIXFMT_YCBCR_8BIT = 2
} ccdc_pixfmt;
typedef enum ccdc_frmfmt {
CCDC_FRMFMT_PROGRESSIVE = 0,
CCDC_FRMFMT_INTERLACED = 1
} ccdc_frmfmt;
typedef enum ccdc_pinpol {
CCDC_PINPOL_POSITIVE = 0,
CCDC_PINPOL_NEGATIVE = 1
} ccdc_pinpol;
/* PIXEL ORDER IN MEMORY from LSB to MSB */
/* only applicable for 8-bit input mode */
typedef enum ccdc_pixorder {
CCDC_PIXORDER_CBYCRY = 1,
CCDC_PIXORDER_YCBYCR = 0
} ccdc_pixorder;
typedef enum ccdc_buftype {
CCDC_BUFTYPE_FLD_INTERLEAVED,
CCDC_BUFTYPE_FLD_SEPARATED
} ccdc_buftype;
typedef struct v4l2_rect ccdc_imgwin;
typedef struct ccdc_params_ycbcr {
ccdc_pixfmt pix_fmt; /* pixel format */
ccdc_frmfmt frm_fmt; /* progressive or interlaced frame */
ccdc_imgwin win; /* video window */
ccdc_pinpol fid_pol; /* field id polarity */
ccdc_pinpol vd_pol; /* vertical sync polarity */
ccdc_pinpol hd_pol; /* horizontal sync polarity */
int bt656_enable; /* enable BT.656 embedded sync mode */
ccdc_pixorder pix_order;/* cb:y:cr:y or y:cb:y:cr in memory */
ccdc_buftype buf_type; /* interleaved or separated fields */
} ccdc_params_ycbcr;
#ifdef __KERNEL__
/**************************************************************************\
* Register OFFSET Definitions
\**************************************************************************/
#define PID 0x0
#define PCR 0x4
#define SYN_MODE 0x8
#define HD_VD_WID 0xc
#define PIX_LINES 0x10
#define HORZ_INFO 0x14
#define VERT_START 0x18
#define VERT_LINES 0x1c
#define CULLING 0x20
#define HSIZE_OFF 0x24
#define SDOFST 0x28
#define SDR_ADDR 0x2c
#define CLAMP 0x30
#define DCSUB 0x34
#define COLPTN 0x38
#define BLKCMP 0x3c
#define FPC 0x40
#define FPC_ADDR 0x44
#define VDINT 0x48
#define ALAW 0x4c
#define REC656IF 0x50
#define CCDCFG 0x54
#define FMTCFG 0x58
#define FMT_HORZ 0x5c
#define FMT_VERT 0x50
#define FMT_ADDR0 0x64
#define FMT_ADDR1 0x68
#define FMT_ADDR2 0x6c
#define FMT_ADDR3 0x70
#define FMT_ADDR4 0x74
#define FMT_ADDR5 0x78
#define FMT_ADDR6 0x7c
#define FMT_ADDR7 0x80
#define PRGEVEN_0 0x84
#define PRGEVEN_1 0x88
#define PRGODD_0 0x8c
#define PRGODD_1 0x90
#define VP_OUT 0x94
#define CCDC_IOBASE (0x01c70400)
#define regw(val, reg) davinci_writel(val, (reg)+CCDC_IOBASE)
#define regr(reg) davinci_readl((reg)+CCDC_IOBASE)
extern void ccdc_reset(void);
extern void ccdc_config_ycbcr(ccdc_params_ycbcr * params);
extern void ccdc_setwin(ccdc_params_ycbcr * params);
/* inline functions that must be fast because they are called frequently */
static inline void ccdc_enable(int flag)
{
regw(flag, PCR);
}
static inline void ccdc_setfbaddr(unsigned long paddr)
{
regw(paddr & 0xffffffe0, SDR_ADDR);
}
static inline int ccdc_getfid(void)
{
int fid = (regr(SYN_MODE) >> 15) & 0x1;
return fid;
}
#endif
#endif /* CCDC_DAVINCI_H */
/*
* Copyright (C) 2006 Texas Instruments Inc
*
* 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
*/
/* davinci_vpfe.h */
#ifndef DAVINCI_VPFE_H
#define DAVINCI_VPFE_H
#ifdef __KERNEL__
#include <media/v4l2-dev.h>
#endif
#include <media/ccdc_davinci.h>
#include <media/tvp5146.h>
#define TRUE 1
#define FALSE 0
/* vpfe specific video standards */
#define VPFE_STD_625_50_SQP ((V4L2_STD_625_50)<<32)
#define VPFE_STD_525_60_SQP ((V4L2_STD_525_60)<<32)
#define VPFE_STD_AUTO ((v4l2_std_id)(0x1000000000000000ULL))
#define VPFE_STD_AUTO_SQP ((v4l2_std_id)(0x2000000000000000ULL))
#define VPFE_CMD_CONFIG_CCDC _IOW('V',BASE_VIDIOC_PRIVATE + 1,ccdc_params_ycbcr)
#define VPFE_CMD_LATEST_FRM_ONLY _IOW('V',BASE_VIDIOC_PRIVATE + 2,int)
#define VPFE_CMD_CONFIG_TVP5146 _IOW('V',BASE_VIDIOC_PRIVATE + 3,tvp5146_params)
/* settings for commonly used video formats */
#define VPFE_WIN_NTSC {0,0,720,480}
#define VPFE_WIN_PAL {0,0,720,576}
#define VPFE_WIN_NTSC_SP {0,0,640,480} /* ntsc square pixel */
#define VPFE_WIN_PAL_SP {0,0,768,576} /* pal square pixel */
#define VPFE_WIN_CIF {0,0,352,288}
#define VPFE_WIN_QCIF {0,0,176,144}
#define VPFE_WIN_QVGA {0,0,320,240}
#define VPFE_WIN_SIF {0,0,352,240}
#ifdef __KERNEL__
#include <media/video-buf.h>
#define VPFE_MAJOR_RELEASE 0
#define VPFE_MINOR_RELEASE 0
#define VPFE_BUILD 1
#define VPFE_VERSION_CODE \
(VPFE_MAJOR_RELEASE<<16) | (VPFE_MINOR_RELEASE<<8) | VPFE_BUILD
/* By default, the driver is setup for auto-swich mode */
#define VPFE_DEFAULT_STD VPFE_STD_AUTO
#define VPFE_PIXELASPECT_NTSC {11, 10}
#define VPFE_PIXELASPECT_PAL {54, 59}
#define VPFE_PIXELASPECT_NTSC_SP {1, 1}
#define VPFE_PIXELASPECT_PAL_SP {1, 1}
#define VPFE_PIXELASPECT_DEFAULT {1, 1}
#define VPFE_MAX_FRAME_WIDTH 768 /* account for PAL Square pixel mode */
#define VPFE_MAX_FRAME_HEIGHT 576 /* account for PAL */
/* 4:2:2 data */
#define VPFE_MAX_FBUF_SIZE (VPFE_MAX_FRAME_WIDTH*VPFE_MAX_FRAME_HEIGHT*2)
/* frame buffers allocate at driver initialization time */
#define VPFE_DEFNUM_FBUFS 3
#define VPFE_MAX_FBUF_ORDER \
get_order(roundup_pow_of_two(VPFE_MAX_FBUF_SIZE))
/* device object */
typedef struct vpfe_obj {
struct video_device *video_dev;
struct videobuf_queue bufqueue;/* queue with frame buffers */
struct list_head dma_queue;
u32 latest_only; /* indicate whether to return the most */
/* recent captured buffers only */
u32 usrs;
u32 io_usrs;
struct v4l2_prio_state prio;
v4l2_std_id std;
struct v4l2_rect vwin;
struct v4l2_rect bounds;
struct v4l2_fract pixelaspect;
spinlock_t irqlock;
struct semaphore lock;
enum v4l2_field field;
u32 pixelfmt;
u32 numbuffers;
u8* fbuffers[VIDEO_MAX_FRAME];
struct videobuf_buffer *curFrm;
struct videobuf_buffer *nextFrm;
int field_id;
int mode_changed;
int started;
int field_offset;
tvp5146_params tvp5146_params;
ccdc_params_ycbcr ccdc_params;
} vpfe_obj;
/* file handle */
typedef struct vpfe_fh {
struct vpfe_obj *dev;
int io_allowed;
enum v4l2_priority prio;
} vpfe_fh;
#endif
#endif /* DAVINCI_VPFE_H */
/*
*
*
* Copyright (C) 2006 Texas Instruments Inc
*
* 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
*/
/* tvp5146.h file */
#ifndef TVP5146_H
#define TVP5146_H
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif
#define TRUE 1
#define FALSE 0
/* analog muxing mode */
#define TVP5146_AMUX_COMPOSITE 0
#define TVP5146_AMUX_SVIDEO 1
typedef enum {
TVP5146_MODE_INV = -1,
TVP5146_MODE_AUTO = 0, /* autoswitch mode (default) */
TVP5146_MODE_NTSC = 1, /* (M, J) NTSC 525-line */
TVP5146_MODE_PAL = 2, /* (B, D, G, H, I, N) PAL */
TVP5146_MODE_PAL_M = 3, /* (M) PAL 525-line */
TVP5146_MODE_PAL_CN = 4, /* (Combination-N) PAL */
TVP5146_MODE_NTSC_443 = 5, /* NTSC 4.43 525-line */
TVP5146_MODE_SECAM = 6, /* SECAM */
TVP5146_MODE_PAL_60 = 7, /* PAL 60 525-line */
TVP5146_MODE_AUTO_SQP = 8, /* autoswitch mode (default) */
TVP5146_MODE_NTSC_SQP = 9, /* (M, J) NTSC 525-line */
TVP5146_MODE_PAL_SQP = 0xA, /* (B, D, G, H, I, N) PAL */
TVP5146_MODE_PAL_M_SQP = 0xB, /* (M) PAL 525-line */
TVP5146_MODE_PAL_CN_SQP = 0xC, /* (Combination-N) PAL */
TVP5146_MODE_NTSC_443_SQP = 0xD,/* NTSC 4.43 525-line */
TVP5146_MODE_SECAM_SQP = 0xE, /* SECAM */
TVP5146_MODE_PAL_60_SQP = 0xF, /* PAL 60 525-line */
} tvp5146_mode;
typedef struct {
tvp5146_mode mode;
int amuxmode;
int enablebt656sync;
} tvp5146_params;
#ifdef __KERNEL__
typedef struct {
int agc_enable;
tvp5146_mode video_std;
int brightness;
int contrast;
int saturation;
int hue;
int field_rate; /* 50 or 60 in Hz */
int lost_lock;
int csubc_lock;
int v_lock;
int h_lock;
} tvp5146_status;
typedef unsigned int tvp5146_cmd;
/* commands for setup the decoder */
#define TVP5146_SET_AMUXMODE 4
#define TVP5146_SET_BRIGHTNESS 5
#define TVP5146_SET_CONTRAST 6
#define TVP5146_SET_HUE 7
#define TVP5146_SET_SATURATION 8
#define TVP5146_SET_AGC 9
#define TVP5146_SET_VIDEOSTD 10
#define TVP5146_CLR_LOSTLOCK 11
#define TVP5146_CONFIG 12
#define TVP5146_RESET 13
#define TVP5146_POWERDOWN 14
#define TVP5146_GET_STATUS 15
#define TVP5146_GET_STD 16
#define TVP5146_I2C_ADDR (0xBA >> 1)
extern int tvp5146_ctrl(tvp5146_cmd cmd, void *arg);
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment