[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251223105604.12675-8-arun.muthusamy@gaisler.com>
Date: Tue, 23 Dec 2025 11:56:01 +0100
From: Arun Muthusamy <arun.muthusamy@...sler.com>
To: robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
mkl@...gutronix.de,
mailhol@...nel.org
Cc: devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-can@...r.kernel.org,
Daniel Hellstrom <daniel@...sler.com>,
Arun Muthusamy <arun.muthusamy@...sler.com>
Subject: [PATCH v2 07/10] can: grcan: set DMA mask for GRCAN and GRCANFD to 32-bit
From: Daniel Hellstrom <daniel@...sler.com>
Sets the DMA mask for GRCAN and GRCANFD devices to 32-bit.
Setting the DMA mask and coherent DMA mask to 32-bit ensures proper
memory addressing during DMA operations
Signed-off-by: Daniel Hellstrom <daniel@...sler.com>
Signed-off-by: Arun Muthusamy <arun.muthusamy@...sler.com>
---
drivers/net/can/grcan.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
index 8a6c59473cf4..cdb9498cf783 100644
--- a/drivers/net/can/grcan.c
+++ b/drivers/net/can/grcan.c
@@ -1753,6 +1753,13 @@ static int grcan_probe(struct platform_device *ofdev)
goto exit_error;
}
+ /* On 64-bit systems.. GRCAN and GRCANFD can only address 32-bit */
+ err = dma_set_mask_and_coherent(&ofdev->dev, DMA_BIT_MASK(32));
+ if (err) {
+ dev_err_probe(&ofdev->dev, err, "No usable DMA configuration.\n");
+ goto exit_error;
+ }
+
irq = irq_of_parse_and_map(np, GRCAN_IRQIX_IRQ);
if (!irq) {
dev_err(&ofdev->dev, "no irq found\n");
--
2.51.0
Powered by blists - more mailing lists