blob: 33b39b781d2eb7d619f1d2e7c70378e9d7355c89 [file] [log] [blame]
Manu Abrahamdd827da2009-12-04 05:00:30 -03001/*
2 Mantis PCI bridge driver
3
4 Copyright (C) 2005, 2006 Manu Abraham (abraham.manu@gmail.com)
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef __MANTIS_LINK_H
22#define __MANTIS_LINK_H
23
Manu Abraham12855ca2009-12-04 05:09:04 -030024#include <linux/workqueue.h>
25
Manu Abrahamdd827da2009-12-04 05:00:30 -030026enum mantis_sbuf_status {
27 MANTIS_SBUF_DATA_AVAIL = 1,
28 MANTIS_SBUF_DATA_EMPTY = 2,
29 MANTIS_SBUF_DATA_OVFLW = 3
30};
31
32struct mantis_slot {
33 u32 timeout;
34};
35
Manu Abraham8ce571f2009-12-04 05:06:00 -030036/* Physical layer */
37enum mantis_slot_state {
38 MODULE_INSERTED = 3,
39 MODULE_XTRACTED = 4
40};
41
Manu Abrahamdd827da2009-12-04 05:00:30 -030042struct mantis_ca {
43 struct mantis_slot slot;
44
Manu Abraham12855ca2009-12-04 05:09:04 -030045 struct work_struct hif_evm_work;
Manu Abrahamdd827da2009-12-04 05:00:30 -030046
47 u32 hif_event;
48 wait_queue_head_t hif_opdone_wq;
49 wait_queue_head_t hif_brrdyw_wq;
50 wait_queue_head_t hif_data_wq;
Manu Abrahambc4ed422009-12-04 05:03:35 -030051 u32 hif_job_queue;
Manu Abrahamdd827da2009-12-04 05:00:30 -030052
53 enum mantis_sbuf_status sbuf_status;
54
Manu Abraham8ce571f2009-12-04 05:06:00 -030055 enum mantis_slot_state slot_state;
56
Manu Abrahamdd827da2009-12-04 05:00:30 -030057 struct dvb_device *ca_dev;
58 void *ca_priv;
59};
60
Manu Abraham50d82602009-12-04 05:06:38 -030061/* CA */
62extern void mantis_event_cam_plugin(struct mantis_ca *ca);
63extern void mantis_event_cam_unplug(struct mantis_ca *ca);
64extern int mantis_pcmcia_init(struct mantis_ca *ca);
65extern void mantis_pcmcia_exit(struct mantis_ca *ca);
66extern int mantis_evmgr_init(struct mantis_ca *ca);
67extern void mantis_evmgr_exit(struct mantis_ca *ca);
68
Manu Abrahamdd827da2009-12-04 05:00:30 -030069#endif // __MANTIS_LINK_H