Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
flexcop-reg.h
Go to the documentation of this file.
1 /*
2  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
3  * flexcop-reg.h - register abstraction for FlexCopII, FlexCopIIb and FlexCopIII
4  * see flexcop.c for copyright information
5  */
6 #ifndef __FLEXCOP_REG_H__
7 #define __FLEXCOP_REG_H__
8 
9 typedef enum {
15 
16 typedef enum {
17  FC_UNK = 0,
28 
29 typedef enum {
30  FC_USB = 0,
33 
34 /* FlexCop IBI Registers */
35 #if defined(__LITTLE_ENDIAN)
36 #include "flexcop_ibi_value_le.h"
37 #else
38 #if defined(__BIG_ENDIAN)
39 #include "flexcop_ibi_value_be.h"
40 #else
41 #error no endian defined
42 #endif
43 #endif
44 
45 #define fc_data_Tag_ID_DVB 0x3e
46 #define fc_data_Tag_ID_ATSC 0x3f
47 #define fc_data_Tag_ID_IDSB 0x8b
48 
49 #define fc_key_code_default 0x1
50 #define fc_key_code_even 0x2
51 #define fc_key_code_odd 0x3
52 
54 
55 typedef enum {
60 
61 typedef enum {
62  FC_WRITE = 0,
63  FC_READ = 1,
65 
66 typedef enum {
72 
73 typedef enum {
79 
80 typedef enum {
81  FC_SRAM_2_32KB = 0, /* 64KB */
82  FC_SRAM_1_32KB = 1, /* 32KB - default fow FCII */
83  FC_SRAM_1_128KB = 2, /* 128KB */
84  FC_SRAM_1_48KB = 3, /* 48KB - default for FCIII */
86 
87 typedef enum {
93 
94 typedef enum {
95  FC_DMA_1 = 1,
96  FC_DMA_2 = 2,
98 
99 typedef enum {
103 
104 /* names of the particular registers */
105 typedef enum {
106  dma1_000 = 0x000,
107  dma1_004 = 0x004,
108  dma1_008 = 0x008,
109  dma1_00c = 0x00c,
110  dma2_010 = 0x010,
111  dma2_014 = 0x014,
112  dma2_018 = 0x018,
113  dma2_01c = 0x01c,
114 
115  tw_sm_c_100 = 0x100,
116  tw_sm_c_104 = 0x104,
117  tw_sm_c_108 = 0x108,
118  tw_sm_c_10c = 0x10c,
119  tw_sm_c_110 = 0x110,
120 
122  misc_204 = 0x204,
123  ctrl_208 = 0x208,
124  irq_20c = 0x20c,
125  sw_reset_210 = 0x210,
126  misc_214 = 0x214,
129 
130  pid_filter_300 = 0x300,
131  pid_filter_304 = 0x304,
132  pid_filter_308 = 0x308,
133  pid_filter_30c = 0x30c,
134  index_reg_310 = 0x310,
135  pid_n_reg_314 = 0x314,
138 
139  data_tag_400 = 0x400,
140  card_id_408 = 0x408,
141  card_id_40c = 0x40c,
144 
145  ci_600 = 0x600,
146  pi_604 = 0x604,
147  pi_608 = 0x608,
148  dvb_reg_60c = 0x60c,
149 
159 
160 #define flexcop_set_ibi_value(reg,attr,val) { \
161  flexcop_ibi_value v = fc->read_ibi_reg(fc,reg); \
162  v.reg.attr = val; \
163  fc->write_ibi_reg(fc,reg,v); \
164 }
165 
166 #endif