diff options
Diffstat (limited to 'drivers/media/dvb/b2c2')
-rw-r--r-- | drivers/media/dvb/b2c2/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-common.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-dma.c | 35 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 9 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-misc.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-pci.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-reg.h | 4 |
7 files changed, 13 insertions, 51 deletions
diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig index 2583a865a58e..2963605c0ecc 100644 --- a/drivers/media/dvb/b2c2/Kconfig +++ b/drivers/media/dvb/b2c2/Kconfig | |||
@@ -4,7 +4,7 @@ config DVB_B2C2_FLEXCOP | |||
4 | select DVB_STV0299 | 4 | select DVB_STV0299 |
5 | select DVB_MT352 | 5 | select DVB_MT352 |
6 | select DVB_MT312 | 6 | select DVB_MT312 |
7 | select DVB_NXT2002 | 7 | select DVB_NXT200X |
8 | select DVB_STV0297 | 8 | select DVB_STV0297 |
9 | select DVB_BCM3510 | 9 | select DVB_BCM3510 |
10 | select DVB_LGDT330X | 10 | select DVB_LGDT330X |
diff --git a/drivers/media/dvb/b2c2/flexcop-common.h b/drivers/media/dvb/b2c2/flexcop-common.h index 344a3c898460..7d7e1613c5a7 100644 --- a/drivers/media/dvb/b2c2/flexcop-common.h +++ b/drivers/media/dvb/b2c2/flexcop-common.h | |||
@@ -116,11 +116,9 @@ void flexcop_dma_free(struct flexcop_dma *dma); | |||
116 | 116 | ||
117 | int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); | 117 | int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); |
118 | int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); | 118 | int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); |
119 | int flexcop_dma_control_packet_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); | ||
120 | int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx); | 119 | int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx); |
121 | int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff); | 120 | int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff); |
122 | int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles); | 121 | int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles); |
123 | int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 packets); | ||
124 | 122 | ||
125 | /* from flexcop-eeprom.c */ | 123 | /* from flexcop-eeprom.c */ |
126 | /* the PCI part uses this call to get the MAC address, the USB part has its own */ | 124 | /* the PCI part uses this call to get the MAC address, the USB part has its own */ |
diff --git a/drivers/media/dvb/b2c2/flexcop-dma.c b/drivers/media/dvb/b2c2/flexcop-dma.c index cf4ed1df6086..6f592bc32d22 100644 --- a/drivers/media/dvb/b2c2/flexcop-dma.c +++ b/drivers/media/dvb/b2c2/flexcop-dma.c | |||
@@ -169,38 +169,3 @@ int flexcop_dma_config_timer(struct flexcop_device *fc, | |||
169 | } | 169 | } |
170 | EXPORT_SYMBOL(flexcop_dma_config_timer); | 170 | EXPORT_SYMBOL(flexcop_dma_config_timer); |
171 | 171 | ||
172 | /* packet IRQ does not exist in FCII or FCIIb - according to data book and tests */ | ||
173 | int flexcop_dma_control_packet_irq(struct flexcop_device *fc, | ||
174 | flexcop_dma_index_t no, | ||
175 | int onoff) | ||
176 | { | ||
177 | flexcop_ibi_value v = fc->read_ibi_reg(fc,ctrl_208); | ||
178 | |||
179 | deb_rdump("reg: %03x: %x\n",ctrl_208,v.raw); | ||
180 | if (no & FC_DMA_1) | ||
181 | v.ctrl_208.DMA1_Size_IRQ_Enable_sig = onoff; | ||
182 | |||
183 | if (no & FC_DMA_2) | ||
184 | v.ctrl_208.DMA2_Size_IRQ_Enable_sig = onoff; | ||
185 | |||
186 | fc->write_ibi_reg(fc,ctrl_208,v); | ||
187 | deb_rdump("reg: %03x: %x\n",ctrl_208,v.raw); | ||
188 | |||
189 | return 0; | ||
190 | } | ||
191 | EXPORT_SYMBOL(flexcop_dma_control_packet_irq); | ||
192 | |||
193 | int flexcop_dma_config_packet_count(struct flexcop_device *fc, | ||
194 | flexcop_dma_index_t dma_idx, | ||
195 | u8 packets) | ||
196 | { | ||
197 | flexcop_ibi_register r = (dma_idx & FC_DMA_1) ? dma1_004 : dma2_014; | ||
198 | flexcop_ibi_value v = fc->read_ibi_reg(fc,r); | ||
199 | |||
200 | flexcop_dma_remap(fc,dma_idx,1); | ||
201 | |||
202 | v.dma_0x4_remap.DMA_maxpackets = packets; | ||
203 | fc->write_ibi_reg(fc,r,v); | ||
204 | return 0; | ||
205 | } | ||
206 | EXPORT_SYMBOL(flexcop_dma_config_packet_count); | ||
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 0b940e152b79..390cc3a99ce6 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #include "stv0299.h" | 10 | #include "stv0299.h" |
11 | #include "mt352.h" | 11 | #include "mt352.h" |
12 | #include "nxt2002.h" | 12 | #include "nxt200x.h" |
13 | #include "bcm3510.h" | 13 | #include "bcm3510.h" |
14 | #include "stv0297.h" | 14 | #include "stv0297.h" |
15 | #include "mt312.h" | 15 | #include "mt312.h" |
@@ -343,9 +343,10 @@ static struct lgdt330x_config air2pc_atsc_hd5000_config = { | |||
343 | .clock_polarity_flip = 1, | 343 | .clock_polarity_flip = 1, |
344 | }; | 344 | }; |
345 | 345 | ||
346 | static struct nxt2002_config samsung_tbmv_config = { | 346 | static struct nxt200x_config samsung_tbmv_config = { |
347 | .demod_address = 0x0a, | 347 | .demod_address = 0x0a, |
348 | .request_firmware = flexcop_fe_request_firmware, | 348 | .pll_address = 0xc2, |
349 | .pll_desc = &dvb_pll_samsung_tbmv, | ||
349 | }; | 350 | }; |
350 | 351 | ||
351 | static struct bcm3510_config air2pc_atsc_first_gen_config = { | 352 | static struct bcm3510_config air2pc_atsc_first_gen_config = { |
@@ -505,7 +506,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) | |||
505 | info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address); | 506 | info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address); |
506 | } else | 507 | } else |
507 | /* try the air atsc 2nd generation (nxt2002) */ | 508 | /* try the air atsc 2nd generation (nxt2002) */ |
508 | if ((fc->fe = nxt2002_attach(&samsung_tbmv_config, &fc->i2c_adap)) != NULL) { | 509 | if ((fc->fe = nxt200x_attach(&samsung_tbmv_config, &fc->i2c_adap)) != NULL) { |
509 | fc->dev_type = FC_AIR_ATSC2; | 510 | fc->dev_type = FC_AIR_ATSC2; |
510 | info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); | 511 | info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); |
511 | } else | 512 | } else |
diff --git a/drivers/media/dvb/b2c2/flexcop-misc.c b/drivers/media/dvb/b2c2/flexcop-misc.c index 62282d8dbfa8..167583bf0621 100644 --- a/drivers/media/dvb/b2c2/flexcop-misc.c +++ b/drivers/media/dvb/b2c2/flexcop-misc.c | |||
@@ -36,14 +36,14 @@ void flexcop_determine_revision(struct flexcop_device *fc) | |||
36 | /* bus parts have to decide if hw pid filtering is used or not. */ | 36 | /* bus parts have to decide if hw pid filtering is used or not. */ |
37 | } | 37 | } |
38 | 38 | ||
39 | const char *flexcop_revision_names[] = { | 39 | static const char *flexcop_revision_names[] = { |
40 | "Unkown chip", | 40 | "Unkown chip", |
41 | "FlexCopII", | 41 | "FlexCopII", |
42 | "FlexCopIIb", | 42 | "FlexCopIIb", |
43 | "FlexCopIII", | 43 | "FlexCopIII", |
44 | }; | 44 | }; |
45 | 45 | ||
46 | const char *flexcop_device_names[] = { | 46 | static const char *flexcop_device_names[] = { |
47 | "Unkown device", | 47 | "Unkown device", |
48 | "Air2PC/AirStar 2 DVB-T", | 48 | "Air2PC/AirStar 2 DVB-T", |
49 | "Air2PC/AirStar 2 ATSC 1st generation", | 49 | "Air2PC/AirStar 2 ATSC 1st generation", |
@@ -54,7 +54,7 @@ const char *flexcop_device_names[] = { | |||
54 | "Air2PC/AirStar 2 ATSC 3rd generation (HD5000)", | 54 | "Air2PC/AirStar 2 ATSC 3rd generation (HD5000)", |
55 | }; | 55 | }; |
56 | 56 | ||
57 | const char *flexcop_bus_names[] = { | 57 | static const char *flexcop_bus_names[] = { |
58 | "USB", | 58 | "USB", |
59 | "PCI", | 59 | "PCI", |
60 | }; | 60 | }; |
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c index 2f76eb3fea40..9bc40bdcc282 100644 --- a/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/drivers/media/dvb/b2c2/flexcop-pci.c | |||
@@ -161,8 +161,10 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id, struct pt_regs *regs) | |||
161 | fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2; | 161 | fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2; |
162 | u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0; | 162 | u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0; |
163 | 163 | ||
164 | deb_irq("%u irq: %08x cur_addr: %08x: cur_pos: %08x, last_cur_pos: %08x ", | 164 | deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, last_cur_pos: %08x ", |
165 | jiffies_to_usecs(jiffies - fc_pci->last_irq),v.raw,cur_addr,cur_pos,fc_pci->last_dma1_cur_pos); | 165 | jiffies_to_usecs(jiffies - fc_pci->last_irq), |
166 | v.raw, (unsigned long long)cur_addr, cur_pos, | ||
167 | fc_pci->last_dma1_cur_pos); | ||
166 | fc_pci->last_irq = jiffies; | 168 | fc_pci->last_irq = jiffies; |
167 | 169 | ||
168 | /* buffer end was reached, restarted from the beginning | 170 | /* buffer end was reached, restarted from the beginning |
diff --git a/drivers/media/dvb/b2c2/flexcop-reg.h b/drivers/media/dvb/b2c2/flexcop-reg.h index 3153f9513c63..491f9bd6e195 100644 --- a/drivers/media/dvb/b2c2/flexcop-reg.h +++ b/drivers/media/dvb/b2c2/flexcop-reg.h | |||
@@ -16,8 +16,6 @@ typedef enum { | |||
16 | FLEXCOP_III, | 16 | FLEXCOP_III, |
17 | } flexcop_revision_t; | 17 | } flexcop_revision_t; |
18 | 18 | ||
19 | extern const char *flexcop_revision_names[]; | ||
20 | |||
21 | typedef enum { | 19 | typedef enum { |
22 | FC_UNK = 0, | 20 | FC_UNK = 0, |
23 | FC_AIR_DVB, | 21 | FC_AIR_DVB, |
@@ -34,8 +32,6 @@ typedef enum { | |||
34 | FC_PCI, | 32 | FC_PCI, |
35 | } flexcop_bus_t; | 33 | } flexcop_bus_t; |
36 | 34 | ||
37 | extern const char *flexcop_device_names[]; | ||
38 | |||
39 | /* FlexCop IBI Registers */ | 35 | /* FlexCop IBI Registers */ |
40 | #if defined(__LITTLE_ENDIAN) | 36 | #if defined(__LITTLE_ENDIAN) |
41 | #include "flexcop_ibi_value_le.h" | 37 | #include "flexcop_ibi_value_le.h" |