[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] hw/arm/gumstix: Simplify since the machines are little-endia
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/5] hw/arm/gumstix: Simplify since the machines are little-endian only |
Date: |
Fri, 28 Feb 2020 13:53:47 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
As the Connex and Verdex machines only boot in little-endian,
we can simplify the code.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
v2: Do not use target_words_bigendian(), arm-softmmu is only
little endian (Peter Maydell)
---
hw/arm/gumstix.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c
index f26a0e8010..3a4bc332c4 100644
--- a/hw/arm/gumstix.c
+++ b/hw/arm/gumstix.c
@@ -51,7 +51,6 @@ static void connex_init(MachineState *machine)
{
PXA2xxState *cpu;
DriveInfo *dinfo;
- int be;
MemoryRegion *address_space_mem = get_system_memory();
uint32_t connex_rom = 0x01000000;
@@ -66,14 +65,9 @@ static void connex_init(MachineState *machine)
exit(1);
}
-#ifdef TARGET_WORDS_BIGENDIAN
- be = 1;
-#else
- be = 0;
-#endif
if (!pflash_cfi01_register(0x00000000, "connext.rom", connex_rom,
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
- sector_len, 2, 0, 0, 0, 0, be)) {
+ sector_len, 2, 0, 0, 0, 0, 0)) {
error_report("Error registering flash memory");
exit(1);
}
@@ -87,7 +81,6 @@ static void verdex_init(MachineState *machine)
{
PXA2xxState *cpu;
DriveInfo *dinfo;
- int be;
MemoryRegion *address_space_mem = get_system_memory();
uint32_t verdex_rom = 0x02000000;
@@ -102,14 +95,9 @@ static void verdex_init(MachineState *machine)
exit(1);
}
-#ifdef TARGET_WORDS_BIGENDIAN
- be = 1;
-#else
- be = 0;
-#endif
if (!pflash_cfi01_register(0x00000000, "verdex.rom", verdex_rom,
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
- sector_len, 2, 0, 0, 0, 0, be)) {
+ sector_len, 2, 0, 0, 0, 0, 0)) {
error_report("Error registering flash memory");
exit(1);
}
--
2.21.1
- [PATCH 0/5] hw/arm: Remove big-endian checks on machine code, Philippe Mathieu-Daudé, 2020/02/28
- [PATCH 1/5] hw/arm/gumstix: Simplify since the machines are little-endian only,
Philippe Mathieu-Daudé <=
- [PATCH 3/5] hw/arm/omap_sx1: Simplify since the machines are little-endian only, Philippe Mathieu-Daudé, 2020/02/28
- [PATCH 2/5] hw/arm/mainstone: Simplify since the machines are little-endian only, Philippe Mathieu-Daudé, 2020/02/28
- [PATCH 4/5] hw/arm/z2: Simplify since the machines are little-endian only, Philippe Mathieu-Daudé, 2020/02/28
- [PATCH 5/5] hw/arm/musicpal: Simplify since the machines are little-endian only, Philippe Mathieu-Daudé, 2020/02/28
- Re: [PATCH 0/5] hw/arm: Remove big-endian checks on machine code, Richard Henderson, 2020/02/29