Skip to content

Commit

Permalink
hw/arm/gumstix: Simplify since the machines are little-endian only
Browse files Browse the repository at this point in the history
As the Connex and Verdex machines only boot in little-endian,
we can simplify the code.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
philmd authored and pm215 committed Mar 5, 2020
1 parent 5ca0e6f commit b6cb245
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions hw/arm/gumstix.c
Expand Up @@ -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;
Expand All @@ -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);
}
Expand All @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit b6cb245

Please sign in to comment.