[Sound-open-firmware] [PATCH 1/2] core: Limit children irq mask
From: Tomasz Lauda tomasz.lauda@linux.intel.com
Currently we support maximum of 32 children irqs, so limit the irq mask to not overflow the children irq array.
Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com --- src/include/reef/interrupt-map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/reef/interrupt-map.h b/src/include/reef/interrupt-map.h index b9682587..a29f85e7 100644 --- a/src/include/reef/interrupt-map.h +++ b/src/include/reef/interrupt-map.h @@ -39,7 +39,7 @@ #define REEF_IRQ_NUM_SHIFT 0 #define REEF_IRQ_NUM_MASK 0xff #define REEF_IRQ_LEVEL_MASK 0xff -#define REEF_IRQ_BIT_MASK 0xff +#define REEF_IRQ_BIT_MASK 0x1f #define REEF_IRQ_CPU_MASK 0xff
#define REEF_IRQ(_bit, _level, _cpu, _number) \
From: Tomasz Lauda tomasz.lauda@linux.intel.com
Check if returned DMA is not NULL.
Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com --- src/drivers/dw-dma.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index 1a3c7a9f..aac524ee 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1150,15 +1150,19 @@ static void dw_dma_irq_cnl(void *data)
/*check interrupt status of DMA controller 0*/ dma = dma_get(DMA_GP_LP_DMAC0); - status_intr = dw_read(dma, DW_INTR_STATUS); - if (status_intr) - dw_dma_irq_handler(dma); + if (dma) { + status_intr = dw_read(dma, DW_INTR_STATUS); + if (status_intr) + dw_dma_irq_handler(dma); + }
/*check interrupt status of DMA controller 1*/ dma = dma_get(DMA_GP_LP_DMAC1); - status_intr = dw_read(dma, DW_INTR_STATUS); - if (status_intr) - dw_dma_irq_handler(dma); + if (dma) { + status_intr = dw_read(dma, DW_INTR_STATUS); + if (status_intr) + dw_dma_irq_handler(dma); + } } #endif
participants (1)
-
Liam Girdwood