[PATCH] qemu: aspeed_smc: Calculate checksum on normal DMA
Cédric Le Goater
clg at kaod.org
Tue Nov 13 01:39:05 AEDT 2018
Hello Christian,
On 11/12/18 3:22 PM, Christian Svensson wrote:
> This patch adds the missing checksum calculation on normal DMA transfer.
> According to the datasheet this is how the SMC should behave.
The datasheet is not very clear on the topic.
Bit 2 of FMC80 says :
CheckSum Calculation Only
0: Normal DMA operation
1: Checksum accumulation only
This bit is valid only when the DMA direction = 0
and one could understand that under Normal DMA operation, there is
no Checksum accumulation.
Anyhow, I am ok for adding the change.
> Verified on AST1250 that the hardware matches the behaviour.
Did you check under u-boot, did you add DMA support to the Linux driver ?
do you have a firmware doing so you could share ? I would like to check
for the ast2500.
Thanks,
C.
> Signed-off-by: Christian Svensson <bluecmd at 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;
> }
> }
>
>
More information about the openbmc
mailing list