Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: stm32-mdma: remove GISR1 register

GISR1 was described in a not up-to-date documentation when the stm32-mdma
driver has been developed. This register has not been added in reference
manual of STM32 SoC with MDMA, which have only 32 MDMA channels.
So remove it from stm32-mdma driver.

Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20220504155322.121431-2-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Amelie Delaunay and committed by
Vinod Koul
9d6a2d92 a725e582

+5 -16
+5 -16
drivers/dma/stm32-mdma.c
··· 34 34 #include "virt-dma.h" 35 35 36 36 #define STM32_MDMA_GISR0 0x0000 /* MDMA Int Status Reg 1 */ 37 - #define STM32_MDMA_GISR1 0x0004 /* MDMA Int Status Reg 2 */ 38 37 39 38 /* MDMA Channel x interrupt/status register */ 40 39 #define STM32_MDMA_CISR(x) (0x40 + 0x40 * (x)) /* x = 0..62 */ ··· 168 169 169 170 #define STM32_MDMA_MAX_BUF_LEN 128 170 171 #define STM32_MDMA_MAX_BLOCK_LEN 65536 171 - #define STM32_MDMA_MAX_CHANNELS 63 172 + #define STM32_MDMA_MAX_CHANNELS 32 172 173 #define STM32_MDMA_MAX_REQUESTS 256 173 174 #define STM32_MDMA_MAX_BURST 128 174 175 #define STM32_MDMA_VERY_HIGH_PRIORITY 0x3 ··· 1323 1324 1324 1325 /* Find out which channel generates the interrupt */ 1325 1326 status = readl_relaxed(dmadev->base + STM32_MDMA_GISR0); 1326 - if (status) { 1327 - id = __ffs(status); 1328 - } else { 1329 - status = readl_relaxed(dmadev->base + STM32_MDMA_GISR1); 1330 - if (!status) { 1331 - dev_dbg(mdma2dev(dmadev), "spurious it\n"); 1332 - return IRQ_NONE; 1333 - } 1334 - id = __ffs(status); 1335 - /* 1336 - * As GISR0 provides status for channel id from 0 to 31, 1337 - * so GISR1 provides status for channel id from 32 to 62 1338 - */ 1339 - id += 32; 1327 + if (!status) { 1328 + dev_dbg(mdma2dev(dmadev), "spurious it\n"); 1329 + return IRQ_NONE; 1340 1330 } 1331 + id = __ffs(status); 1341 1332 1342 1333 chan = &dmadev->chan[id]; 1343 1334 if (!chan) {