1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 Mantis PCI bridge driver
5 Copyright (C) Manu Abraham (abraham.manu@gmail.com)
9 #ifndef __MANTIS_LINK_H
10 #define __MANTIS_LINK_H
12 #include <linux/mutex.h>
13 #include <linux/workqueue.h>
14 #include <media/dvb_ca_en50221.h>
16 enum mantis_sbuf_status
{
17 MANTIS_SBUF_DATA_AVAIL
= 1,
18 MANTIS_SBUF_DATA_EMPTY
= 2,
19 MANTIS_SBUF_DATA_OVFLW
= 3
29 enum mantis_slot_state
{
35 struct mantis_slot slot
[4];
37 struct work_struct hif_evm_work
;
40 wait_queue_head_t hif_opdone_wq
;
41 wait_queue_head_t hif_brrdyw_wq
;
42 wait_queue_head_t hif_data_wq
;
43 wait_queue_head_t hif_write_wq
; /* HIF Write op */
45 enum mantis_sbuf_status sbuf_status
;
47 enum mantis_slot_state slot_state
;
51 struct dvb_ca_en50221 en50221
;
56 extern void mantis_event_cam_plugin(struct mantis_ca
*ca
);
57 extern void mantis_event_cam_unplug(struct mantis_ca
*ca
);
58 extern int mantis_pcmcia_init(struct mantis_ca
*ca
);
59 extern void mantis_pcmcia_exit(struct mantis_ca
*ca
);
60 extern int mantis_evmgr_init(struct mantis_ca
*ca
);
61 extern void mantis_evmgr_exit(struct mantis_ca
*ca
);
64 extern int mantis_hif_init(struct mantis_ca
*ca
);
65 extern void mantis_hif_exit(struct mantis_ca
*ca
);
66 extern int mantis_hif_read_mem(struct mantis_ca
*ca
, u32 addr
);
67 extern int mantis_hif_write_mem(struct mantis_ca
*ca
, u32 addr
, u8 data
);
68 extern int mantis_hif_read_iom(struct mantis_ca
*ca
, u32 addr
);
69 extern int mantis_hif_write_iom(struct mantis_ca
*ca
, u32 addr
, u8 data
);
71 #endif /* __MANTIS_LINK_H */