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

Commit e7436032 authored by Prudhvi Yarlagadda's avatar Prudhvi Yarlagadda
Browse files

drivers: slimbus: slim-msm-ngd: Set 32 bit DMA mask



As ZONE_DMA32 is disabled, we need to set 32 bit dma
mask in slimbus driver as a means to get only 32 bit
dma addresses. Otherwise we might get a address which is
more than 32 bit, this results in failures as slimbus
uses bam for transfers and bam supports 32 bit addresses.

Change-Id: I7a9688285034f8de9c2ad4860aeeefc86d387f45
Signed-off-by: default avatarPrudhvi Yarlagadda <pyarlaga@codeaurora.org>
parent 6d464a5c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1796,6 +1796,12 @@ static int ngd_slim_probe(struct platform_device *pdev)
		goto err_nobulk;
	}

	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
	if (ret) {
		dev_err(&pdev->dev, "could not set 32 bit DMA mask\n");
		goto err_nobulk;
	}

	/* typical txn numbers and size used in bulk operation */
	dev->bulk.buf_sz = SLIM_MAX_TXNS * 8;
	dev->bulk.base = kzalloc(dev->bulk.buf_sz, GFP_KERNEL | GFP_DMA);