aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-07-01 20:18:00 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 11:54:33 -0400
commit7e994302ed3fc6d209ce247ad5b6d9c2499bf7c2 (patch)
tree169130eecdc20db826bcac65fe3488d9ed3e6601 /drivers/media/video/cx23885
parentd8d12b4367e2e759f65c5f9dcb94d21ec237bbc5 (diff)
V4L/DVB (8472): cx23885: SRAM changes for the 885 and 887 silicon parts.
In a previous patch I merged both memory maps into a single struct, believing that they could be combined. We've since found problems with streaming multiple channels on the 885. I'm restoring the multiple memory map structs - in line with the windows driver. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r--drivers/media/video/cx23885/cx23885-core.c116
1 files changed, 114 insertions, 2 deletions
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
index 3ae04d6e1362..6286a9cf957e 100644
--- a/drivers/media/video/cx23885/cx23885-core.c
+++ b/drivers/media/video/cx23885/cx23885-core.c
@@ -76,7 +76,7 @@ LIST_HEAD(cx23885_devlist);
76 * 0x00010ea0 0x00010xxx Free 76 * 0x00010ea0 0x00010xxx Free
77 */ 77 */
78 78
79static struct sram_channel cx23887_sram_channels[] = { 79static struct sram_channel cx23885_sram_channels[] = {
80 [SRAM_CH01] = { 80 [SRAM_CH01] = {
81 .name = "VID A", 81 .name = "VID A",
82 .cmds_start = 0x10000, 82 .cmds_start = 0x10000,
@@ -187,6 +187,117 @@ static struct sram_channel cx23887_sram_channels[] = {
187 }, 187 },
188}; 188};
189 189
190static struct sram_channel cx23887_sram_channels[] = {
191 [SRAM_CH01] = {
192 .name = "VID A",
193 .cmds_start = 0x10000,
194 .ctrl_start = 0x105b0,
195 .cdt = 0x107b0,
196 .fifo_start = 0x40,
197 .fifo_size = 0x2800,
198 .ptr1_reg = DMA1_PTR1,
199 .ptr2_reg = DMA1_PTR2,
200 .cnt1_reg = DMA1_CNT1,
201 .cnt2_reg = DMA1_CNT2,
202 },
203 [SRAM_CH02] = {
204 .name = "ch2",
205 .cmds_start = 0x0,
206 .ctrl_start = 0x0,
207 .cdt = 0x0,
208 .fifo_start = 0x0,
209 .fifo_size = 0x0,
210 .ptr1_reg = DMA2_PTR1,
211 .ptr2_reg = DMA2_PTR2,
212 .cnt1_reg = DMA2_CNT1,
213 .cnt2_reg = DMA2_CNT2,
214 },
215 [SRAM_CH03] = {
216 .name = "TS1 B",
217 .cmds_start = 0x100A0,
218 .ctrl_start = 0x10630,
219 .cdt = 0x10870,
220 .fifo_start = 0x5000,
221 .fifo_size = 0x1000,
222 .ptr1_reg = DMA3_PTR1,
223 .ptr2_reg = DMA3_PTR2,
224 .cnt1_reg = DMA3_CNT1,
225 .cnt2_reg = DMA3_CNT2,
226 },
227 [SRAM_CH04] = {
228 .name = "ch4",
229 .cmds_start = 0x0,
230 .ctrl_start = 0x0,
231 .cdt = 0x0,
232 .fifo_start = 0x0,
233 .fifo_size = 0x0,
234 .ptr1_reg = DMA4_PTR1,
235 .ptr2_reg = DMA4_PTR2,
236 .cnt1_reg = DMA4_CNT1,
237 .cnt2_reg = DMA4_CNT2,
238 },
239 [SRAM_CH05] = {
240 .name = "ch5",
241 .cmds_start = 0x0,
242 .ctrl_start = 0x0,
243 .cdt = 0x0,
244 .fifo_start = 0x0,
245 .fifo_size = 0x0,
246 .ptr1_reg = DMA5_PTR1,
247 .ptr2_reg = DMA5_PTR2,
248 .cnt1_reg = DMA5_CNT1,
249 .cnt2_reg = DMA5_CNT2,
250 },
251 [SRAM_CH06] = {
252 .name = "TS2 C",
253 .cmds_start = 0x10140,
254 .ctrl_start = 0x10670,
255 .cdt = 0x108d0,
256 .fifo_start = 0x6000,
257 .fifo_size = 0x1000,
258 .ptr1_reg = DMA5_PTR1,
259 .ptr2_reg = DMA5_PTR2,
260 .cnt1_reg = DMA5_CNT1,
261 .cnt2_reg = DMA5_CNT2,
262 },
263 [SRAM_CH07] = {
264 .name = "ch7",
265 .cmds_start = 0x0,
266 .ctrl_start = 0x0,
267 .cdt = 0x0,
268 .fifo_start = 0x0,
269 .fifo_size = 0x0,
270 .ptr1_reg = DMA6_PTR1,
271 .ptr2_reg = DMA6_PTR2,
272 .cnt1_reg = DMA6_CNT1,
273 .cnt2_reg = DMA6_CNT2,
274 },
275 [SRAM_CH08] = {
276 .name = "ch8",
277 .cmds_start = 0x0,
278 .ctrl_start = 0x0,
279 .cdt = 0x0,
280 .fifo_start = 0x0,
281 .fifo_size = 0x0,
282 .ptr1_reg = DMA7_PTR1,
283 .ptr2_reg = DMA7_PTR2,
284 .cnt1_reg = DMA7_CNT1,
285 .cnt2_reg = DMA7_CNT2,
286 },
287 [SRAM_CH09] = {
288 .name = "ch9",
289 .cmds_start = 0x0,
290 .ctrl_start = 0x0,
291 .cdt = 0x0,
292 .fifo_start = 0x0,
293 .fifo_size = 0x0,
294 .ptr1_reg = DMA8_PTR1,
295 .ptr2_reg = DMA8_PTR2,
296 .cnt1_reg = DMA8_CNT1,
297 .cnt2_reg = DMA8_CNT2,
298 },
299};
300
190static int cx23885_risc_decode(u32 risc) 301static int cx23885_risc_decode(u32 risc)
191{ 302{
192 static char *instr[16] = { 303 static char *instr[16] = {
@@ -626,7 +737,6 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
626 atomic_inc(&dev->refcount); 737 atomic_inc(&dev->refcount);
627 738
628 dev->nr = cx23885_devcount++; 739 dev->nr = cx23885_devcount++;
629 dev->sram_channels = cx23887_sram_channels;
630 sprintf(dev->name, "cx23885[%d]", dev->nr); 740 sprintf(dev->name, "cx23885[%d]", dev->nr);
631 741
632 mutex_lock(&devlist); 742 mutex_lock(&devlist);
@@ -638,11 +748,13 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
638 dev->bridge = CX23885_BRIDGE_887; 748 dev->bridge = CX23885_BRIDGE_887;
639 /* Apply a sensible clock frequency for the PCIe bridge */ 749 /* Apply a sensible clock frequency for the PCIe bridge */
640 dev->clk_freq = 25000000; 750 dev->clk_freq = 25000000;
751 dev->sram_channels = cx23887_sram_channels;
641 } else 752 } else
642 if(dev->pci->device == 0x8852) { 753 if(dev->pci->device == 0x8852) {
643 dev->bridge = CX23885_BRIDGE_885; 754 dev->bridge = CX23885_BRIDGE_885;
644 /* Apply a sensible clock frequency for the PCIe bridge */ 755 /* Apply a sensible clock frequency for the PCIe bridge */
645 dev->clk_freq = 28000000; 756 dev->clk_freq = 28000000;
757 dev->sram_channels = cx23885_sram_channels;
646 } else 758 } else
647 BUG(); 759 BUG();
648 760