]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
aspeed/i2c: Fix DMA address mask
authorCédric Le Goater <clg@kaod.org>
Sat, 1 May 2021 08:03:51 +0000 (10:03 +0200)
committerCédric Le Goater <clg@kaod.org>
Sat, 1 May 2021 08:03:51 +0000 (10:03 +0200)
The RAM memory region is now used for DMAs accesses instead of the
memory address space region. Mask off the top bits of the DMA address
to reflect this change.

Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20210407171637.777743-4-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/i2c/aspeed_i2c.c

index 518a3f5c6f9db9837c50b18a43711ba892421e36..e7133528899f60af866b038116474c37cbe08d3e 100644 (file)
@@ -601,7 +601,7 @@ static void aspeed_i2c_bus_write(void *opaque, hwaddr offset,
             break;
         }
 
-        bus->dma_addr = value & 0xfffffffc;
+        bus->dma_addr = value & 0x3ffffffc;
         break;
 
     case I2CD_DMA_LEN: