linux/drivers/media/pci/bt8xx/dst_common.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
	Frontend-driver for TwinHan DST Frontend

	Copyright (C) 2003 Jamie Honan
	Copyright (C) 2004, 2005 Manu Abraham ([email protected])

*/

#ifndef DST_COMMON_H
#define DST_COMMON_H

#include <linux/dvb/frontend.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include "bt878.h"

#include "dst_ca.h"


#define NO_DELAY
#define LONG_DELAY
#define DEVICE_INIT

#define DELAY

#define DST_TYPE_IS_SAT
#define DST_TYPE_IS_TERR
#define DST_TYPE_IS_CABLE
#define DST_TYPE_IS_ATSC

#define DST_TYPE_HAS_TS188
#define DST_TYPE_HAS_TS204
#define DST_TYPE_HAS_SYMDIV
#define DST_TYPE_HAS_FW_1
#define DST_TYPE_HAS_FW_2
#define DST_TYPE_HAS_FW_3
#define DST_TYPE_HAS_FW_BUILD
#define DST_TYPE_HAS_OBS_REGS
#define DST_TYPE_HAS_INC_COUNT
#define DST_TYPE_HAS_MULTI_FE
#define DST_TYPE_HAS_NEWTUNE_2
#define DST_TYPE_HAS_DBOARD
#define DST_TYPE_HAS_VLF

/*	Card capability list	*/

#define DST_TYPE_HAS_MAC
#define DST_TYPE_HAS_DISEQC3
#define DST_TYPE_HAS_DISEQC4
#define DST_TYPE_HAS_DISEQC5
#define DST_TYPE_HAS_MOTO
#define DST_TYPE_HAS_CA
#define DST_TYPE_HAS_ANALOG
#define DST_TYPE_HAS_SESSION

#define TUNER_TYPE_MULTI
#define TUNER_TYPE_UNKNOWN
/*	DVB-S		*/
#define TUNER_TYPE_L64724
#define TUNER_TYPE_STV0299
#define TUNER_TYPE_MB86A15

/*	DVB-T		*/
#define TUNER_TYPE_TDA10046

/*	ATSC		*/
#define TUNER_TYPE_NXT200x


#define RDC_8820_PIO_0_DISABLE
#define RDC_8820_PIO_0_ENABLE
#define RDC_8820_INT
#define RDC_8820_RESET

/*	DST Communication	*/
#define GET_REPLY
#define NO_REPLY

#define GET_ACK
#define FIXED_COMM

#define ACK

struct dst_state {};

struct tuner_types {};

struct dst_types {};

struct dst_config
{};

int rdc_reset_state(struct dst_state *state);

int dst_wait_dst_ready(struct dst_state *state, u8 delay_mode);
int dst_pio_disable(struct dst_state *state);
int dst_error_recovery(struct dst_state* state);
int dst_error_bailout(struct dst_state *state);
int dst_comm_init(struct dst_state* state);

int write_dst(struct dst_state *state, u8 * data, u8 len);
int read_dst(struct dst_state *state, u8 * ret, u8 len);
u8 dst_check_sum(u8 * buf, u32 len);
struct dst_state* dst_attach(struct dst_state* state, struct dvb_adapter *dvb_adapter);
struct dvb_device *dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter);


#endif // DST_COMMON_H