LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: layerscape-ep: set 64-bit DMA mask
@ 2023-09-21 15:37 Frank Li
  2023-09-21 17:59 ` Christophe JAILLET
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Li @ 2023-09-21 15:37 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	open list:PCI DRIVER FOR FREESCALE LAYERSCAPE,
	open list:PCI DRIVER FOR FREESCALE LAYERSCAPE,
	moderated list:PCI DRIVER FOR FREESCALE LAYERSCAPE, open list
  Cc: imx

From: Guanhua Gao <guanhua.gao@nxp.com>

Set DMA mask and coherent DMA mask to enable 64-bit addressing.

Signed-off-by: Guanhua Gao <guanhua.gao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/pci/controller/dwc/pci-layerscape-ep.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c
index de4c1758a6c33..6fd0dea38a32c 100644
--- a/drivers/pci/controller/dwc/pci-layerscape-ep.c
+++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c
@@ -249,6 +249,11 @@ static int __init ls_pcie_ep_probe(struct platform_device *pdev)
 
 	pcie->big_endian = of_property_read_bool(dev->of_node, "big-endian");
 
+	/* set 64-bit DMA mask and coherent DMA mask */
+	if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)))
+		if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)))
+			return -EIO;
+
 	platform_set_drvdata(pdev, pcie);
 
 	ret = dw_pcie_ep_init(&pci->ep);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-21 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-21 15:37 [PATCH 1/1] PCI: layerscape-ep: set 64-bit DMA mask Frank Li
2023-09-21 17:59 ` Christophe JAILLET
2023-09-21 18:35   ` Frank Li
2023-09-21 20:04     ` Christophe JAILLET
2023-09-21 22:05       ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox