Skip to contentSkip to conversation

hw/dma/pl080: Fix bad bit mask (PL080_CONF_M1 | PL080_CONF_M1)

PATCH Applied Thomas Huth 2 participants 2 messages Oct 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/dma/pl080: Fix bad bit mask (PL080_CONF_M1 | PL080_CONF_M1)

The M1 and M2 bits are both used for configuring the endianness of the AHB master interfaces, so the second PL080_CONF_M1 should be PL080_CONF_M2 instead.

---
 hw/dma/pl080.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/dma/pl080.c +1 -1
index 3bed5c3..7724c93 100644
@@ -351,7 +351,7 @@ static void pl080_write(void *opaque, hwaddr offset,
         break;
     case 12: /* Configuration */
         s->conf = value;
-        if (s->conf & (PL080_CONF_M1 | PL080_CONF_M1)) {
+        if (s->conf & (PL080_CONF_M1 | PL080_CONF_M2)) {
             qemu_log_mask(LOG_UNIMP,
                           "pl080_write: Big-endian DMA not implemented\n");
         }
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 15 lines · Thomas Huth

The M1 and M2 bits are both used for configuring the endianness of the AHB master interfaces, so the second PL080_CONF_M1 should be PL080_CONF_M2 instead.

---
 hw/dma/pl080.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/dma/pl080.c +0 -0
index 3bed5c3..7724c93 100644

hw/dma/pl080.c static void pl080_write(void *opaque, hwaddr offset,

Quoted 9 lines
hw/dma/pl080.c +1 -2
@@ -351,7 +351,7 @@ static void pl080_write(void *opaque, hwaddr offset,
         break;
     case 12: /* Configuration */
         s->conf = value;
-        if (s->conf & (PL080_CONF_M1 | PL080_CONF_M1)) {
+        if (s->conf & (PL080_CONF_M1 | PL080_CONF_M2)) {
             qemu_log_mask(LOG_UNIMP,
                           "pl080_write: Big-endian DMA not implemented\n");
         }
--

Applied to target-arm.next, thanks.

-- PMM