From ae275f71338ad4e567c7f2683bf28e66847eabe4 Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Wed, 4 Sep 2019 09:05:04 +0200 Subject: [PATCH] aspeed/smc: Calculate checksum on normal DMA MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater Message-id: 20190904070506.1052-9-clg@kaod.org Signed-off-by: Peter Maydell --- 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 5c3436db5e..9ffc7e0117 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -989,6 +989,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.11.0