From nobody Fri Apr 3 03:15:15 2026 Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEEF23F23C5; Fri, 6 Mar 2026 16:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=94.231.106.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772814605; cv=none; b=B8s18jlceYE1hdqtHfx8AClVp4LecredzMOAImRXNtsFnQqSvH9oPr0la0xrR3l0VEmsQefs22zexa8zHwwTTaTJWFiHeazNEtdLT34k4aKXrgwECe6OQ0NH6wT3ERANyDqrE3D9b963rWv/aOVVJmfH4r9xum5CxSjRF4wo4xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772814605; c=relaxed/simple; bh=sBPLttc71DWTT/X+2aWt8iCWd65cG/MxNoG6shfvVaE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AJBR//vS9Dsn1KwloGj1UvbX//oESxOW6yyT74tTI0C4sg162/2PFFOgsWOqYyDROjL+g1LelN26q9aNqRLttshlg1footBwalhp/giE53oz+RwPjcbt+/XJJ2H8a+weIpyKRCa+8qKN3yzDlzPf8HEg+UiT7bEc4wPsxvzvF+A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gaisler.com; spf=pass smtp.mailfrom=gaisler.com; dkim=fail (0-bit key) header.d=gaisler.com header.i=@gaisler.com header.b=LyYW5O84 reason="key not found in DNS"; arc=none smtp.client-ip=94.231.106.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gaisler.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gaisler.com Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=gaisler.com header.i=@gaisler.com header.b="LyYW5O84" Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4fSBhB5hzVz1Fljj; Fri, 6 Mar 2026 17:29:46 +0100 (CET) Received: from d-5xj5g74.got.gaisler.com.com (h-98-128-223-123.NA.cust.bahnhof.se [98.128.223.123]) by smtp.simply.com (Simply.com) with ESMTPA id 4fSBhB3RLZz1DDTY; Fri, 6 Mar 2026 17:29:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaisler.com; s=simplycom2; t=1772814586; bh=07n+7rUUHQB31+eXavT4VzVjngd4Ef6mCnRynH3s4pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LyYW5O84S2eycTn8c2Lrre/JPrqz/cZQoCy2290WEfPqr6e5P4meMVSf9nPjW/3KA laDOojphrnw5i1pXR63dcUT8JZe5NdOgwMbX1BeJoVQxDLh7pAJ5w4gV70G7ldYk5q hLb8ref0y3/kpfWEliGCBvw8cSECa6zFLqtDSyvEXE4hEVbDRHF2nWJC78DYzuLbCz cUFTLWAdFv93UCx584LAh5BcUZTz1UgBaQiyNbyF/lptNYLNkRQvSD8mbKTBHnmFXe NbWz66bU8wTY8MrcyGkf43I5WzkCx6eTsG8/E1vZoe9dtmhvvdDak8YqcVzv4zYCwY yhxB/YAAdA8dg== From: Arun Muthusamy To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mkl@pengutronix.de, mailhol@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, Daniel Hellstrom , Arun Muthusamy Subject: [PATCH v6 08/15] can: grcan: set DMA mask for GRCAN and GRCANFD to 32-bit Date: Fri, 6 Mar 2026 17:29:27 +0100 Message-ID: <20260306162934.22955-9-arun.muthusamy@gaisler.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260306162934.22955-1-arun.muthusamy@gaisler.com> References: <20260306162934.22955-1-arun.muthusamy@gaisler.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Daniel Hellstrom 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 Signed-off-by: Arun Muthusamy --- 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 a752aea51d96..74caedbcd55d 100644 --- a/drivers/net/can/grcan.c +++ b/drivers/net/can/grcan.c @@ -1747,6 +1747,13 @@ static int grcan_probe(struct platform_device *ofdev) goto exit_error; } =20 + /* On 64-bit systems.. GRCAN and GRCANFD can only address 32-bit */ + err =3D 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 =3D irq_of_parse_and_map(np, GRCAN_IRQIX_IRQ); if (!irq) { dev_err(&ofdev->dev, "no irq found\n"); --=20 2.51.0