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

Commit ea524c7e authored by Mark Brown's avatar Mark Brown Committed by Vinod Koul
Browse files

dmaengine: pl08x: Define capabilities for generic capabilities reporting



Ensure that clients can automatically configure themselves and avoid a
nasty warning at boot by providing capability information.

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent a104a45b
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -97,6 +97,12 @@

#define DRIVER_NAME	"pl08xdmac"

#define PL80X_DMA_BUSWIDTHS \
	BIT(DMA_SLAVE_BUSWIDTH_UNDEFINED) | \
	BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
	BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
	BIT(DMA_SLAVE_BUSWIDTH_4_BYTES)

static struct amba_driver pl08x_amba_driver;
struct pl08x_driver_data;

@@ -2070,6 +2076,10 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
	pl08x->memcpy.device_pause = pl08x_pause;
	pl08x->memcpy.device_resume = pl08x_resume;
	pl08x->memcpy.device_terminate_all = pl08x_terminate_all;
	pl08x->memcpy.src_addr_widths = PL80X_DMA_BUSWIDTHS;
	pl08x->memcpy.dst_addr_widths = PL80X_DMA_BUSWIDTHS;
	pl08x->memcpy.directions = BIT(DMA_MEM_TO_MEM);
	pl08x->memcpy.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;

	/* Initialize slave engine */
	dma_cap_set(DMA_SLAVE, pl08x->slave.cap_mask);
@@ -2086,6 +2096,10 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
	pl08x->slave.device_pause = pl08x_pause;
	pl08x->slave.device_resume = pl08x_resume;
	pl08x->slave.device_terminate_all = pl08x_terminate_all;
	pl08x->slave.src_addr_widths = PL80X_DMA_BUSWIDTHS;
	pl08x->slave.dst_addr_widths = PL80X_DMA_BUSWIDTHS;
	pl08x->slave.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
	pl08x->slave.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;

	/* Get the platform data */
	pl08x->pd = dev_get_platdata(&adev->dev);