aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx18/cx18-firmware.c11
-rw-r--r--drivers/media/video/cx18/cx18-io.c7
-rw-r--r--drivers/media/video/cx18/cx18-io.h1
-rw-r--r--drivers/media/video/cx18/cx18-irq.h1
4 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-firmware.c b/drivers/media/video/cx18/cx18-firmware.c
index ab02da727519..06f5563d6d5a 100644
--- a/drivers/media/video/cx18/cx18-firmware.c
+++ b/drivers/media/video/cx18/cx18-firmware.c
@@ -380,6 +380,17 @@ int cx18_firmware_init(struct cx18 *cx)
380 if (sz <= 0) 380 if (sz <= 0)
381 return -EIO; 381 return -EIO;
382 } 382 }
383
384 /*
385 * The CPU firmware apparently sets up to receive an interrupt for it's
386 * outgoing IRQ_CPU_TO_EPU_ACK to us (*boggle*). We get an interrupt
387 * when it sends us an ack, but by the time we process it, that flag in
388 * the SW2 status register has been cleared by the CPU firmware.
389 * We'll prevent that not so useful behavior by clearing the CPU's
390 * interrupt enables for Ack IRQ's we want to process.
391 */
392 cx18_sw2_irq_disable_cpu(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
393
383 /* initialize GPIO */ 394 /* initialize GPIO */
384 cx18_write_reg_expect(cx, 0x14001400, 0xc78110, 0x00001400, 0x14001400); 395 cx18_write_reg_expect(cx, 0x14001400, 0xc78110, 0x00001400, 0x14001400);
385 return 0; 396 return 0;
diff --git a/drivers/media/video/cx18/cx18-io.c b/drivers/media/video/cx18/cx18-io.c
index 48a8adc83c2f..3c6485fceea0 100644
--- a/drivers/media/video/cx18/cx18-io.c
+++ b/drivers/media/video/cx18/cx18-io.c
@@ -262,6 +262,13 @@ void cx18_sw2_irq_disable(struct cx18 *cx, u32 val)
262 cx18_write_reg(cx, r & ~val, SW2_INT_ENABLE_PCI); 262 cx18_write_reg(cx, r & ~val, SW2_INT_ENABLE_PCI);
263} 263}
264 264
265void cx18_sw2_irq_disable_cpu(struct cx18 *cx, u32 val)
266{
267 u32 r;
268 r = cx18_read_reg(cx, SW2_INT_ENABLE_CPU);
269 cx18_write_reg(cx, r & ~val, SW2_INT_ENABLE_CPU);
270}
271
265void cx18_setup_page(struct cx18 *cx, u32 addr) 272void cx18_setup_page(struct cx18 *cx, u32 addr)
266{ 273{
267 u32 val; 274 u32 val;
diff --git a/drivers/media/video/cx18/cx18-io.h b/drivers/media/video/cx18/cx18-io.h
index cb695a59670d..4486b73faf5b 100644
--- a/drivers/media/video/cx18/cx18-io.h
+++ b/drivers/media/video/cx18/cx18-io.h
@@ -390,6 +390,7 @@ void cx18_sw1_irq_enable(struct cx18 *cx, u32 val);
390void cx18_sw1_irq_disable(struct cx18 *cx, u32 val); 390void cx18_sw1_irq_disable(struct cx18 *cx, u32 val);
391void cx18_sw2_irq_enable(struct cx18 *cx, u32 val); 391void cx18_sw2_irq_enable(struct cx18 *cx, u32 val);
392void cx18_sw2_irq_disable(struct cx18 *cx, u32 val); 392void cx18_sw2_irq_disable(struct cx18 *cx, u32 val);
393void cx18_sw2_irq_disable_cpu(struct cx18 *cx, u32 val);
393void cx18_setup_page(struct cx18 *cx, u32 addr); 394void cx18_setup_page(struct cx18 *cx, u32 addr);
394 395
395#endif /* CX18_IO_H */ 396#endif /* CX18_IO_H */
diff --git a/drivers/media/video/cx18/cx18-irq.h b/drivers/media/video/cx18/cx18-irq.h
index 6173ca3bc9e4..6f3ec8963762 100644
--- a/drivers/media/video/cx18/cx18-irq.h
+++ b/drivers/media/video/cx18/cx18-irq.h
@@ -28,6 +28,7 @@
28#define SW1_INT_ENABLE_PCI 0xc7311c 28#define SW1_INT_ENABLE_PCI 0xc7311c
29#define SW2_INT_SET 0xc73140 29#define SW2_INT_SET 0xc73140
30#define SW2_INT_STATUS 0xc73144 30#define SW2_INT_STATUS 0xc73144
31#define SW2_INT_ENABLE_CPU 0xc73158
31#define SW2_INT_ENABLE_PCI 0xc7315c 32#define SW2_INT_ENABLE_PCI 0xc7315c
32 33
33irqreturn_t cx18_irq_handler(int irq, void *dev_id); 34irqreturn_t cx18_irq_handler(int irq, void *dev_id);