summaryrefslogtreecommitdiffstats
path: root/hw/misc/macio
diff options
context:
space:
mode:
authorMark Cave-Ayland2016-07-10 20:08:55 +0200
committerDavid Gibson2016-07-18 02:40:27 +0200
commit3f0d4128dc641f082c3631d610f843b0cdbb6e61 (patch)
tree03b2ccadd823f4041b869b9ca3dfdf10fe262913 /hw/misc/macio
parentdbdma: add per-channel debugging enabled via DEBUG_DBDMA_CHANMASK (diff)
downloadqemu-3f0d4128dc641f082c3631d610f843b0cdbb6e61.tar.gz
qemu-3f0d4128dc641f082c3631d610f843b0cdbb6e61.tar.xz
qemu-3f0d4128dc641f082c3631d610f843b0cdbb6e61.zip
dbdma: fix endian of DBDMA_CMDPTR_LO during branch
The current DBDMA command is stored in little-endian format, so make sure we convert it to match our CPU when updating the DBDMA_CMDPTR_LO register. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/misc/macio')
-rw-r--r--hw/misc/macio/mac_dbdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index e692312dcc..c4ee38109d 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -213,7 +213,7 @@ static void branch(DBDMA_channel *ch)
{
dbdma_cmd *current = &ch->current;
- ch->regs[DBDMA_CMDPTR_LO] = current->cmd_dep;
+ ch->regs[DBDMA_CMDPTR_LO] = le32_to_cpu(current->cmd_dep);
ch->regs[DBDMA_STATUS] |= BT;
dbdma_cmdptr_load(ch);
}