From 3d08ff698b938613699682b5c5432547a7ebe898 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Mon, 29 Mar 2010 19:23:56 +0000 Subject: Compile pflash_cfi01 only once Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl --- hw/mips_r4k.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'hw/mips_r4k.c') diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index 34b45062c4..0d5e2a626a 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -170,6 +170,7 @@ void mips_r4k_init (ram_addr_t ram_size, qemu_irq *i8259; DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; DriveInfo *dinfo; + int be; /* init CPUs */ if (cpu_model == NULL) { @@ -218,6 +219,11 @@ void mips_r4k_init (ram_addr_t ram_size, } else { bios_size = -1; } +#ifdef TARGET_WORDS_BIGENDIAN + be = 1; +#else + be = 0; +#endif if ((bios_size > 0) && (bios_size <= BIOS_SIZE)) { bios_offset = qemu_ram_alloc(BIOS_SIZE); cpu_register_physical_memory(0x1fc00000, BIOS_SIZE, @@ -228,8 +234,9 @@ void mips_r4k_init (ram_addr_t ram_size, uint32_t mips_rom = 0x00400000; bios_offset = qemu_ram_alloc(mips_rom); if (!pflash_cfi01_register(0x1fc00000, bios_offset, - dinfo->bdrv, sector_len, mips_rom / sector_len, - 4, 0, 0, 0, 0)) { + dinfo->bdrv, sector_len, + mips_rom / sector_len, + 4, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); } } -- cgit v1.2.3