mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-22 20:30:58 +02:00
media: pci/tbsecp3: Fix irq handler for DMA events.
This commit is contained in:
0
drivers/media/pci/tbsecp3/tbsecp3-cards.c
Executable file → Normal file
0
drivers/media/pci/tbsecp3/tbsecp3-cards.c
Executable file → Normal file
33
drivers/media/pci/tbsecp3/tbsecp3-core.c
Executable file → Normal file
33
drivers/media/pci/tbsecp3/tbsecp3-core.c
Executable file → Normal file
@@ -53,8 +53,8 @@ static irqreturn_t tbsecp3_irq_handler(int irq, void *dev_id)
|
||||
|
||||
tbs_write(TBSECP3_INT_BASE, TBSECP3_INT_STAT, stat);
|
||||
|
||||
if (stat & 0x000000f0) {
|
||||
/* dma0~3 */
|
||||
if (stat & 0x000ffff0) {
|
||||
/* dma0~15 */
|
||||
for (i = 0; i < dev->info->adapters; i++) {
|
||||
in = dev->adapter[i].cfg->ts_in;
|
||||
if (stat & TBSECP3_DMA_IF(in)){
|
||||
@@ -63,35 +63,6 @@ static irqreturn_t tbsecp3_irq_handler(int irq, void *dev_id)
|
||||
}
|
||||
}
|
||||
|
||||
if (stat & 0x00000f00) {
|
||||
/* dma 4~7*/
|
||||
for (i = 4; i < dev->info->adapters; i++) {
|
||||
in = dev->adapter[i].cfg->ts_in;
|
||||
if (stat & TBSECP3_DMA_IF(in)){
|
||||
tasklet_schedule(&dev->adapter[i].tasklet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stat & 0x0000f000) {
|
||||
/* dma8~11 */
|
||||
for (i = 8; i < dev->info->adapters; i++) {
|
||||
in = dev->adapter[i].cfg->ts_in;
|
||||
if (stat & TBSECP3_DMA_IF1(in)){
|
||||
tasklet_schedule(&dev->adapter[i].tasklet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stat & 0x000f0000) {
|
||||
/* dma 12~15*/
|
||||
for (i = 12; i < dev->info->adapters; i++) {
|
||||
in = dev->adapter[i].cfg->ts_in;
|
||||
if (stat & TBSECP3_DMA_IF1(in)){
|
||||
tasklet_schedule(&dev->adapter[i].tasklet);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stat & 0x0000000f) {
|
||||
/* i2c */
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
@@ -52,7 +52,7 @@
|
||||
#define TBSECP3_DMA_IE(_n) (0x0018 + 4 * _n)
|
||||
#define TBSECP3_I2C_IF(_n) (0x0001 << _n)
|
||||
#define TBSECP3_DMA_IF(_n) (0x0010 << _n)
|
||||
#define TBSECP3_DMA_IF1(_n) (0x1000<<(_n-8))
|
||||
|
||||
//spi flash
|
||||
#define SPI_CONFIG 0x10
|
||||
#define SPI_STATUS 0x10
|
||||
|
0
drivers/media/pci/tbsecp3/tbsecp3.h
Executable file → Normal file
0
drivers/media/pci/tbsecp3/tbsecp3.h
Executable file → Normal file
Reference in New Issue
Block a user