Re: [PATCH v2 1/3] sh: dma: Fix dma channel offset calculation
Geert Uytterhoeven <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <CAMuHMdXfeF9jttu7K5C1CMqb+wsGY5z3GzNaFzdQLWbOrgqicQ@mail.gmail.com> |
On Sat, May 27, 2023 at 6:45 PM Artur Rojek <[email protected]> wrote: > Various SoCs of the SH3, SH4 and SH4A family, which use this driver, > feature a differing number of DMA channels, which can be distributed > between up to two DMAC modules. Existing implementation fails to > correctly accommodate for all those variations, resulting in wrong > channel offset calculations and leading to kernel panics. > > Rewrite dma_base_addr() in order to properly calculate channel offsets > in a DMAC module. Fix dmaor_read_reg() and dmaor_write_reg(), so that > the correct DMAC module base is selected for the DMAOR register. > > Fixes: 7f47c7189b3e8f19 ("sh: dma: More legacy cpu dma chainsawing.") > Signed-off-by: Artur Rojek <[email protected]> > --- > > v2: also handle differing numbers of DMAC modules and channels Reviewed-by: Geert Uytterhoeven <[email protected]> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds