Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9094384pxu; Mon, 28 Dec 2020 06:30:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmy9nIDR751+fxb/zZ1CPq5jND2mx+9/UL0QQpP94gtwYMZ3WfHupbwmvnkbcS65GNZXoh X-Received: by 2002:a05:6402:354e:: with SMTP id f14mr34863479edd.183.1609165825891; Mon, 28 Dec 2020 06:30:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165825; cv=none; d=google.com; s=arc-20160816; b=GO8UvNBMH+fmZX6itp7NXjS/Kn+upDvEB76OXiEEkL/xAzyHDnBed9JraKU+7mXW7h 14N9vyDXfV9PtUCegr52ZwNDY12ekZK0+FhtX4E03x3+WUznedYQHuFWUIGp3LFLCcKH xf3UOhqPpydDpn3v1a1XZ0s5C/VU/ar6Oc4lJUQ0maatLM/93wQPKWaONKQvEXWycAY4 sqvyY6BWS0Z08tvE4ZkqZm/4sI01fOchH05lSwO84M9rCEA2xvUw20zGrkbhkwxXHTys 5R7NClYfTEGi7TiOQjohnk2G8jJapKCifv8HFQpOi0AJZYKTZQDaTybH+dCyX9j8UV7Z fI7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X77qr60/gBL3p/xIq5AckcQsffm/5iW2zwERs6mDQDI=; b=sp6DmyH38gYlcu2ZGFYUV1liSgvjpBtqFPqPfhlVM9xQstVmmcR48npFPJmcdeLpPn d+hBebeUd7OWtllBq0uHilDm9XrDX45N+nrWl+NqnT+9vHO2tJ4EO05KYVW8zWkDZXZY UZFr9AXC/QWAKQwDqlRKIbltYULhxVrSJNUnYdkrA6peEDS1yP5qNIgpTonyLW58GSgy v4ExAXk0rXQs1G3krSc/qBsff0yL/9ZLqjQ5s4Nb/QuRjccDOWOF858t0RXwQjXEM7/E Am4I7oSP4I8jrndauLvNUbUoeRvfggJECqhxNYuqV8a17V16BWYTQmS62XXqE+6xVrhz HpuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J3Ij4Xz9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si18801699ejd.293.2020.12.28.06.30.03; Mon, 28 Dec 2020 06:30:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J3Ij4Xz9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502336AbgL1O2Q (ORCPT + 99 others); Mon, 28 Dec 2020 09:28:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:35994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502267AbgL1O2I (ORCPT ); Mon, 28 Dec 2020 09:28:08 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B69E20731; Mon, 28 Dec 2020 14:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165647; bh=tdGdLUZfsF7tFpOXL0/+HJPdzx8bUH55MqPcJijOdC4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J3Ij4Xz9M3EloWeIkbfn1N325A+4dNTL7Fnqw+2nZujW1s/74rlvduscV/eqxgDfQ iyrYrkR5mfQD4mbbuNfJ2mUeyEDLTCweiB5bg2/xhC0TPE1n1aBEr2o5PAEX5QVfOf wh348XKQoJb75Zi8bXRiTpn3zJjAjsp57Rq4owBQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Sneddon , Nicolas Ferre , Alexandre Belloni , Cristian Birsan Subject: [PATCH 5.10 604/717] ARM: dts: at91: sama5d2: fix CAN message ram offset and size Date: Mon, 28 Dec 2020 13:50:02 +0100 Message-Id: <20201228125049.845682248@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Ferre commit 85b8350ae99d1300eb6dc072459246c2649a8e50 upstream. CAN0 and CAN1 instances share the same message ram configured at 0x210000 on sama5d2 Linux systems. According to current configuration of CAN0, we need 0x1c00 bytes so that the CAN1 don't overlap its message ram: 64 x RX FIFO0 elements => 64 x 72 bytes 32 x TXE (TX Event FIFO) elements => 32 x 8 bytes 32 x TXB (TX Buffer) elements => 32 x 72 bytes So a total of 7168 bytes (0x1C00). Fix offset to match this needed size. Make the CAN0 message ram ioremap match exactly this size so that is easily understandable. Adapt CAN1 size accordingly. Fixes: bc6d5d7666b7 ("ARM: dts: at91: sama5d2: add m_can nodes") Reported-by: Dan Sneddon Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Tested-by: Cristian Birsan Cc: stable@vger.kernel.org # v4.13+ Link: https://lore.kernel.org/r/20201203091949.9015-1-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/sama5d2.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm/boot/dts/sama5d2.dtsi +++ b/arch/arm/boot/dts/sama5d2.dtsi @@ -725,7 +725,7 @@ can0: can@f8054000 { compatible = "bosch,m_can"; - reg = <0xf8054000 0x4000>, <0x210000 0x4000>; + reg = <0xf8054000 0x4000>, <0x210000 0x1c00>; reg-names = "m_can", "message_ram"; interrupts = <56 IRQ_TYPE_LEVEL_HIGH 7>, <64 IRQ_TYPE_LEVEL_HIGH 7>; @@ -1131,7 +1131,7 @@ can1: can@fc050000 { compatible = "bosch,m_can"; - reg = <0xfc050000 0x4000>, <0x210000 0x4000>; + reg = <0xfc050000 0x4000>, <0x210000 0x3800>; reg-names = "m_can", "message_ram"; interrupts = <57 IRQ_TYPE_LEVEL_HIGH 7>, <65 IRQ_TYPE_LEVEL_HIGH 7>; @@ -1141,7 +1141,7 @@ assigned-clocks = <&pmc PMC_TYPE_GCK 57>; assigned-clock-parents = <&pmc PMC_TYPE_CORE PMC_UTMI>; assigned-clock-rates = <40000000>; - bosch,mram-cfg = <0x1100 0 0 64 0 0 32 32>; + bosch,mram-cfg = <0x1c00 0 0 64 0 0 32 32>; status = "disabled"; };