Skip to contentSkip to conversation

can: m_can: m_can_platform: Fix the base address in iomap_write_fifo()

PATCH In review Aswath Govindraju 1 participant 2 messages Sep 16, 2021 – Sep 20, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: m_can: m_can_platform: Fix the base address in iomap_write_fifo()

The write into fifo must be performed with an offset from the message ram base address. Therefore, fix the base address to mram_base.

Fixes e39381770ec9 ("can: m_can: Disable IRQs on FIFO bus errors")
---
 drivers/net/can/m_can/m_can_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/m_can/m_can_platform.c +1 -1
index 308d4f2fff00..08eac03ebf2a 100644
@@ -52,7 +52,7 @@ static int iomap_write_fifo(struct m_can_classdev *cdev, int offset,
 {
 	struct m_can_plat_priv *priv = cdev_to_priv(cdev);
 
-	iowrite32_rep(priv->base + offset, val, val_count);
+	iowrite32_rep(priv->mram_base + offset, val, val_count);
 
 	return 0;
 }
Signature · 1 line
2.17.1
#1 lore raw

Hi all,

Quoted 6 lines · Aswath Govindraju

The write into fifo must be performed with an offset from the message ram base address. Therefore, fix the base address to mram_base.

Fixes e39381770ec9 ("can: m_can: Disable IRQs on FIFO bus errors")

---

This change along with some more fixes are squashed and posted in,

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Thanks,
Aswath

Quoted 17 lines
 drivers/net/can/m_can/m_can_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/m_can/m_can_platform.c +1 -1
index 308d4f2fff00..08eac03ebf2a 100644
@@ -52,7 +52,7 @@ static int iomap_write_fifo(struct m_can_classdev *cdev, int offset,
 {
 	struct m_can_plat_priv *priv = cdev_to_priv(cdev);
 
-	iowrite32_rep(priv->base + offset, val, val_count);
+	iowrite32_rep(priv->mram_base + offset, val, val_count);
 
 	return 0;
 }