[PATCH v8 4/4] dmaengine: sf-pdma: Get number of channel by device tree

Bin Meng bmeng.cn at gmail.com
Mon Mar 28 18:35:49 PDT 2022


On Mon, Mar 28, 2022 at 7:38 PM Zong Li <zong.li at sifive.com> wrote:
>
> It currently assumes that there are always four channels, it would
> cause the error if there is actually less than four channels. Change
> that by getting number of channel from device tree.
>
> For backwards-compatibility, it uses the default value (i.e. 4) when
> there is no 'dma-channels' information in dts.
>
> Signed-off-by: Zong Li <zong.li at sifive.com>
> Acked-by: Palmer Dabbelt <palmer at rivosinc.com>
> ---
>  drivers/dma/sf-pdma/sf-pdma.c | 24 ++++++++++++++++--------
>  drivers/dma/sf-pdma/sf-pdma.h |  8 ++------
>  2 files changed, 18 insertions(+), 14 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>



More information about the linux-riscv mailing list