From: Christian Svensson <bluecmd@google.com>
To: openbmc@lists.ozlabs.org
Cc: blue@cmd.nu, joel@jms.id.au, andrew@aj.id.au, clg@kaod.org,
Christian Svensson <bluecmd@google.com>
Subject: [PATCH] qemu: aspeed_smc: Calculate checksum on normal DMA
Date: Mon, 12 Nov 2018 15:22:32 +0100 [thread overview]
Message-ID: <20181112142231.162425-1-bluecmd@google.com> (raw)
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
next reply other threads:[~2018-11-12 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 14:22 Christian Svensson [this message]
2018-11-12 14:39 ` [PATCH] qemu: aspeed_smc: Calculate checksum on normal DMA 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181112142231.162425-1-bluecmd@google.com \
--to=bluecmd@google.com \
--cc=andrew@aj.id.au \
--cc=blue@cmd.nu \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.