diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2016-07-10 19:08:55 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-07-18 10:40:27 +1000 |
commit | 3f0d4128dc641f082c3631d610f843b0cdbb6e61 (patch) | |
tree | 03b2ccadd823f4041b869b9ca3dfdf10fe262913 /hw/misc | |
parent | 3e49c43940fa3e61911969dd7b60534d9ec7f00f (diff) |
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')
-rw-r--r-- | hw/misc/macio/mac_dbdma.c | 2 |
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); } |