]> git.ipfire.org Git - thirdparty/linux.git/commit
dmaengine: at_xdmac: get the number of DMA channels from device tree
authorTony Han <tony.han@microchip.com>
Wed, 3 Dec 2025 12:11:43 +0000 (13:11 +0100)
committerVinod Koul <vkoul@kernel.org>
Thu, 1 Jan 2026 11:45:16 +0000 (17:15 +0530)
commitd3824968dbd9056844bbd5041020a3e28c748558
treebf84aad8295dc74c504878532f55dc2c1670fce2
parentc47422f4d0a26b25ff59709921eaaf8f916eec7d
dmaengine: at_xdmac: get the number of DMA channels from device tree

In case of kernel runs in non-secure mode, the number of DMA channels can
be got from device tree since the value read from GTYPE register is "0" as
it's always secured.

As the number of channels can never be negative, update them to the type
"unsigned".

This is required for LAN969x.

Signed-off-by: Tony Han <tony.han@microchip.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://patch.msgid.link/20251203121208.1269487-1-robert.marko@sartura.hr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/at_xdmac.c