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
6 #ifndef __FLEXCOP_REG_H__
7 #define __FLEXCOP_REG_H__
27 } flexcop_device_type_t
;
34 /* FlexCop IBI Registers */
35 #if defined(__LITTLE_ENDIAN)
36 #include "flexcop_ibi_value_le.h"
38 #if defined(__BIG_ENDIAN)
39 #include "flexcop_ibi_value_be.h"
41 #error no endian defined
45 #define fc_data_Tag_ID_DVB 0x3e
46 #define fc_data_Tag_ID_ATSC 0x3f
47 #define fc_data_Tag_ID_IDSB 0x8b
49 #define fc_key_code_default 0x1
50 #define fc_key_code_even 0x2
51 #define fc_key_code_odd 0x3
53 extern flexcop_ibi_value ibi_zero
;
56 FC_I2C_PORT_DEMOD
= 1,
57 FC_I2C_PORT_EEPROM
= 2,
58 FC_I2C_PORT_TUNER
= 3,
64 } flexcop_access_op_t
;
70 FC_SRAM_DEST_MEDIA
= 8
71 } flexcop_sram_dest_t
;
74 FC_SRAM_DEST_TARGET_WAN_USB
= 0,
75 FC_SRAM_DEST_TARGET_DMA1
= 1,
76 FC_SRAM_DEST_TARGET_DMA2
= 2,
77 FC_SRAM_DEST_TARGET_FC3_CA
= 3
78 } flexcop_sram_dest_target_t
;
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 */
85 } flexcop_sram_type_t
;
88 FC_WAN_SPEED_4MBITS
= 0,
89 FC_WAN_SPEED_8MBITS
= 1,
90 FC_WAN_SPEED_12MBITS
= 2,
91 FC_WAN_SPEED_16MBITS
= 3,
92 } flexcop_wan_speed_t
;
97 } flexcop_dma_index_t
;
100 FC_DMA_SUBADDR_0
= 1,
101 FC_DMA_SUBADDR_1
= 2,
102 } flexcop_dma_addr_index_t
;
104 /* names of the particular registers */
121 lnb_switch_freq_200
= 0x200,
125 sw_reset_210
= 0x210,
127 mbox_v8_to_host_218
= 0x218,
128 mbox_host_to_v8_21c
= 0x21c,
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,
136 mac_low_reg_318
= 0x318,
137 mac_high_reg_31c
= 0x31c,
139 data_tag_400
= 0x400,
142 mac_address_418
= 0x418,
143 mac_address_41c
= 0x41c,
150 sram_ctrl_reg_700
= 0x700,
151 net_buf_reg_704
= 0x704,
152 cai_buf_reg_708
= 0x708,
153 cao_buf_reg_70c
= 0x70c,
154 media_buf_reg_710
= 0x710,
155 sram_dest_reg_714
= 0x714,
156 net_buf_reg_718
= 0x718,
157 wan_ctrl_reg_71c
= 0x71c,
158 } flexcop_ibi_register
;
160 #define flexcop_set_ibi_value(reg,attr,val) { \
161 flexcop_ibi_value v = fc->read_ibi_reg(fc,reg); \
163 fc->write_ibi_reg(fc,reg,v); \