From 0bb5270f7b35758e738d1b6b5e83fbdb3bae541b Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Fri, 1 Nov 2024 16:19:26 +0000 Subject: [PATCH] drivers: can: sam: fix sys_write32() arguments order Fix the order of the arguments to sys_write32(). Fixes: #80750 Signed-off-by: Henrik Brix Andersen --- drivers/can/can_sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/can/can_sam.c b/drivers/can/can_sam.c index 23d9dd5089f..e3fc6c18393 100644 --- a/drivers/can/can_sam.c +++ b/drivers/can/can_sam.c @@ -106,7 +106,7 @@ static int can_sam_init(const struct device *dev) uint32_t mrba = sam_cfg->mram & 0xFFFF0000; /* keep lower 16bit; update DMA Base Register */ - sys_write32(sam_cfg->dma_base, (sys_read32(sam_cfg->dma_base) & 0x0000FFFF) | mrba); + sys_write32((sys_read32(sam_cfg->dma_base) & 0x0000FFFF) | mrba, sam_cfg->dma_base); ret = can_mcan_configure_mram(dev, mrba, sam_cfg->mram); if (ret != 0) {