Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a9723e8 authored by Ludovic Desroches's avatar Ludovic Desroches Committed by Vinod Koul
Browse files

dmaengine: at_xdmac: align descriptors on 64 bits



Having descriptors aligned on 64 bits allows update CNDA and CUBC in an
atomic way.

Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Fixes: e1f7c9ee ("dmaengine: at_xdmac: creation of the atmel
eXtended DMA Controller driver")
Cc: stable@vger.kernel.org #v4.1 and later
Reviewed-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent c56d329e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -242,7 +242,7 @@ struct at_xdmac_lld {
	u32		mbr_dus;	/* Destination Microblock Stride Register */
	u32		mbr_dus;	/* Destination Microblock Stride Register */
};
};



/* 64-bit alignment needed to update CNDA and CUBC registers in an atomic way. */
struct at_xdmac_desc {
struct at_xdmac_desc {
	struct at_xdmac_lld		lld;
	struct at_xdmac_lld		lld;
	enum dma_transfer_direction	direction;
	enum dma_transfer_direction	direction;
@@ -253,7 +253,7 @@ struct at_xdmac_desc {
	unsigned int			xfer_size;
	unsigned int			xfer_size;
	struct list_head		descs_list;
	struct list_head		descs_list;
	struct list_head		xfer_node;
	struct list_head		xfer_node;
};
} __aligned(sizeof(u64));


static inline void __iomem *at_xdmac_chan_reg_base(struct at_xdmac *atxdmac, unsigned int chan_nb)
static inline void __iomem *at_xdmac_chan_reg_base(struct at_xdmac *atxdmac, unsigned int chan_nb)
{
{