Path: blob/master/drivers/media/dvb/mantis/mantis_link.h
15112 views
/*1Mantis PCI bridge driver23Copyright (C) Manu Abraham ([email protected])45This program is free software; you can redistribute it and/or modify6it under the terms of the GNU General Public License as published by7the Free Software Foundation; either version 2 of the License, or8(at your option) any later version.910This program is distributed in the hope that it will be useful,11but WITHOUT ANY WARRANTY; without even the implied warranty of12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13GNU General Public License for more details.1415You should have received a copy of the GNU General Public License16along with this program; if not, write to the Free Software17Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.18*/1920#ifndef __MANTIS_LINK_H21#define __MANTIS_LINK_H2223#include <linux/mutex.h>24#include <linux/workqueue.h>25#include "dvb_ca_en50221.h"2627enum mantis_sbuf_status {28MANTIS_SBUF_DATA_AVAIL = 1,29MANTIS_SBUF_DATA_EMPTY = 2,30MANTIS_SBUF_DATA_OVFLW = 331};3233struct mantis_slot {34u32 timeout;35u32 slave_cfg;36u32 bar;37};3839/* Physical layer */40enum mantis_slot_state {41MODULE_INSERTED = 3,42MODULE_XTRACTED = 443};4445struct mantis_ca {46struct mantis_slot slot[4];4748struct work_struct hif_evm_work;4950u32 hif_event;51wait_queue_head_t hif_opdone_wq;52wait_queue_head_t hif_brrdyw_wq;53wait_queue_head_t hif_data_wq;54wait_queue_head_t hif_write_wq; /* HIF Write op */5556enum mantis_sbuf_status sbuf_status;5758enum mantis_slot_state slot_state;5960void *ca_priv;6162struct dvb_ca_en50221 en50221;63struct mutex ca_lock;64};6566/* CA */67extern void mantis_event_cam_plugin(struct mantis_ca *ca);68extern void mantis_event_cam_unplug(struct mantis_ca *ca);69extern int mantis_pcmcia_init(struct mantis_ca *ca);70extern void mantis_pcmcia_exit(struct mantis_ca *ca);71extern int mantis_evmgr_init(struct mantis_ca *ca);72extern void mantis_evmgr_exit(struct mantis_ca *ca);7374/* HIF */75extern int mantis_hif_init(struct mantis_ca *ca);76extern void mantis_hif_exit(struct mantis_ca *ca);77extern int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr);78extern int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data);79extern int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr);80extern int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data);8182#endif /* __MANTIS_LINK_H */838485