diff options
author | Steven Toth <stoth@hauppauge.com> | 2007-09-04 20:32:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:08:21 -0400 |
commit | 2e52f215be1b3a0337788c8d3345bdf5e3894e19 (patch) | |
tree | bbb9dc7998095a301137a612e5488d7b9f111dab /drivers | |
parent | f29379c3619d85e0bdc0ee30c8199f7f66866fcf (diff) |
V4L/DVB (6170): cx23885: General cleanup of old code
Removed unused code.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 1 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-core.c | 40 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-i2c.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-reg.h | 9 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 1 |
6 files changed, 4 insertions, 54 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index e6d34fb5b943..09d4376c2e05 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -172,7 +172,6 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
172 | 172 | ||
173 | tveeprom_hauppauge_analog(&dev->i2c_bus[0].i2c_client, &tv, eeprom_data); | 173 | tveeprom_hauppauge_analog(&dev->i2c_bus[0].i2c_client, &tv, eeprom_data); |
174 | 174 | ||
175 | |||
176 | /* Make sure we support the board model */ | 175 | /* Make sure we support the board model */ |
177 | switch (tv.model) | 176 | switch (tv.model) |
178 | { | 177 | { |
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index 1148d684188a..7a1c4672041d 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c | |||
@@ -368,11 +368,13 @@ void cx23885_wakeup(struct cx23885_tsport *port, | |||
368 | break; | 368 | break; |
369 | buf = list_entry(q->active.next, | 369 | buf = list_entry(q->active.next, |
370 | struct cx23885_buffer, vb.queue); | 370 | struct cx23885_buffer, vb.queue); |
371 | |||
371 | /* count comes from the hw and is is 16bit wide -- | 372 | /* count comes from the hw and is is 16bit wide -- |
372 | * this trick handles wrap-arounds correctly for | 373 | * this trick handles wrap-arounds correctly for |
373 | * up to 32767 buffers in flight... */ | 374 | * up to 32767 buffers in flight... */ |
374 | if ((s16) (count - buf->count) < 0) | 375 | if ((s16) (count - buf->count) < 0) |
375 | break; | 376 | break; |
377 | |||
376 | do_gettimeofday(&buf->vb.ts); | 378 | do_gettimeofday(&buf->vb.ts); |
377 | dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, | 379 | dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, |
378 | count, buf->count); | 380 | count, buf->count); |
@@ -910,7 +912,6 @@ int cx23885_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
910 | /* write and jump need and extra dword */ | 912 | /* write and jump need and extra dword */ |
911 | instructions = fields * (1 + ((bpl + padding) * lines) / PAGE_SIZE + lines); | 913 | instructions = fields * (1 + ((bpl + padding) * lines) / PAGE_SIZE + lines); |
912 | instructions += 2; | 914 | instructions += 2; |
913 | //if ((rc = btcx_riscmem_alloc(pci,risc,instructions*8)) < 0) | ||
914 | if ((rc = btcx_riscmem_alloc(pci,risc,instructions*12)) < 0) | 915 | if ((rc = btcx_riscmem_alloc(pci,risc,instructions*12)) < 0) |
915 | return rc; | 916 | return rc; |
916 | 917 | ||
@@ -945,7 +946,6 @@ int cx23885_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
945 | instructions = 1 + (bpl * lines) / PAGE_SIZE + lines; | 946 | instructions = 1 + (bpl * lines) / PAGE_SIZE + lines; |
946 | instructions += 1; | 947 | instructions += 1; |
947 | 948 | ||
948 | //if ((rc = btcx_riscmem_alloc(pci,risc,instructions*8)) < 0) | ||
949 | if ((rc = btcx_riscmem_alloc(pci,risc,instructions*12)) < 0) | 949 | if ((rc = btcx_riscmem_alloc(pci,risc,instructions*12)) < 0) |
950 | return rc; | 950 | return rc; |
951 | 951 | ||
@@ -970,7 +970,6 @@ int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
970 | 970 | ||
971 | /* write risc instructions */ | 971 | /* write risc instructions */ |
972 | rp = risc->cpu; | 972 | rp = risc->cpu; |
973 | //*(rp++) = cpu_to_le32(RISC_WRITECR | RISC_IRQ2 | RISC_IMM); | ||
974 | *(rp++) = cpu_to_le32(RISC_WRITECR | RISC_IRQ2); | 973 | *(rp++) = cpu_to_le32(RISC_WRITECR | RISC_IRQ2); |
975 | *(rp++) = cpu_to_le32(reg); | 974 | *(rp++) = cpu_to_le32(reg); |
976 | *(rp++) = cpu_to_le32(value); | 975 | *(rp++) = cpu_to_le32(value); |
@@ -1018,16 +1017,11 @@ static int cx23885_start_dma(struct cx23885_tsport *port, | |||
1018 | return -EINVAL; | 1017 | return -EINVAL; |
1019 | } | 1018 | } |
1020 | 1019 | ||
1021 | // FIXME: review the need for these two lines | ||
1022 | dprintk( 1, "%s() doing .dvb\n", __FUNCTION__); | ||
1023 | udelay(100); | 1020 | udelay(100); |
1024 | 1021 | ||
1025 | cx_write(port->reg_hw_sop_ctrl, 0x47 << 16 | 188 << 4); | 1022 | cx_write(port->reg_hw_sop_ctrl, 0x47 << 16 | 188 << 4); |
1026 | cx_write(port->reg_ts_clk_en, port->ts_clk_en_val); | 1023 | cx_write(port->reg_ts_clk_en, port->ts_clk_en_val); |
1027 | 1024 | ||
1028 | // FIXME: review the need for this | ||
1029 | cx_write(GPIO2, 0x00); | ||
1030 | |||
1031 | switch (dev->board) { | 1025 | switch (dev->board) { |
1032 | case CX23885_BOARD_HAUPPAUGE_HVR1250: | 1026 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
1033 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: | 1027 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
@@ -1037,7 +1031,6 @@ static int cx23885_start_dma(struct cx23885_tsport *port, | |||
1037 | __FUNCTION__); | 1031 | __FUNCTION__); |
1038 | break; | 1032 | break; |
1039 | default: | 1033 | default: |
1040 | // FIXME | ||
1041 | printk(KERN_ERR "%s() error, default case", __FUNCTION__ ); | 1034 | printk(KERN_ERR "%s() error, default case", __FUNCTION__ ); |
1042 | } | 1035 | } |
1043 | 1036 | ||
@@ -1058,39 +1051,11 @@ static int cx23885_start_dma(struct cx23885_tsport *port, | |||
1058 | cx_set(PCI_INT_MSK, dev->pci_irqmask | port->pci_irqmask); | 1051 | cx_set(PCI_INT_MSK, dev->pci_irqmask | port->pci_irqmask); |
1059 | break; | 1052 | break; |
1060 | default: | 1053 | default: |
1061 | // FIXME: generate a sensible switch-default message | ||
1062 | printk(KERN_ERR "%s() error, default case", __FUNCTION__ ); | 1054 | printk(KERN_ERR "%s() error, default case", __FUNCTION__ ); |
1063 | } | 1055 | } |
1064 | 1056 | ||
1065 | dprintk(1, "%s() Register Dump\n", __FUNCTION__); | ||
1066 | dprintk(1, "%s() set port ts_int_msk, now %x\n", __FUNCTION__, cx_read(port->reg_ts_int_msk) ); | ||
1067 | dprintk(1, "%s() DEV_CNTRL2 0x%08x\n", __FUNCTION__, cx_read(DEV_CNTRL2) ); | ||
1068 | dprintk(1, "%s() PCI_INT_MSK 0x%08x\n", __FUNCTION__, cx_read(PCI_INT_MSK) ); | ||
1069 | dprintk(1, "%s() VID_A_INT_MSK 0x%08x\n", __FUNCTION__, cx_read(VID_A_INT_MSK) ); | ||
1070 | dprintk(1, "%s() VID_B_INT_MSK 0x%08x\n", __FUNCTION__, cx_read(VID_B_INT_MSK) ); | ||
1071 | dprintk(1, "%s() VID_C_INT_MSK 0x%08x\n", __FUNCTION__, cx_read(VID_C_INT_MSK) ); | ||
1072 | dprintk(1, "%s() VID_A_DMA_CTL 0x%08x\n", __FUNCTION__, cx_read(VID_A_DMA_CTL) ); | ||
1073 | dprintk(1, "%s() VID_B_DMA_CTL 0x%08x\n", __FUNCTION__, cx_read(VID_B_DMA_CTL) ); | ||
1074 | dprintk(1, "%s() VID_C_DMA_CTL 0x%08x\n", __FUNCTION__, cx_read(VID_C_DMA_CTL) ); | ||
1075 | dprintk(1, "%s() AUD_INT_INT_MSK 0x%08x\n", __FUNCTION__, cx_read(AUDIO_INT_INT_MSK) ); | ||
1076 | dprintk(1, "%s() AUD_INT_DMA_CTL 0x%08x\n", __FUNCTION__, cx_read(AUD_INT_DMA_CTL) ); | ||
1077 | dprintk(1, "%s() AUD_EXT_INT_MSK 0x%08x\n", __FUNCTION__, cx_read(AUDIO_EXT_INT_MSK) ); | ||
1078 | dprintk(1, "%s() AUD_EXT_DMA_CTL 0x%08x\n", __FUNCTION__, cx_read(AUD_EXT_DMA_CTL) ); | ||
1079 | |||
1080 | cx_set(DEV_CNTRL2, (1<<5)); /* Enable RISC controller */ | 1057 | cx_set(DEV_CNTRL2, (1<<5)); /* Enable RISC controller */ |
1081 | 1058 | ||
1082 | dprintk(1, "%s() set dev_cntrl2, now %x\n", __FUNCTION__, cx_read(DEV_CNTRL2) ); | ||
1083 | dprintk(1, "%s() VID_C_DMA_CTL , now %x\n", __FUNCTION__, cx_read(port->reg_dma_ctl) ); | ||
1084 | dprintk(1, "%s() VID_C_DMA_CTL , now %x\n", __FUNCTION__, cx_read(VID_C_DMA_CTL) ); | ||
1085 | dprintk(1, "%s() PAD_CTRL %x\n", __FUNCTION__, cx_read(PAD_CTRL) ); | ||
1086 | dprintk(1, "%s() GPIO2 %x\n", __FUNCTION__, cx_read(GPIO2) ); | ||
1087 | dprintk(1, "%s() VID_C_LN_LNGTH , now %x\n", __FUNCTION__, cx_read(port->reg_lngth) ); | ||
1088 | dprintk(1, "%s() VID_C_HW_SOP_CTL, now %x\n", __FUNCTION__, cx_read(port->reg_hw_sop_ctrl) ); | ||
1089 | dprintk(1, "%s() VID_C_GEN_CTL , now %x\n", __FUNCTION__, cx_read(port->reg_gen_ctrl) ); | ||
1090 | dprintk(1, "%s() VID_C_SOP_STATUS, now %x\n", __FUNCTION__, cx_read(VID_C_SOP_STATUS) ); | ||
1091 | dprintk(1, "%s() VID_C_TS_CLK_EN , now %x\n", __FUNCTION__, cx_read(VID_C_TS_CLK_EN) ); | ||
1092 | dprintk(1, "%s() VID_C_FIFO_OVLST, now %x\n", __FUNCTION__, cx_read(VID_C_FIFO_OVFL_STAT) ); | ||
1093 | dprintk(1, "%s() VID_C_INT_MSTAT , now 0x%08x\n", __FUNCTION__, cx_read(VID_C_INT_MSTAT) ); | ||
1094 | return 0; | 1059 | return 0; |
1095 | } | 1060 | } |
1096 | 1061 | ||
@@ -1220,7 +1185,6 @@ void cx23885_buf_queue(struct cx23885_tsport *port, struct cx23885_buffer *buf) | |||
1220 | mod_timer(&cx88q->timeout, jiffies + BUFFER_TIMEOUT); | 1185 | mod_timer(&cx88q->timeout, jiffies + BUFFER_TIMEOUT); |
1221 | dprintk(1, "[%p/%d] %s - first active\n", | 1186 | dprintk(1, "[%p/%d] %s - first active\n", |
1222 | buf, buf->vb.i, __FUNCTION__); | 1187 | buf, buf->vb.i, __FUNCTION__); |
1223 | |||
1224 | } else { | 1188 | } else { |
1225 | dprintk( 1, "queue is not empty - append to active\n" ); | 1189 | dprintk( 1, "queue is not empty - append to active\n" ); |
1226 | prev = list_entry(cx88q->active.prev, struct cx23885_buffer, | 1190 | prev = list_entry(cx88q->active.prev, struct cx23885_buffer, |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 63a1dde0d17a..58ae15a99e9c 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "s5h1409.h" | 33 | #include "s5h1409.h" |
34 | #include "mt2131.h" | 34 | #include "mt2131.h" |
35 | 35 | ||
36 | static unsigned int debug = 2; | 36 | static unsigned int debug = 0; |
37 | 37 | ||
38 | #define dprintk(level,fmt, arg...) if (debug >= level) \ | 38 | #define dprintk(level,fmt, arg...) if (debug >= level) \ |
39 | printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg) | 39 | printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg) |
@@ -106,8 +106,6 @@ static struct s5h1409_config hauppauge_hvr1250_config = { | |||
106 | .status_mode = S5H1409_DEMODLOCKING | 106 | .status_mode = S5H1409_DEMODLOCKING |
107 | }; | 107 | }; |
108 | 108 | ||
109 | |||
110 | |||
111 | static struct mt2131_config hauppauge_hvr1800lp_rev2_tunerconfig = { | 109 | static struct mt2131_config hauppauge_hvr1800lp_rev2_tunerconfig = { |
112 | 0x61 | 110 | 0x61 |
113 | }; | 111 | }; |
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c index 6b49b414aebf..5572fbbbb5ae 100644 --- a/drivers/media/video/cx23885/cx23885-i2c.c +++ b/drivers/media/video/cx23885/cx23885-i2c.c | |||
@@ -130,7 +130,6 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, | |||
130 | if (cnt < msg->len-1 || !last) | 130 | if (cnt < msg->len-1 || !last) |
131 | ctrl |= I2C_NOSTOP | I2C_EXTEND; | 131 | ctrl |= I2C_NOSTOP | I2C_EXTEND; |
132 | 132 | ||
133 | //printk("addr = 0x%08x wdata = 0x%08x ctrl = 0x%08x\n", addr, wdata, ctrl); | ||
134 | cx_write(bus->reg_addr, addr); | 133 | cx_write(bus->reg_addr, addr); |
135 | cx_write(bus->reg_wdata, wdata); | 134 | cx_write(bus->reg_wdata, wdata); |
136 | cx_write(bus->reg_ctrl, ctrl); | 135 | cx_write(bus->reg_ctrl, ctrl); |
@@ -297,7 +296,6 @@ static struct i2c_adapter cx23885_i2c_adap_template = { | |||
297 | .owner = THIS_MODULE, | 296 | .owner = THIS_MODULE, |
298 | .id = I2C_HW_B_CX23885, | 297 | .id = I2C_HW_B_CX23885, |
299 | .algo = &cx23885_i2c_algo_template, | 298 | .algo = &cx23885_i2c_algo_template, |
300 | // .class = I2C_CLASS_TV_ANALOG, | ||
301 | .client_register = attach_inform, | 299 | .client_register = attach_inform, |
302 | .client_unregister = detach_inform, | 300 | .client_unregister = detach_inform, |
303 | }; | 301 | }; |
@@ -348,6 +346,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus) | |||
348 | 346 | ||
349 | strlcpy(bus->i2c_adap.name, bus->dev->name, | 347 | strlcpy(bus->i2c_adap.name, bus->dev->name, |
350 | sizeof(bus->i2c_adap.name)); | 348 | sizeof(bus->i2c_adap.name)); |
349 | |||
351 | bus->i2c_algo.data = bus; | 350 | bus->i2c_algo.data = bus; |
352 | bus->i2c_adap.algo_data = bus; | 351 | bus->i2c_adap.algo_data = bus; |
353 | i2c_add_adapter(&bus->i2c_adap); | 352 | i2c_add_adapter(&bus->i2c_adap); |
diff --git a/drivers/media/video/cx23885/cx23885-reg.h b/drivers/media/video/cx23885/cx23885-reg.h index 771b22ac2153..6527bd3b4d77 100644 --- a/drivers/media/video/cx23885/cx23885-reg.h +++ b/drivers/media/video/cx23885/cx23885-reg.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef _CX23885_REG_H_ | 22 | #ifndef _CX23885_REG_H_ |
23 | #define _CX23885_REG_H_ | 23 | #define _CX23885_REG_H_ |
24 | 24 | ||
25 | |||
26 | /* | 25 | /* |
27 | Address Map | 26 | Address Map |
28 | 0x00000000 -> 0x00009000 TX SRAM (Fifos) | 27 | 0x00000000 -> 0x00009000 TX SRAM (Fifos) |
@@ -50,8 +49,6 @@ Channel manager Data Structure entry = 20 DWORD | |||
50 | 5 InstructionQueueSize | 49 | 5 InstructionQueueSize |
51 | ... Reserved | 50 | ... Reserved |
52 | 19 Reserved | 51 | 19 Reserved |
53 | |||
54 | |||
55 | */ | 52 | */ |
56 | 53 | ||
57 | /* Risc Instructions */ | 54 | /* Risc Instructions */ |
@@ -70,15 +67,9 @@ Channel manager Data Structure entry = 20 DWORD | |||
70 | #define RISC_WRITERM 0xB0000000 | 67 | #define RISC_WRITERM 0xB0000000 |
71 | #define RISC_WRITECM 0xC0000000 | 68 | #define RISC_WRITECM 0xC0000000 |
72 | #define RISC_WRITECR 0xD0000000 | 69 | #define RISC_WRITECR 0xD0000000 |
73 | |||
74 | |||
75 | /* Do we need these? */ | ||
76 | #define RISC_WRITEC 0x50000000 | 70 | #define RISC_WRITEC 0x50000000 |
77 | #define RISC_READC 0xA0000000 | 71 | #define RISC_READC 0xA0000000 |
78 | 72 | ||
79 | /* Is this used? */ | ||
80 | #define RISC_IMM 0x00000001 | ||
81 | |||
82 | 73 | ||
83 | /* Audio and Video Core */ | 74 | /* Audio and Video Core */ |
84 | #define HOST_REG1 0x00000000 | 75 | #define HOST_REG1 0x00000000 |
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 300a97980acb..c0f4e4337351 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -245,7 +245,6 @@ struct sram_channel { | |||
245 | #define cx_set(reg,bit) cx_andor((reg),(bit),(bit)) | 245 | #define cx_set(reg,bit) cx_andor((reg),(bit),(bit)) |
246 | #define cx_clear(reg,bit) cx_andor((reg),(bit),0) | 246 | #define cx_clear(reg,bit) cx_andor((reg),(bit),0) |
247 | 247 | ||
248 | |||
249 | extern int cx23885_sram_channel_setup(struct cx23885_dev *dev, | 248 | extern int cx23885_sram_channel_setup(struct cx23885_dev *dev, |
250 | struct sram_channel *ch, | 249 | struct sram_channel *ch, |
251 | unsigned int bpl, u32 risc); | 250 | unsigned int bpl, u32 risc); |