Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124285
b: refs/heads/master
c: d20ceec
h: refs/heads/master
i:
  124283: 69c5373
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent be0a2ba commit be9fc8a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d1a1b055be8598dbcc8a7b905d07bcf05eaff3a
refs/heads/master: d20ceecd0c5370cfe6b6eee2f63fecb65222c747
11 changes: 11 additions & 0 deletions trunk/drivers/media/video/cx18/cx18-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,17 @@ int cx18_firmware_init(struct cx18 *cx)
if (sz <= 0)
return -EIO;
}

/*
* The CPU firmware apparently sets up to receive an interrupt for it's
* outgoing IRQ_CPU_TO_EPU_ACK to us (*boggle*). We get an interrupt
* when it sends us an ack, but by the time we process it, that flag in
* the SW2 status register has been cleared by the CPU firmware.
* We'll prevent that not so useful behavior by clearing the CPU's
* interrupt enables for Ack IRQ's we want to process.
*/
cx18_sw2_irq_disable_cpu(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);

/* initialize GPIO */
cx18_write_reg_expect(cx, 0x14001400, 0xc78110, 0x00001400, 0x14001400);
return 0;
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/cx18/cx18-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ void cx18_sw2_irq_disable(struct cx18 *cx, u32 val)
cx18_write_reg(cx, r & ~val, SW2_INT_ENABLE_PCI);
}

void cx18_sw2_irq_disable_cpu(struct cx18 *cx, u32 val)
{
u32 r;
r = cx18_read_reg(cx, SW2_INT_ENABLE_CPU);
cx18_write_reg(cx, r & ~val, SW2_INT_ENABLE_CPU);
}

void cx18_setup_page(struct cx18 *cx, u32 addr)
{
u32 val;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/cx18/cx18-io.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ void cx18_sw1_irq_enable(struct cx18 *cx, u32 val);
void cx18_sw1_irq_disable(struct cx18 *cx, u32 val);
void cx18_sw2_irq_enable(struct cx18 *cx, u32 val);
void cx18_sw2_irq_disable(struct cx18 *cx, u32 val);
void cx18_sw2_irq_disable_cpu(struct cx18 *cx, u32 val);
void cx18_setup_page(struct cx18 *cx, u32 addr);

#endif /* CX18_IO_H */
1 change: 1 addition & 0 deletions trunk/drivers/media/video/cx18/cx18-irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define SW1_INT_ENABLE_PCI 0xc7311c
#define SW2_INT_SET 0xc73140
#define SW2_INT_STATUS 0xc73144
#define SW2_INT_ENABLE_CPU 0xc73158
#define SW2_INT_ENABLE_PCI 0xc7315c

irqreturn_t cx18_irq_handler(int irq, void *dev_id);
Expand Down

0 comments on commit be9fc8a

Please sign in to comment.