qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PULL 36/39] hw/mips: Mark Boston machine devices as little-endian
Date: Sun, 16 Feb 2025 22:01:00 +0100	[thread overview]
Message-ID: <20250216210103.70235-9-philmd@linaro.org> (raw)
In-Reply-To: <20250216210103.70235-1-philmd@linaro.org>

The Boston machine is only built as little-endian.
Therefore the DEVICE_NATIVE_ENDIAN definition expand to
DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case
isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250212113938.38692-3-philmd@linaro.org>
---
 hw/mips/boston.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index 364c328032a..4690b254dda 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -220,7 +220,7 @@ static void boston_lcd_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps boston_lcd_ops = {
     .read = boston_lcd_read,
     .write = boston_lcd_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static uint64_t boston_platreg_read(void *opaque, hwaddr addr,
@@ -299,7 +299,7 @@ static void boston_platreg_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps boston_platreg_ops = {
     .read = boston_platreg_read,
     .write = boston_platreg_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static void mips_boston_instance_init(Object *obj)
@@ -758,7 +758,7 @@ static void boston_mach_init(MachineState *machine)
 
     s->uart = serial_mm_init(sys_mem, boston_memmap[BOSTON_UART].base, 2,
                              get_cps_irq(&s->cps, 3), 10000000,
-                             serial_hd(0), DEVICE_NATIVE_ENDIAN);
+                             serial_hd(0), DEVICE_LITTLE_ENDIAN);
 
     lcd = g_new(MemoryRegion, 1);
     memory_region_init_io(lcd, NULL, &boston_lcd_ops, s, "boston-lcd", 0x8);
-- 
2.47.1



  parent reply	other threads:[~2025-02-16 21:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 21:00 [PULL 00/39] Misc HW patches for 2025-02-16 Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 29/39] hw/qdev-properties-system: Introduce EndianMode QAPI enum Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 30/39] hw/intc/xilinx_intc: Make device endianness configurable Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 31/39] hw/net/xilinx_ethlite: " Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 32/39] hw/timer/xilinx_timer: " Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 33/39] hw/char/xilinx_uartlite: " Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 34/39] hw/ssi/xilinx_spi: " Philippe Mathieu-Daudé
2025-02-16 21:00 ` [PULL 35/39] hw/arm: Mark Allwinner Technology devices as little-endian Philippe Mathieu-Daudé
2025-02-16 21:01 ` Philippe Mathieu-Daudé [this message]
2025-02-16 21:01 ` [PULL 37/39] hw/mips: Mark Loonson3 Virt machine " Philippe Mathieu-Daudé
2025-02-16 21:01 ` [PULL 38/39] hw/pci-host: Mark versatile regions " Philippe Mathieu-Daudé
2025-02-16 21:01 ` [PULL 39/39] hw/rx: Allow execution without either bios or kernel Philippe Mathieu-Daudé
2025-02-17  8:25 ` [PULL 00/39] Misc HW patches for 2025-02-16 Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250216210103.70235-9-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).