1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#ifndef __ALTERA_CI_H
21#define __ALTERA_CI_H
22
23#define ALT_DATA 0x000000ff
24#define ALT_TDI 0x00008000
25#define ALT_TDO 0x00004000
26#define ALT_TCK 0x00002000
27#define ALT_RDY 0x00001000
28#define ALT_RD 0x00000800
29#define ALT_WR 0x00000400
30#define ALT_AD_RG 0x00000200
31#define ALT_CS 0x00000100
32
33struct altera_ci_config {
34 void *dev;
35 void *adapter;
36 struct dvb_demux *demux;
37 int (*fpga_rw) (void *dev, int ad_rg, int val, int rw);
38};
39
40#if IS_REACHABLE(CONFIG_MEDIA_ALTERA_CI)
41
42extern int altera_ci_init(struct altera_ci_config *config, int ci_nr);
43extern void altera_ci_release(void *dev, int ci_nr);
44extern int altera_ci_irq(void *dev);
45extern int altera_ci_tuner_reset(void *dev, int ci_nr);
46
47#else
48
49static inline int altera_ci_init(struct altera_ci_config *config, int ci_nr)
50{
51 pr_warn("%s: driver disabled by Kconfig\n", __func__);
52 return 0;
53}
54
55static inline void altera_ci_release(void *dev, int ci_nr)
56{
57 pr_warn("%s: driver disabled by Kconfig\n", __func__);
58}
59
60static inline int altera_ci_irq(void *dev)
61{
62 pr_warn("%s: driver disabled by Kconfig\n", __func__);
63 return 0;
64}
65
66static inline int altera_ci_tuner_reset(void *dev, int ci_nr)
67{
68 pr_warn("%s: driver disabled by Kconfig\n", __func__);
69 return 0;
70}
71
72#endif
73#if 0
74static inline int altera_hw_filt_init(struct altera_ci_config *config,
75 int hw_filt_nr)
76{
77 pr_warn("%s: driver disabled by Kconfig\n", __func__);
78 return 0;
79}
80
81static inline void altera_hw_filt_release(void *dev, int filt_nr)
82{
83 pr_warn("%s: driver disabled by Kconfig\n", __func__);
84}
85
86static inline int altera_pid_feed_control(void *dev, int filt_nr,
87 struct dvb_demux_feed *dvbdmxfeed, int onoff)
88{
89 pr_warn("%s: driver disabled by Kconfig\n", __func__);
90 return 0;
91}
92
93#endif
94
95#endif
96