Add 48-bit DMA mask for TI K3 remoteproc devices
cover Add 48-bit DMA mask for TI K3 remoteproc devices
The TI K3 R5F and C6x cores can address 48-bit memory space through the Region Address Translator (RAT) unit. Whereas the TI K3 C7x has a native 48-bit address bus. 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.
Testing done:
1. Verified above devices are able to access 48-bit addresses with compatible firmware.
2. Verified IPC with Cortex-R5F and C7x DSPs on TI J784S4 EVM.
3. Verified none of the patch generate any new warning/errors.
Thanks,
Beleswar
Rahul T R (2):
remoteproc: k3-r5: Set a 48-bit DMA mask for remoteproc device
remoteproc: k3-dsp: Set a 48-bit DMA mask for remoteproc device
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 4 ++++ drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 ++++ 2 files changed, 8 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/2 remoteproc: k3-r5: Set a 48-bit DMA mask for remoteproc device
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.
--- drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/remoteproc/ti_k3_r5_remoteproc.c +4 -0
@@ -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 */
Signature · 1 line
2.34.1
PATCH 2/2 remoteproc: k3-dsp: Set a 48-bit DMA mask for remoteproc device
In reply to Beleswar PadhiFrom: Rahul T R <[email protected]>
The C6x DSP can address 48-bit memory space through the Region Address Translator (RAT) unit, and the C7x DSP has a native 48-bit address bus. RAT is usually programmed by the firmware itself. Configure the remoteproc device DMA mask to 48 bits to enable full addressing capability for DMA operations.
--- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/remoteproc/ti_k3_dsp_remoteproc.c +4 -0
@@ -154,6 +154,10 @@ static int k3_dsp_rproc_probe(struct platform_device *pdev)dev_info (dev,"configured DSP for remoteproc mode\n" ); } + 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); + ret =devm_rproc_add (dev, rproc);if (ret)return dev_err_probe (dev, ret,"failed to add register device with remoteproc core\n" );
Signature · 1 line
2.34.1
Mathieu Poirier
maintainerQuoted 16 lines · Beleswar Padhi
The TI K3 R5F and C6x cores can address 48-bit memory space through the Region Address Translator (RAT) unit. Whereas the TI K3 C7x has a native 48-bit address bus. 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.
Testing done:
1. Verified above devices are able to access 48-bit addresses with compatible firmware.
2. Verified IPC with Cortex-R5F and C7x DSPs on TI J784S4 EVM.
3. Verified none of the patch generate any new warning/errors.Thanks,
Beleswar
Quoted 8 lines
Rahul T R (2):
remoteproc: k3-r5: Set a 48-bit DMA mask for remoteproc device
remoteproc: k3-dsp: Set a 48-bit DMA mask for remoteproc devicedrivers/remoteproc/ti_k3_dsp_remoteproc.c | 4 ++++ drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 ++++ 2 files changed, 8 insertions(+)
I'll apply this when rc1 comes out.
Thanks,
Mathieu
Quoted 3 lines
--
2.34.1