Skip to content

Commit 1385eb4

Browse files
ambarusvinodkoul
authored andcommitted
dmaengine: at_xdmac: Fix lld view setting
AT_XDMAC_CNDC_NDVIEW_NDV3 was set even for AT_XDMAC_MBR_UBC_NDV2, because of the wrong bit handling. Fix it. Fixes: ee0fe35 ("dmaengine: xdmac: Handle descriptor's view 3 registers") Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 42468aa commit 1385eb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/at_xdmac.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
#define AT_XDMAC_CNDC_NDE (0x1 << 0) /* Channel x Next Descriptor Enable */
100100
#define AT_XDMAC_CNDC_NDSUP (0x1 << 1) /* Channel x Next Descriptor Source Update */
101101
#define AT_XDMAC_CNDC_NDDUP (0x1 << 2) /* Channel x Next Descriptor Destination Update */
102+
#define AT_XDMAC_CNDC_NDVIEW_MASK GENMASK(28, 27)
102103
#define AT_XDMAC_CNDC_NDVIEW_NDV0 (0x0 << 3) /* Channel x Next Descriptor View 0 */
103104
#define AT_XDMAC_CNDC_NDVIEW_NDV1 (0x1 << 3) /* Channel x Next Descriptor View 1 */
104105
#define AT_XDMAC_CNDC_NDVIEW_NDV2 (0x2 << 3) /* Channel x Next Descriptor View 2 */
@@ -402,7 +403,8 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,
402403
*/
403404
if (at_xdmac_chan_is_cyclic(atchan))
404405
reg = AT_XDMAC_CNDC_NDVIEW_NDV1;
405-
else if (first->lld.mbr_ubc & AT_XDMAC_MBR_UBC_NDV3)
406+
else if ((first->lld.mbr_ubc &
407+
AT_XDMAC_CNDC_NDVIEW_MASK) == AT_XDMAC_MBR_UBC_NDV3)
406408
reg = AT_XDMAC_CNDC_NDVIEW_NDV3;
407409
else
408410
reg = AT_XDMAC_CNDC_NDVIEW_NDV2;

0 commit comments

Comments
 (0)