Skip to content
Commit e2dfce24 authored by Zong Li's avatar Zong Li Committed by Vinod Koul
Browse files

dmaengine: sf-pdma: Get number of channel by device tree



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: default avatarZong Li <zong.li@sifive.com>
Acked-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Link: https://lore.kernel.org/r/f08a95b6582a51712c5b2c3cb859136d07bfa8b9.1648461096.git.zong.li@sifive.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 06006ad2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment