Skip to contentSkip to conversation

fpga: versal: Add support for 44-bit DMA operations

PATCH Applied Nava kishore Manne 3 participants 5 messages Oct 3, 2023 – Oct 12, 2023 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fpga: versal: Add support for 44-bit DMA operations

The existing implementation support only 32-bit DMA operation. So, it fails to load the bitstream for the high DDR designs(Beyond 4GB). To fix this issue update the DMA mask handling logic to support 44-bit DMA operations.

---
 drivers/fpga/versal-fpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/versal-fpga.c +1 -1
index e1601b3a345b..3710e8f01be2 100644
@@ -48,7 +48,7 @@ static int versal_fpga_probe(struct platform_device *pdev)
 	struct fpga_manager *mgr;
 	int ret;
 
-	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
 	if (ret < 0) {
 		dev_err(dev, "no usable DMA configuration\n");
 		return ret;
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: Manne, Nava kishore <[email protected]>
Sent: Tuesday, October 3, 2023 12:44 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Pandey, Radhey Shyam <[email protected]>
Subject: [PATCH] fpga: versal: Add support for 44-bit DMA operations

Quoted 7 lines

The existing implementation support only 32-bit DMA operation. So, it fails to load the bitstream for the high DDR designs(Beyond 4GB). To fix this issue update the DMA mask handling logic to support 44-bit DMA operations.

As I reviewed it on internal list - adding my reviewed tag here as well.

Thanks!

Quoted 22 lines
---
 drivers/fpga/versal-fpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/versal-fpga.c index renamed from drivers/fpga/versal-fpga.c +0 -0

e1601b3a345b..3710e8f01be2 100644

drivers/fpga/versal-fpga.c +1 -1
@@ -48,7 +48,7 @@ static int versal_fpga_probe(struct platform_device
 *pdev)
 	struct fpga_manager *mgr;
 	int ret;
 
-	ret = dma_set_mask_and_coherent(&pdev->dev,
 DMA_BIT_MASK(32));
+	ret = dma_set_mask_and_coherent(&pdev->dev,
 DMA_BIT_MASK(44));
drivers/fpga/versal-fpga.c +0 -1
 	if (ret < 0) {
 		dev_err(dev, "no usable DMA configuration\n");
 		return ret;
--

2.25.1

#2 lore raw
In reply to Nava kishore Manne
Quoted 3 lines · Nava kishore Manne

The existing implementation support only 32-bit DMA operation. So, it fails to load the bitstream for the high DDR designs(Beyond 4GB). To fix this issue update the DMA mask handling logic to support 44-bit

This is the HW defined DMA addressing capability. Does the device only support up to 44 bits DMA? Any Doc?

Thanks,
Yilun

Quoted 24 lines

DMA operations.

---
 drivers/fpga/versal-fpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/versal-fpga.c +1 -1
index e1601b3a345b..3710e8f01be2 100644
@@ -48,7 +48,7 @@ static int versal_fpga_probe(struct platform_device *pdev)
 	struct fpga_manager *mgr;
 	int ret;
 
-	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
 	if (ret < 0) {
 		dev_err(dev, "no usable DMA configuration\n");
 		return ret;
Signature · 1 line
2.25.1
#3 lore raw

Hi Yilun,

Thanks for providing the review comments.
Please find my response inline.

Quoted 9 lines

-----Original Message-----
From: Xu Yilun <[email protected]>
Sent: Saturday, October 7, 2023 12:47 PM
To: Manne, Nava kishore <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Pandey, Radhey Shyam <[email protected]>
Subject: Re: [PATCH] fpga: versal: Add support for 44-bit DMA operations

Quoted 8 lines
Quoted 3 lines · Nava kishore Manne

The existing implementation support only 32-bit DMA operation. So, it fails to load the bitstream for the high DDR designs(Beyond 4GB). To fix this issue update the DMA mask handling logic to support 44-bit

This is the HW defined DMA addressing capability. Does the device only support up to 44 bits DMA? Any Doc?

The versal platform supports a maximum physical address size is 44-bit in AArch64. For more details, please refer the Versal TRM (Memory space- section):
https://docs.xilinx.com/r/en-US/am011-versal-acap-trm/Memory-Space

Regards,
Navakishore.

Acked-by Applied
#4 lore raw
Quoted 19 lines · Nava kishore

Hi Yilun,

Thanks for providing the review comments.
Please find my response inline.

Quoted 14 lines

-----Original Message-----
From: Xu Yilun <[email protected]>
Sent: Saturday, October 7, 2023 12:47 PM
To: Manne, Nava kishore <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Pandey, Radhey Shyam <[email protected]>
Subject: Re: [PATCH] fpga: versal: Add support for 44-bit DMA operations

Quoted 3 lines · Nava kishore Manne

The existing implementation support only 32-bit DMA operation. So, it fails to load the bitstream for the high DDR designs(Beyond 4GB). To fix this issue update the DMA mask handling logic to support 44-bit

Quoted 6 lines
Quoted 3 lines

This is the HW defined DMA addressing capability. Does the device only support up to 44 bits DMA? Any Doc?

The versal platform supports a maximum physical address size is 44-bit in AArch64. For more details, please refer the Versal TRM (Memory space- section):
https://docs.xilinx.com/r/en-US/am011-versal-acap-trm/Memory-Space

Applied.

Quoted 4 lines

Regards,
Navakishore.