linux/drivers/media/pci/tw68/tw68.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *  tw68 driver common header file
 *
 *  Much of this code is derived from the cx88 and sa7134 drivers, which
 *  were in turn derived from the bt87x driver.  The original work was by
 *  Gerd Knorr; more recently the code was enhanced by Mauro Carvalho Chehab,
 *  Hans Verkuil, Andy Walls and many others.  Their work is gratefully
 *  acknowledged.  Full credit goes to them - any problems within this code
 *  are mine.
 *
 *  Copyright (C) 2009  William M. Brack
 *
 *  Refactored and updated to the latest v4l core frameworks:
 *
 *  Copyright (C) 2014 Hans Verkuil <[email protected]>
 */

#include <linux/pci.h>
#include <linux/videodev2.h>
#include <linux/notifier.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/io.h>

#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-sg.h>

#include "tw68-reg.h"

#define UNSET

#define TW68_NORMS

#define TW68_VID_INTS
/* TW6800 chips have trouble with these, so we don't set them for that chip */
#define TW68_VID_INTSX

#define TW68_I2C_INTS

enum tw68_decoder_type {};

/* ----------------------------------------------------------- */
/* static data                                                 */

struct tw68_tvnorm {};

struct tw68_format {};

/* ----------------------------------------------------------- */
/* card configuration					  */

#define TW68_BOARD_NOAUTO
#define TW68_BOARD_UNKNOWN
#define TW68_BOARD_GENERIC_6802

#define TW68_MAXBOARDS
#define TW68_INPUT_MAX

/* ----------------------------------------------------------- */
/* device / file handle status                                 */

#define BUFFER_TIMEOUT

struct tw68_dev;	/* forward delclaration */

/* buffer for one video/vbi/ts frame */
struct tw68_buf {};

struct tw68_fmt {};

/* global device status */
struct tw68_dev {};

/* ----------------------------------------------------------- */

#define tw_readl(reg)
#define tw_readb(reg)
#define tw_writel(reg, value)
#define tw_writeb(reg, value)

#define tw_andorl(reg, mask, value)
#define tw_andorb(reg, mask, value)
#define tw_setl(reg, bit)
#define tw_setb(reg, bit)
#define tw_clearl(reg, bit)
#define tw_clearb(reg, bit)

#define tw_wait(us)

/* ----------------------------------------------------------- */
/* tw68-video.c                                                */

void tw68_set_tvnorm_hw(struct tw68_dev *dev);

int tw68_video_init1(struct tw68_dev *dev);
int tw68_video_init2(struct tw68_dev *dev, int video_nr);
void tw68_irq_video_done(struct tw68_dev *dev, unsigned long status);
int tw68_video_start_dma(struct tw68_dev *dev, struct tw68_buf *buf);

/* ----------------------------------------------------------- */
/* tw68-risc.c                                                 */

int tw68_risc_buffer(struct pci_dev *pci, struct tw68_buf *buf,
	struct scatterlist *sglist, unsigned int top_offset,
	unsigned int bottom_offset, unsigned int bpl,
	unsigned int padding, unsigned int lines);