aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Ferre2020-12-03 03:19:49 -0600
committerGreg Kroah-Hartman2020-12-29 06:47:08 -0600
commitaa81ca1a407804e840af528579fbdb3362e20f84 (patch)
tree2f837f090e9c99d9067875b67572077f57c6ba01
parentb287372c5f380d6761dbedc1bf9c3ba5413e932c (diff)
downloadkernel-aa81ca1a407804e840af528579fbdb3362e20f84.tar.gz
kernel-aa81ca1a407804e840af528579fbdb3362e20f84.tar.xz
kernel-aa81ca1a407804e840af528579fbdb3362e20f84.zip
ARM: dts: at91: sama5d2: fix CAN message ram offset and size
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 <dan.sneddon@microchip.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Tested-by: Cristian Birsan <cristian.birsan@microchip.com> 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 <gregkh@linuxfoundation.org>
-rw-r--r--arch/arm/boot/dts/sama5d2.dtsi6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
index 8a09c2eab0f9..d6e3f975323d 100644
--- a/arch/arm/boot/dts/sama5d2.dtsi
+++ b/arch/arm/boot/dts/sama5d2.dtsi
@@ -1294,7 +1294,7 @@
1294 1294
1295 can0: can@f8054000 { 1295 can0: can@f8054000 {
1296 compatible = "bosch,m_can"; 1296 compatible = "bosch,m_can";
1297 reg = <0xf8054000 0x4000>, <0x210000 0x4000>; 1297 reg = <0xf8054000 0x4000>, <0x210000 0x1c00>;
1298 reg-names = "m_can", "message_ram"; 1298 reg-names = "m_can", "message_ram";
1299 interrupts = <56 IRQ_TYPE_LEVEL_HIGH 7>, 1299 interrupts = <56 IRQ_TYPE_LEVEL_HIGH 7>,
1300 <64 IRQ_TYPE_LEVEL_HIGH 7>; 1300 <64 IRQ_TYPE_LEVEL_HIGH 7>;
@@ -1485,7 +1485,7 @@
1485 1485
1486 can1: can@fc050000 { 1486 can1: can@fc050000 {
1487 compatible = "bosch,m_can"; 1487 compatible = "bosch,m_can";
1488 reg = <0xfc050000 0x4000>, <0x210000 0x4000>; 1488 reg = <0xfc050000 0x4000>, <0x210000 0x3800>;
1489 reg-names = "m_can", "message_ram"; 1489 reg-names = "m_can", "message_ram";
1490 interrupts = <57 IRQ_TYPE_LEVEL_HIGH 7>, 1490 interrupts = <57 IRQ_TYPE_LEVEL_HIGH 7>,
1491 <65 IRQ_TYPE_LEVEL_HIGH 7>; 1491 <65 IRQ_TYPE_LEVEL_HIGH 7>;
@@ -1495,7 +1495,7 @@
1495 assigned-clocks = <&can1_gclk>; 1495 assigned-clocks = <&can1_gclk>;
1496 assigned-clock-parents = <&utmi>; 1496 assigned-clock-parents = <&utmi>;
1497 assigned-clock-rates = <40000000>; 1497 assigned-clock-rates = <40000000>;
1498 bosch,mram-cfg = <0x1100 0 0 64 0 0 32 32>; 1498 bosch,mram-cfg = <0x1c00 0 0 64 0 0 32 32>;
1499 status = "disabled"; 1499 status = "disabled";
1500 }; 1500 };
1501 1501