On Mon, Mar 28, 2022 at 7:38 PM Zong Li <zong.li@xxxxxxxxxx> 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@xxxxxxxxxx> > Acked-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> > --- > 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@xxxxxxxxx>