From: Rahul T R <[email protected]>

The K3 R5F cores can address 48-bit memory space through the Region
Address Translator (RAT) unit. RAT is usually programmed from the
firmware itself. Configure the remoteproc device DMA mask to 48 bits to
enable full addressing capability for DMA operations.

Signed-off-by: Rahul T R <[email protected]>
Signed-off-by: Beleswar Padhi <[email protected]>
---
 drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c 
b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index b1d04d082e44c..365b4e4c4b509 100644
--- a/drivers/remoteproc/ti_k3_r5_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c
@@ -1047,6 +1047,10 @@ static int k3_r5_cluster_rproc_init(struct 
platform_device *pdev)
                        goto out;
                }
 
+               ret = dma_coerce_mask_and_coherent(&rproc->dev, 
DMA_BIT_MASK(48));
+               if (ret)
+                       dev_warn(dev, "Failed to set DMA mask (%d)\n", ret);
+
                /* K3 R5s have a Region Address Translator (RAT) but no MMU */
                rproc->has_iommu = false;
                /* error recovery is not supported at present */
-- 
2.34.1


Reply via email to