mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
media: ddbridge: improve separated MSI IRQ handling
Improve IRQ handling in the separated MSG/I2C and IO/TSDATA handlers by applying a mask for recognized bits immediately upon reading the IRQ mask from the hardware, so only the bits/IRQs that actually were set will be acked. Picked up from the upstream dddvb-0.9.33 release. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
e8227689f9
commit
285d490c31
@ -2428,16 +2428,17 @@ static void irq_handle_io(struct ddb *dev, u32 s)
|
|||||||
irqreturn_t ddb_irq_handler0(int irq, void *dev_id)
|
irqreturn_t ddb_irq_handler0(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct ddb *dev = (struct ddb *)dev_id;
|
struct ddb *dev = (struct ddb *)dev_id;
|
||||||
u32 s = ddbreadl(dev, INTERRUPT_STATUS);
|
u32 mask = 0x8fffff00;
|
||||||
|
u32 s = mask & ddbreadl(dev, INTERRUPT_STATUS);
|
||||||
|
|
||||||
|
if (!s)
|
||||||
|
return IRQ_NONE;
|
||||||
do {
|
do {
|
||||||
if (s & 0x80000000)
|
if (s & 0x80000000)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
if (!(s & 0xfffff00))
|
ddbwritel(dev, s, INTERRUPT_ACK);
|
||||||
return IRQ_NONE;
|
|
||||||
ddbwritel(dev, s & 0xfffff00, INTERRUPT_ACK);
|
|
||||||
irq_handle_io(dev, s);
|
irq_handle_io(dev, s);
|
||||||
} while ((s = ddbreadl(dev, INTERRUPT_STATUS)));
|
} while ((s = mask & ddbreadl(dev, INTERRUPT_STATUS)));
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
@ -2445,16 +2446,17 @@ irqreturn_t ddb_irq_handler0(int irq, void *dev_id)
|
|||||||
irqreturn_t ddb_irq_handler1(int irq, void *dev_id)
|
irqreturn_t ddb_irq_handler1(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct ddb *dev = (struct ddb *)dev_id;
|
struct ddb *dev = (struct ddb *)dev_id;
|
||||||
u32 s = ddbreadl(dev, INTERRUPT_STATUS);
|
u32 mask = 0x8000000f;
|
||||||
|
u32 s = mask & ddbreadl(dev, INTERRUPT_STATUS);
|
||||||
|
|
||||||
|
if (!s)
|
||||||
|
return IRQ_NONE;
|
||||||
do {
|
do {
|
||||||
if (s & 0x80000000)
|
if (s & 0x80000000)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
if (!(s & 0x0000f))
|
ddbwritel(dev, s, INTERRUPT_ACK);
|
||||||
return IRQ_NONE;
|
|
||||||
ddbwritel(dev, s & 0x0000f, INTERRUPT_ACK);
|
|
||||||
irq_handle_msg(dev, s);
|
irq_handle_msg(dev, s);
|
||||||
} while ((s = ddbreadl(dev, INTERRUPT_STATUS)));
|
} while ((s = mask & ddbreadl(dev, INTERRUPT_STATUS)));
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user