All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu: aspeed_smc: Calculate checksum on normal DMA
@ 2018-11-12 14:22 Christian Svensson
  2018-11-12 14:39 ` Cédric Le Goater
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Svensson @ 2018-11-12 14:22 UTC (permalink / raw)
  To: openbmc; +Cc: blue, joel, andrew, clg, Christian Svensson

This patch adds the missing checksum calculation on normal DMA transfer.
According to the datasheet this is how the SMC should behave.

Verified on AST1250 that the hardware matches the behaviour.

Signed-off-by: Christian Svensson <bluecmd@google.com>
---
 hw/ssi/aspeed_smc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index 55ceffe100..0dc22e44cf 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -871,6 +871,7 @@ static void aspeed_smc_dma_rw(AspeedSMCState *s)
         s->regs[R_DMA_FLASH_ADDR] += 4;
         s->regs[R_DMA_DRAM_ADDR] += 4;
         s->regs[R_DMA_LEN] -= 4;
+        s->regs[R_DMA_CHECKSUM] += data;
     }
 }
 
-- 
2.19.1.930.g4563a0d9d0-goog

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-11 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-12 14:22 [PATCH] qemu: aspeed_smc: Calculate checksum on normal DMA Christian Svensson
2018-11-12 14:39 ` Cédric Le Goater
2018-11-12 14:52   ` Christian Svensson
2019-01-11 12:30     ` Christian Svensson
2019-01-11 12:55       ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.