aboutsummaryrefslogtreecommitdiff
path: root/hw/mainstone.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/mainstone.c')
-rw-r--r--hw/mainstone.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/hw/mainstone.c b/hw/mainstone.c
index 3e517f0704..a4379e3ec6 100644
--- a/hw/mainstone.c
+++ b/hw/mainstone.c
@@ -79,6 +79,7 @@ static void mainstone_common_init(ram_addr_t ram_size,
qemu_irq *mst_irq;
DriveInfo *dinfo;
int i;
+ int be;
if (!cpu_model)
cpu_model = "pxa270-c5";
@@ -91,6 +92,11 @@ static void mainstone_common_init(ram_addr_t ram_size,
/* Setup initial (reset) machine state */
cpu->env->regs[15] = mainstone_binfo.loader_start;
+#ifdef TARGET_WORDS_BIGENDIAN
+ be = 1;
+#else
+ be = 0;
+#endif
/* There are two 32MiB flash devices on the board */
for (i = 0; i < 2; i ++) {
dinfo = drive_get(IF_PFLASH, 0, i);
@@ -101,9 +107,10 @@ static void mainstone_common_init(ram_addr_t ram_size,
}
if (!pflash_cfi01_register(mainstone_flash_base[i],
- qemu_ram_alloc(MAINSTONE_FLASH),
- dinfo->bdrv, sector_len,
- MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0)) {
+ qemu_ram_alloc(MAINSTONE_FLASH),
+ dinfo->bdrv, sector_len,
+ MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0,
+ be)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
exit(1);
}