diff options
Diffstat (limited to 'linux/drivers/media/dvb/b2c2')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-dma.c | 20 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 26 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-hw-filter.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-i2c.c | 34 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-misc.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-pci.c | 48 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-reg.h | 102 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-sram.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/skystar2.c | 6 |
10 files changed, 135 insertions, 135 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-dma.c b/linux/drivers/media/dvb/b2c2/flexcop-dma.c index 6c6556b09..8d2706075 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-dma.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-dma.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-dma.c - methods for configuring and controlling the DMA of the FlexCop. - * + * * see flexcop.c for copyright information. */ #include "flexcop.h" @@ -10,13 +10,13 @@ int flexcop_dma_allocate(struct pci_dev *pdev, struct flexcop_dma *dma, u32 size) { u8 *tcpu; - dma_addr_t tdma; + dma_addr_t tdma; if (size % 2) { err("dma buffersize has to be even."); return -EINVAL; } - + if ((tcpu = pci_alloc_consistent(pdev, size, &tdma)) != NULL) { dma->pdev = pdev; dma->cpu_addr0 = tcpu; @@ -46,7 +46,7 @@ int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t if (no & FC_DMA_2) v.ctrl_208.DMA2_Timer_Enable_sig = onoff; - + fc->write_ibi_reg(fc,ctrl_208,v); return 0; } @@ -84,20 +84,20 @@ EXPORT_SYMBOL(flexcop_dma_control_packet_irq); int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx,flexcop_dma_addr_index_t index) { - + flexcop_ibi_value v0x0,v0x4,v0xc; v0x0.raw = v0x4.raw = v0xc.raw = 0; v0x0.dma_0x0.dma_address0 = dma->dma_addr0 >> 2; v0xc.dma_0xc.dma_address1 = dma->dma_addr1 >> 2; v0x4.dma_0x4_write.dma_addr_size = dma->size / 4; - + if (index & FC_DMA_SUBADDR_0) v0x0.dma_0x0.dma_0start = 1; if (index & FC_DMA_SUBADDR_1) v0xc.dma_0xc.dma_1start = 1; - + if (dma_idx & FC_DMA_1) { fc->write_ibi_reg(fc,dma1_000,v0x0); fc->write_ibi_reg(fc,dma1_004,v0x4); @@ -107,7 +107,7 @@ int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexc fc->write_ibi_reg(fc,dma2_014,v0x4); fc->write_ibi_reg(fc,dma2_01c,v0xc); } - + return 0; } EXPORT_SYMBOL(flexcop_dma_config); @@ -126,7 +126,7 @@ int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_ { flexcop_ibi_register r = (dma_idx & FC_DMA_1) ? dma1_004 : dma2_014; flexcop_ibi_value v = fc->read_ibi_reg(fc,r); - + flexcop_dma_remap(fc,dma_idx,0); v.dma_0x4_write.dmatimer = cycles >> 1; @@ -139,7 +139,7 @@ int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index { flexcop_ibi_register r = (dma_idx & FC_DMA_1) ? dma1_004 : dma2_014; flexcop_ibi_value v = fc->read_ibi_reg(fc,r); - + flexcop_dma_remap(fc,dma_idx,1); v.dma_0x4_remap.DMA_maxpackets = packets; diff --git a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 9fc2d1764..124b25182 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-fe-tuner.c - methods for attaching a frontend and controlling DiSEqC. - * + * * see flexcop.c for copyright information. */ #include "flexcop.h" @@ -20,7 +20,7 @@ static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage struct flexcop_device *fc = fe->dvb->priv; flexcop_ibi_value v; deb_tuner("polarity/voltage = %u\n", voltage); - + v = fc->read_ibi_reg(fc, misc_204); switch (voltage) { case SEC_VOLTAGE_OFF: @@ -48,7 +48,7 @@ static int flexcop_sleep(struct dvb_frontend* fe) if (fc->fe_sleep) return fc->fe_sleep(fe); - + /* v.misc_204.ACPI3_sig = 1; fc->write_ibi_reg(fc,misc_204,v);*/ @@ -66,9 +66,9 @@ static int flexcop_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) deb_tuner("tone = %u\n",tone); switch (tone) { - case SEC_TONE_ON: + case SEC_TONE_ON: ax = 0x01ff; - break; + break; case SEC_TONE_OFF: ax = 0; break; @@ -76,14 +76,14 @@ static int flexcop_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) err("unknown SEC_TONE value"); return -EINVAL; } - + v.lnb_switch_freq_200.LNB_CTLPrescaler_sig = 1; /* divide by 2 */ - v.lnb_switch_freq_200.LNB_CTLHighCount_sig = + v.lnb_switch_freq_200.LNB_CTLHighCount_sig = v.lnb_switch_freq_200.LNB_CTLLowCount_sig = ax; - + return fc->write_ibi_reg(fc,lnb_switch_freq_200,v); -} +} static void flexcop_diseqc_send_bit(struct dvb_frontend* fe, int data) { @@ -345,10 +345,10 @@ int flexcop_frontend_init(struct flexcop_device *fc) fc->fe_sleep = fc->fe->ops->sleep; fc->fe->ops->sleep = flexcop_sleep; - + fc->dev_type = FC_SKY; info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address); - } else + } else /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */ if ((fc->fe = mt352_attach(&samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) { fc->dev_type = FC_AIR_DVB; @@ -370,7 +370,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) fc->fe->ops->diseqc_send_burst = flexcop_diseqc_send_burst; fc->fe->ops->set_tone = flexcop_set_tone; fc->fe->ops->set_voltage = flexcop_set_voltage; - + fc->fe_sleep = fc->fe->ops->sleep; fc->fe->ops->sleep = flexcop_sleep; @@ -390,7 +390,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) return -EINVAL; } } - fc->init_state |= FC_STATE_FE_INIT; + fc->init_state |= FC_STATE_FE_INIT; return 0; } diff --git a/linux/drivers/media/dvb/b2c2/flexcop-hw-filter.c b/linux/drivers/media/dvb/b2c2/flexcop-hw-filter.c index 58258452b..7a5399b56 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-hw-filter.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-hw-filter.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-hw-filter.c - pid and mac address filtering and corresponding control functions. - * + * * see flexcop.c for copyright information. */ #include "flexcop.h" @@ -123,7 +123,7 @@ static void flexcop_pid_control(struct flexcop_device *fc, int index, u16 pid,in vid = fc->read_ibi_reg(fc,index_reg_310); vid.index_reg_310.index_reg = index - 6; fc->write_ibi_reg(fc,index_reg_310, vid); - + vpid = fc->read_ibi_reg(fc,pid_n_reg_314); vpid.pid_n_reg_314.PID = onoff ? pid : 0x1fff; vpid.pid_n_reg_314.PID_enable_bit = onoff; @@ -136,9 +136,9 @@ static void flexcop_pid_control(struct flexcop_device *fc, int index, u16 pid,in int flexcop_pid_feed_control(struct flexcop_device *fc, struct dvb_demux_feed *dvbdmxfeed, int onoff) { int max_pid_filter = 6 + fc->has_32_hw_pid_filter*32; - + fc->feedcount += (onoff ? 1 : -1); - + /* when doing hw pid filtering, set the pid */ if (fc->pid_filtering) flexcop_pid_control(fc,dvbdmxfeed->index,dvbdmxfeed->pid,onoff); @@ -150,7 +150,7 @@ int flexcop_pid_feed_control(struct flexcop_device *fc, struct dvb_demux_feed *d flexcop_pid_group_filter(fc, 0,0); flexcop_pid_group_filter_ctrl(fc,1); } - + if (fc->stream_control) fc->stream_control(fc,1); flexcop_rcv_data_ctrl(fc,1); @@ -178,7 +178,7 @@ int flexcop_pid_feed_control(struct flexcop_device *fc, struct dvb_demux_feed *d flexcop_pid_group_filter(fc, 0,0x1fe0); flexcop_pid_group_filter_ctrl(fc,0); } - + return 0; } @@ -191,11 +191,11 @@ void flexcop_hw_filter_init(struct flexcop_device *fc) flexcop_pid_group_filter(fc, 0, 0x1fe0); flexcop_pid_group_filter_ctrl(fc,0); - + v = fc->read_ibi_reg(fc,pid_filter_308); v.pid_filter_308.EMM_filter_4 = 1; v.pid_filter_308.EMM_filter_6 = 0; fc->write_ibi_reg(fc,pid_filter_308,v); - + flexcop_null_filter_ctrl(fc, 1); } diff --git a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c index 8db1605e0..8b969edfb 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-i2c.c - flexcop internal 2Wire bus (I2C) and dvb i2c initialization - * + * * see flexcop.c for copyright information. */ #include "flexcop.h" @@ -16,10 +16,10 @@ static int flexcop_i2c_operation(struct flexcop_device *fc, flexcop_ibi_value *r r100->tw_sm_c_100.working_start = 1; deb_i2c("r100 before: %08x\n",r100->raw); - + fc->write_ibi_reg(fc, tw_sm_c_100, ibi_zero); fc->write_ibi_reg(fc, tw_sm_c_100, *r100); /* initiating i2c operation */ - + for (i = 0; i < FC_MAX_I2C_RETRIES; i++) { r = fc->read_ibi_reg(fc, tw_sm_c_100); @@ -33,7 +33,7 @@ static int flexcop_i2c_operation(struct flexcop_device *fc, flexcop_ibi_value *r deb_i2c("suffering from an i2c ack_error\n"); if (++ack_errors >= max_ack_errors) break; - + fc->write_ibi_reg(fc, tw_sm_c_100, ibi_zero); fc->write_ibi_reg(fc, tw_sm_c_100, *r100); } @@ -44,15 +44,15 @@ static int flexcop_i2c_operation(struct flexcop_device *fc, flexcop_ibi_value *r static int flexcop_i2c_read4(struct flexcop_device *fc, flexcop_ibi_value r100, u8 *buf) { - flexcop_ibi_value r104; + flexcop_ibi_value r104; int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */ ret; - + if ((ret = flexcop_i2c_operation(fc,&r100,30)) != 0) return ret; - + r104 = fc->read_ibi_reg(fc,tw_sm_c_104); - + deb_i2c("read: r100: %08x, r104: %08x\n",r100.raw,r104.raw); /* there is at least one byte, otherwise we wouldn't be here */ @@ -82,7 +82,7 @@ static int flexcop_i2c_write4(struct flexcop_device *fc, flexcop_ibi_value r100, /* write the additional i2c data before doing the actual i2c operation */ fc->write_ibi_reg(fc,tw_sm_c_104,r104); - + return flexcop_i2c_operation(fc,&r100,30); } @@ -97,7 +97,7 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs /* reading */ if (num == 2 && - msgs[0].flags == 0 && + msgs[0].flags == 0 && msgs[1].flags == I2C_M_RD && msgs[0].buf != NULL && msgs[1].buf != NULL) { @@ -109,7 +109,7 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs ret = -EINVAL; break; } - + ret = fc->i2c_request(fc, FC_WRITE, FC_I2C_PORT_DEMOD, msgs[i].addr, msgs[i].buf[0], &msgs[i].buf[1], msgs[i].len - 1); } @@ -119,7 +119,7 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs ret = num; up(&fc->i2c_sem); - + return ret; } @@ -135,7 +135,7 @@ int flexcop_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op, r100.tw_sm_c_100.chipaddr = chipaddr; r100.tw_sm_c_100.twoWS_rw = op; r100.tw_sm_c_100.twoWS_port_reg = port; - + while (len != 0) { bytes_to_transfer = len > 4 ? 4 : len; @@ -158,7 +158,7 @@ int flexcop_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op, return 0; } /* exported for PCI i2c */ -EXPORT_SYMBOL(flexcop_i2c_request); +EXPORT_SYMBOL(flexcop_i2c_request); static u32 flexcop_i2c_func(struct i2c_adapter *adapter) { @@ -177,7 +177,7 @@ int flexcop_i2c_init(struct flexcop_device *fc) int ret; sema_init(&fc->i2c_sem,1); - + memset(&fc->i2c_adap, 0, sizeof(struct i2c_adapter)); strncpy(fc->i2c_adap.name, "B2C2 FlexCop device",I2C_NAME_SIZE); @@ -190,7 +190,7 @@ int flexcop_i2c_init(struct flexcop_device *fc) if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0) return ret; - + fc->init_state |= FC_STATE_I2C_INIT; return 0; } @@ -199,6 +199,6 @@ void flexcop_i2c_exit(struct flexcop_device *fc) { if (fc->init_state & FC_STATE_I2C_INIT) i2c_del_adapter(&fc->i2c_adap); - + fc->init_state &= ~FC_STATE_I2C_INIT; } diff --git a/linux/drivers/media/dvb/b2c2/flexcop-misc.c b/linux/drivers/media/dvb/b2c2/flexcop-misc.c index 986ffcac4..19e06da46 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-misc.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-misc.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-misc.c - miscellaneous functions. - * + * * see flexcop.c for copyright information. */ #include "flexcop.h" @@ -28,7 +28,7 @@ void flexcop_determine_revision(struct flexcop_device *fc) err("unkown FlexCop Revision: %x. Please report the linux-dvb@linuxtv.org.",v.misc_204.Rev_N_sig_revision_hi); break; } - + if ((fc->has_32_hw_pid_filter = v.misc_204.Rev_N_sig_caps)) deb_info("this FlexCop has the additional 32 hardware pid filter.\n"); else @@ -62,5 +62,5 @@ void flexcop_device_name(struct flexcop_device *fc,const char *prefix,const { info("%s '%s' at the '%s' bus controlled by a '%s' %s",prefix, flexcop_device_names[fc->dev_type],flexcop_bus_names[fc->bus_type], - flexcop_revision_names[fc->rev],suffix); + flexcop_revision_names[fc->rev],suffix); } diff --git a/linux/drivers/media/dvb/b2c2/flexcop-pci.c b/linux/drivers/media/dvb/b2c2/flexcop-pci.c index cea47437a..cde8c67b7 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-pci.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-pci.c - covers the PCI part including DMA transfers. - * + * * see flexcop.c for copyright information. */ @@ -41,7 +41,7 @@ struct flexcop_pci { #define FC_PCI_INIT 0x01 #define FC_PCI_DMA_INIT 0x02 int init_state; - + void __iomem *io_mem; u32 irq; /* buffersize (at least for DMA1, need to be % 188 == 0, @@ -63,19 +63,19 @@ static flexcop_ibi_value flexcop_pci_read_ibi_reg (struct flexcop_device *fc, fl struct flexcop_pci *fc_pci = fc->bus_specific; flexcop_ibi_value v; v.raw = readl(fc_pci->io_mem + r); - + if (lastrreg != r || lastrval != v.raw) { lastrreg = r; lastrval = v.raw; deb_reg("new rd: %3x: %08x\n",r,v.raw); } - + return v; } static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_register r, flexcop_ibi_value v) { struct flexcop_pci *fc_pci = fc->bus_specific; - + if (lastwreg != r || lastwval != v.raw) { lastwreg = r; lastwval = v.raw; deb_reg("new wr: %3x: %08x\n",r,v.raw); @@ -107,17 +107,17 @@ static irqreturn_t flexcop_pci_irq(int irq, void *dev_id, struct pt_regs *regs) flexcop_pass_dmx_packets(fc_pci->fc_dev,fc_pci->dma[0].cpu_addr0,fc_pci->dma[0].size / 188); else flexcop_pass_dmx_packets(fc_pci->fc_dev,fc_pci->dma[0].cpu_addr1,fc_pci->dma[0].size / 188); - + deb_irq("page change to page: %d\n",!fc_pci->active_dma1_addr); fc_pci->active_dma1_addr = !fc_pci->active_dma1_addr; } else if (v.irq_20c.DMA1_Timer_Status == 1) { - /* for the timer IRQ we only can use buffer dmx feeding, because we don't have + /* for the timer IRQ we only can use buffer dmx feeding, because we don't have * complete TS packets when reading from the DMA memory */ dma_addr_t cur_addr = fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2; u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0; - /* buffer end was reached, restarted from the beginning + /* buffer end was reached, restarted from the beginning * pass the data from last_cur_pos to the buffer end to the demux */ if (cur_pos < fc_pci->last_dma1_cur_pos) { @@ -125,8 +125,8 @@ static irqreturn_t flexcop_pci_irq(int irq, void *dev_id, struct pt_regs *regs) fc_pci->dma[0].cpu_addr0 + fc_pci->last_dma1_cur_pos, (fc_pci->dma[0].size*2 - 1) - fc_pci->last_dma1_cur_pos); fc_pci->last_dma1_cur_pos = 0; - } - + } + if (cur_pos > fc_pci->last_dma1_cur_pos) { flexcop_pass_dmx_data(fc_pci->fc_dev, fc_pci->dma[0].cpu_addr0 + fc_pci->last_dma1_cur_pos, @@ -140,7 +140,7 @@ static irqreturn_t flexcop_pci_irq(int irq, void *dev_id, struct pt_regs *regs) * the data book is wrong, or I'm unable to read it correctly */ /* if (v.irq_20c.DMA1_Size_IRQ_Status == 1) { packet counter */ - + return IRQ_HANDLED; } @@ -159,10 +159,10 @@ static int flexcop_pci_stream_control(struct flexcop_device *fc, int onoff) fc_pci->active_dma1_addr = 0; flexcop_dma_control_size_irq(fc,FC_DMA_1,1); } - + /* flexcop_dma_config_packet_count(fc,FC_DMA_1,0xc0); flexcop_dma_control_packet_irq(fc,FC_DMA_1,1); */ - + deb_irq("irqs enabled\n"); } else { if (fc_pci->fc_dev->pid_filtering) @@ -173,7 +173,7 @@ static int flexcop_pci_stream_control(struct flexcop_device *fc, int onoff) // flexcop_dma_control_packet_irq(fc,FC_DMA_1,0); deb_irq("irqs disabled\n"); } - + return 0; } @@ -188,7 +188,7 @@ static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci) flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_MEDIA | FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1); flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_CAO | FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2); - + fc_pci->init_state |= FC_PCI_DMA_INIT; goto success; dma1_free: @@ -211,7 +211,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) { int ret; u8 card_rev; - + pci_read_config_byte(fc_pci->pdev, PCI_CLASS_REVISION, &card_rev); info("card revision %x", card_rev); @@ -225,7 +225,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) if ((ret = pci_request_regions(fc_pci->pdev, DRIVER_NAME)) != 0) goto err_pci_disable_device; - + fc_pci->io_mem = pci_iomap(fc_pci->pdev, 0, 0x800); if (!fc_pci->io_mem) { @@ -233,13 +233,13 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) ret = -EIO; goto err_pci_release_regions; } - + pci_set_drvdata(fc_pci->pdev, fc_pci); if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_irq, - SA_SHIRQ, DRIVER_NAME, fc_pci)) != 0) + SA_SHIRQ, DRIVER_NAME, fc_pci)) != 0) goto err_pci_iounmap; - + fc_pci->init_state |= FC_PCI_INIT; goto success; @@ -250,7 +250,7 @@ err_pci_release_regions: pci_release_regions(fc_pci->pdev); err_pci_disable_device: pci_disable_device(fc_pci->pdev); - + success: return ret; } @@ -287,14 +287,14 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e fc->write_ibi_reg = flexcop_pci_write_ibi_reg; fc->i2c_request = flexcop_i2c_request; fc->get_mac_addr = flexcop_eeprom_check_mac_addr; - + fc->stream_control = flexcop_pci_stream_control; fc->pid_filtering = enable_pid_filtering; fc->bus_type = FC_PCI; fc->dev = &pdev->dev; - + /* bus specific part */ fc_pci->pdev = pdev; if ((ret = flexcop_pci_init(fc_pci)) != 0) @@ -303,7 +303,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e /* init flexcop */ if ((ret = flexcop_device_initialize(fc)) != 0) goto err_pci_exit; - + /* init dma */ if ((ret = flexcop_pci_dma_init(fc_pci)) != 0) goto err_fc_exit; diff --git a/linux/drivers/media/dvb/b2c2/flexcop-reg.h b/linux/drivers/media/dvb/b2c2/flexcop-reg.h index 0a7637792..41835c528 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-reg.h +++ b/linux/drivers/media/dvb/b2c2/flexcop-reg.h @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-reg.h - register abstraction for FlexCopII, FlexCopIIb and FlexCopIII - * + * * see flexcop.c for copyright information. */ #ifndef __FLEXCOP_REG_H__ @@ -39,7 +39,7 @@ extern const char *flexcop_device_names[]; /* flexcop_ibi_reg - a huge union representing the register structure */ typedef union { u32 raw; - + /* DMA 0x000 to 0x01c * DMA1 0x000 to 0x00c * DMA2 0x010 to 0x01c @@ -52,8 +52,8 @@ typedef union { struct { u32 DMA_maxpackets : 8; /* (remapped) PCI DMA1 Packet Count Interrupt. This variable - is able to be read and written while bit(1) of register - 0x00c (remap_enable) is set. This variable represents + is able to be read and written while bit(1) of register + 0x00c (remap_enable) is set. This variable represents the number of packets that will be transmitted to the PCI host using PCI DMA1 before an interrupt to the PCI is asserted. This functionality may be enabled using bit(20) @@ -74,7 +74,7 @@ typedef union { } dma_0x4_write; struct { - u32 unused : 2; + u32 unused : 2; u32 dma_cur_addr :30; /* current physical host memory address pointer for DMA */ } dma_0x8; @@ -83,7 +83,7 @@ typedef union { u32 remap_enable : 1; /* remap enable for 0x0x4(7:0) */ u32 dma_address1 :30; /* Physical/virtual address 1 on DMA */ } dma_0xc; - + /* Two-wire Serial Master and Clock 0x100-0x110 */ struct { // u32 slave_transmitter : 1; /* ???*/ @@ -91,15 +91,15 @@ typedef union { u32 reserved1 : 1; u32 baseaddr : 8; /* address of the location of the read/write operation */ u32 data1_reg : 8; /* first byte in two-line serial read/write operation */ - u32 working_start : 1; /* when doing a write operation this indicator is 0 when ready + u32 working_start : 1; /* when doing a write operation this indicator is 0 when ready * set to 1 when doing a write operation */ u32 twoWS_rw : 1; /* read/write indicator (1 = read, 0 write) */ u32 total_bytes : 2; /* number of data bytes in each two-line serial transaction (0 = 1 byte, 11 = 4byte)*/ u32 twoWS_port_reg : 2; /* port selection: 01 - Front End/Demod, 10 - EEPROM, 11 - Tuner */ - u32 no_base_addr_ack_error : 1; /* writing: write-req: frame is produced w/o baseaddr, read-req: read-cycles w/o - * preceding address assignment write frame + u32 no_base_addr_ack_error : 1; /* writing: write-req: frame is produced w/o baseaddr, read-req: read-cycles w/o + * preceding address assignment write frame * ACK_ERROR = 1 when no ACK from slave in the last transaction */ - u32 st_done : 1; /* indicator for transaction is done */ + u32 st_done : 1; /* indicator for transaction is done */ } tw_sm_c_100; struct { @@ -111,11 +111,11 @@ typedef union { u32 unused : 6; } tw_sm_c_104; -/* Clock. The register allows the FCIII to convert an incoming Master clock +/* Clock. The register allows the FCIII to convert an incoming Master clock * (MCLK) signal into a lower frequency clock through the use of a LowCounter * (TLO) and a High- Counter (THI). The time counts for THI and TLO are * measured in MCLK; each count represents 4 MCLK input clock cycles. - * + * * The default output for port #1 is set for Front End Demod communication. (0x108) * The default output for port #2 is set for EEPROM communication. (0x10c) * The default output for port #3 is set for Tuner communication. (0x110) @@ -126,21 +126,21 @@ typedef union { u32 tlo1 : 5; /* Tlo for port #1 (def: 11100b; 28) */ u32 reserved2 :19; } tw_sm_c_108; - + struct { u32 thi1 : 6; /* Thi for port #2 (def: 111001b; 57) */ u32 reserved1 : 2; u32 tlo1 : 5; /* Tlo for port #2 (def: 11100b; 28) */ u32 reserved2 :19; } tw_sm_c_10c; - + struct { u32 thi1 : 6; /* Thi for port #3 (def: 111001b; 57) */ u32 reserved1 : 2; u32 tlo1 : 5; /* Tlo for port #3 (def: 11100b; 28) */ u32 reserved2 :19; } tw_sm_c_110; - + /* LNB Switch Frequency 0x200 * Clock that creates the LNB switch tone. The default is set to have a fixed * low output (not oscillating) to the LNB_CTL line. @@ -161,7 +161,7 @@ typedef union { u32 ACPI3_sig : 1; /* turn of power of the complete satelite receiver board (except FCIII) */ u32 LNB_L_H_sig : 1; /* low or high voltage for LNB. (0 = low, 1 = high) */ u32 Per_reset_sig : 1; /* misc. init reset (default: 1), to reset set to low and back to high */ - u32 reserved :20; + u32 reserved :20; u32 Rev_N_sig_revision_hi : 4;/* 0xc in case of FCIII */ u32 Rev_N_sig_reserved1 : 2; u32 Rev_N_sig_caps : 1; /* if 1, FCIII has 32 PID- and MAC-filters and is capable of IP multicast */ @@ -175,17 +175,17 @@ typedef union { u32 Stream2_filter_sig : 1; /* Stream2 PID filtering */ u32 PCR_filter_sig : 1; /* PCR PID filter */ u32 PMT_filter_sig : 1; /* PMT PID filter */ - + u32 EMM_filter_sig : 1; /* EMM PID filter */ u32 ECM_filter_sig : 1; /* ECM PID filter */ u32 Null_filter_sig : 1; /* Filters null packets, PID=0x1fff. */ u32 Mask_filter_sig : 1; /* mask PID filter */ - + u32 WAN_Enable_sig : 1; /* WAN output line through V8 memory space is activated. */ u32 WAN_CA_Enable_sig : 1; /* not in FCIII */ u32 CA_Enable_sig : 1; /* not in FCIII */ u32 SMC_Enable_sig : 1; /* CI stream data (CAI) goes directly to the smart card intf (opposed IBI 0x600 or SC-cmd buf). */ - + u32 Per_CA_Enable_sig : 1; /* not in FCIII */ u32 Multi2_Enable_sig : 1; /* ? */ u32 MAC_filter_Mode_sig : 1; /* (MAC_filter_enable) Globally enables MAC filters for Net PID filteres. */ @@ -193,24 +193,24 @@ typedef union { examine and process packets according to all other (individual) PID filtering controls. If it a zero, no packet processing of any kind will take place. All data from the tuner will be thrown away. */ - - u32 DMA1_IRQ_Enable_sig : 1; /* When set, a DWORD counter is enabled on PCI DMA1 that asserts the PCI + + u32 DMA1_IRQ_Enable_sig : 1; /* When set, a DWORD counter is enabled on PCI DMA1 that asserts the PCI * interrupt after the specified count for filling the buffer. */ - u32 DMA1_Timer_Enable_sig : 1; /* When set, a timer is enabled on PCI DMA1 that asserts the PCI interrupt + u32 DMA1_Timer_Enable_sig : 1; /* When set, a timer is enabled on PCI DMA1 that asserts the PCI interrupt after a specified amount of time. */ u32 DMA2_IRQ_Enable_sig : 1; /* same as DMA1_IRQ_Enable_sig but for DMA2 */ u32 DMA2_Timer_Enable_sig : 1; /* same as DMA1_Timer_Enable_sig but for DMA2 */ - + u32 DMA1_Size_IRQ_Enable_sig : 1; /* When set, a packet count detector is enabled on PCI DMA1 that asserts the PCI interrupt. */ u32 DMA2_Size_IRQ_Enable_sig : 1; /* When set, a packet count detector is enabled on PCI DMA2 that asserts the PCI interrupt. */ u32 Mailbox_from_V8_Enable_sig: 1; /* When set, writes to the mailbox register produce an interrupt to the PCI host to indicate that mailbox data is available. */ - u32 unused : 9; + u32 unused : 9; } ctrl_208; /* General status. When a PCI interrupt occurs, this register is read to - * discover the reason for the interrupt. + * discover the reason for the interrupt. */ struct { u32 DMA1_IRQ_Status : 1; /* When set(1) the DMA1 counter had generated an IRQ. Read Only. */ @@ -230,9 +230,9 @@ typedef union { /* Software reset register */ struct { - u32 reset_blocks : 8; /* Enabled when Block_reset_enable = 0xB2 and 0x208 bits 15:8 = 0x00. - Each bit location represents a 0x100 block of registers. Writing - a one in a bit location resets that block of registers and the logic + u32 reset_blocks : 8; /* Enabled when Block_reset_enable = 0xB2 and 0x208 bits 15:8 = 0x00. + Each bit location represents a 0x100 block of registers. Writing + a one in a bit location resets that block of registers and the logic that it controls. */ u32 Block_reset_enable : 8; /* This variable is set to 0xB2 when the register is written. */ u32 Special_controls :16; /* Asserts Reset_V8 => 0xC258; Turns on pci encryption => 0xC25A; @@ -241,10 +241,10 @@ typedef union { } sw_reset_210; struct { - u32 vuart_oe_sig : 1; /* When clear, the V8 processor has sole control of the serial UART - (RS-232 Smart Card interface). When set, the IBI interface + u32 vuart_oe_sig : 1; /* When clear, the V8 processor has sole control of the serial UART + (RS-232 Smart Card interface). When set, the IBI interface defined by register 0x600 controls the serial UART. */ - u32 v2WS_oe_sig : 1; /* When clear, the V8 processor has direct control of the Two-line + u32 v2WS_oe_sig : 1; /* When clear, the V8 processor has direct control of the Two-line Serial Master EEPROM target. When set, the Two-line Serial Master EEPROM target interface is controlled by IBI register 0x100. */ u32 halt_V8_sig : 1; /* When set, contiguous wait states are applied to the V8-space @@ -257,7 +257,7 @@ typedef union { stream into parallel data before downstream processing otherwise interprets the data. */ u32 unused1 : 3; - u32 polarity_PS_CLK_sig: 1; /* This signal is used to invert the input polarity of the tranport + u32 polarity_PS_CLK_sig: 1; /* This signal is used to invert the input polarity of the tranport stream CLOCK signal before any processing occurs on the transport stream within FlexCop3. */ u32 polarity_PS_VALID_sig: 1; /* This signal is used to invert the input polarity of the tranport @@ -271,7 +271,7 @@ typedef union { stream within FlexCop3. */ u32 unused2 :20; } misc_214; - + /* Mailbox from V8 to host */ struct { u32 Mailbox_from_V8 :32; /* When this register is written by either the V8 processor or by an @@ -279,14 +279,14 @@ typedef union { that mailbox data is available. Reading register 20c will clear the IRQ. */ } mbox_v8_to_host_218; - + /* Mailbox from host to v8 Mailbox_to_V8 * Mailbox_to_V8 mailbox storage register * used to send messages from PCI to V8. Writing to this register will send an * IRQ to the V8. Then it can read the data from here. Reading this register * will clear the IRQ. If the V8 is halted and bit 31 of this register is set, * then this register is used instead as a direct interface to access the - * V8space memory. + * V8space memory. */ struct { u32 sysramaccess_data : 8; /* Data byte written or read from the specified address in V8 SysRAM. */ @@ -321,7 +321,7 @@ typedef union { u32 PMT_trans : 1; /* When set, Tables/CAI translation will take place for these packets. */ u32 reserved : 2; } pid_filter_304; - + struct { u32 EMM_PID :13; /* EMM PID filter value. Primary use is Entitlement Management Messaging for conditional access-related data. */ @@ -343,22 +343,22 @@ typedef union { u32 Group_mask :13; /* Mask value used in logical "and" equation that defines group filtering */ u32 unused2 : 3; } pid_filter_30c_ext_ind_0_7; - + struct { u32 net_master_read :17; u32 unused :15; } pid_filter_30c_ext_ind_1; - + struct { u32 net_master_write :17; u32 unused :15; } pid_filter_30c_ext_ind_2; - + struct { u32 next_net_master_write :17; u32 unused :15; } pid_filter_30c_ext_ind_3; - + struct { u32 unused1 : 1; u32 state_write :10; @@ -366,12 +366,12 @@ typedef union { u32 stack_read :10; u32 reserved2 : 5; /* default: 00100 */ } pid_filter_30c_ext_ind_4; - + struct { u32 stack_cnt :10; u32 unused :22; } pid_filter_30c_ext_ind_5; - + struct { u32 pid_fsm_save_reg0 : 2; u32 pid_fsm_save_reg1 : 2; @@ -390,9 +390,9 @@ typedef union { representing one of 32 internal PIDn registers as well as its corresponding internal MAC_lown register. */ u32 extra_index_reg : 3; /* This vector is used to select between sets of debug signals routed to register 0x30c. */ - u32 AB_select : 1; /* Used in conjunction with 0x31c. read/write to the MAC_highA or MAC_highB register + u32 AB_select : 1; /* Used in conjunction with 0x31c. read/write to the MAC_highA or MAC_highB register 0=MAC_highB register, 1=MAC_highA */ - u32 pass_alltables : 1; /* 1=Net packets are not filtered against the Network Table ID found in register 0x400. + u32 pass_alltables : 1; /* 1=Net packets are not filtered against the Network Table ID found in register 0x400. All types of networks (DVB, ATSC, ISDB) are passed. */ u32 unused :22; } index_reg_310; @@ -448,7 +448,7 @@ typedef union { u32 MAC3 : 8; u32 MAC6 : 8; } mac_address_418; - + struct { u32 MAC7 : 8; u32 MAC8 : 8; @@ -492,7 +492,7 @@ typedef union { u32 pi_wait_n : 1; u32 pi_busy_n : 1; } pi_608; - + struct { u32 PID :13; u32 key_enable : 1; @@ -540,7 +540,7 @@ typedef union { u32 reserved2 : 6; u32 cao_cnt : 4; } cao_buf_reg_70c; - + struct { u32 media_read :11; u32 reserved1 : 5; @@ -646,13 +646,13 @@ typedef enum { dma2_014 = 0x014, dma2_018 = 0x018, dma2_01c = 0x01c, - + tw_sm_c_100 = 0x100, tw_sm_c_104 = 0x104, tw_sm_c_108 = 0x108, tw_sm_c_10c = 0x10c, tw_sm_c_110 = 0x110, - + lnb_switch_freq_200 = 0x200, misc_204 = 0x204, ctrl_208 = 0x208, @@ -676,12 +676,12 @@ typedef enum { card_id_40c = 0x40c, mac_address_418 = 0x418, mac_address_41c = 0x41c, - + ci_600 = 0x600, pi_604 = 0x604, pi_608 = 0x608, dvb_reg_60c = 0x60c, - + sram_ctrl_reg_700 = 0x700, net_buf_reg_704 = 0x704, cai_buf_reg_708 = 0x708, diff --git a/linux/drivers/media/dvb/b2c2/flexcop-sram.c b/linux/drivers/media/dvb/b2c2/flexcop-sram.c index 5eb459f6e..01570ec80 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-sram.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-sram.c @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop-sram.c - functions for controlling the SRAM. - * + * * see flexcop.c for copyright information. */ #include "flexcop.h" @@ -33,7 +33,7 @@ int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, f flexcop_ibi_value v; v = fc->read_ibi_reg(fc,sram_dest_reg_714); - + if (fc->rev != FLEXCOP_III && target == FC_SRAM_DEST_TARGET_FC3_CA) { err("SRAM destination target to available on FlexCopII(b)\n"); return -EINVAL; @@ -49,10 +49,10 @@ int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, f v.sram_dest_reg_714.CAO_Dest = target; if (dest & FC_SRAM_DEST_MEDIA) v.sram_dest_reg_714.MEDIA_Dest = target; - + fc->write_ibi_reg(fc,sram_dest_reg_714,v); udelay(1000); /* TODO delay really necessary */ - + return 0; } EXPORT_SYMBOL(flexcop_sram_set_dest); @@ -69,7 +69,7 @@ void flexcop_sram_ctrl(struct flexcop_device *fc, int usb_wan, int sramdma, int v.sram_dest_reg_714.ctrl_usb_wan = usb_wan; v.sram_dest_reg_714.ctrl_sramdma = sramdma; v.sram_dest_reg_714.ctrl_maximumfill = maximumfill; - fc->write_ibi_reg(fc,sram_dest_reg_714,v); + fc->write_ibi_reg(fc,sram_dest_reg_714,v); } EXPORT_SYMBOL(flexcop_sram_ctrl); diff --git a/linux/drivers/media/dvb/b2c2/flexcop.h b/linux/drivers/media/dvb/b2c2/flexcop.h index 9690c6d31..caa343a97 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop.h +++ b/linux/drivers/media/dvb/b2c2/flexcop.h @@ -2,7 +2,7 @@ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III * * flexcop.h - private header file for all flexcop-chip-source files. - * + * * see flexcop.c for copyright information. */ #ifndef __FLEXCOP_H__ diff --git a/linux/drivers/media/dvb/b2c2/skystar2.c b/linux/drivers/media/dvb/b2c2/skystar2.c index 0f0b69635..2e025c1c5 100644 --- a/linux/drivers/media/dvb/b2c2/skystar2.c +++ b/linux/drivers/media/dvb/b2c2/skystar2.c @@ -235,7 +235,7 @@ static void fixchipaddr(u32 device, u32 bus, u32 addr, u32 *ret) { if (device == 0x20000000) *ret = bus | ((addr >> 8) & 3); - else + else *ret = bus; } @@ -2329,7 +2329,7 @@ static int nxt2002_request_firmware(struct dvb_frontend* fe, const struct firmwa return request_firmware(fw, name, &adapter->pdev->dev); } - + static struct nxt2002_config samsung_tbmv_config = { .demod_address = 0x0A, @@ -2418,7 +2418,7 @@ static void frontend_init(struct adapter *skystar2) switch(skystar2->pdev->device) { case 0x2103: // Technisat Skystar2 OR Technisat Airstar2 (DVB-T or ATSC) - // Attempt to load the Nextwave nxt2002 for ATSC support + // Attempt to load the Nextwave nxt2002 for ATSC support skystar2->fe = nxt2002_attach(&samsung_tbmv_config, &skystar2->i2c_adap); if (skystar2->fe != NULL) { skystar2->fe_sleep = skystar2->fe->ops->sleep; |