From 5f9fc5ad7efe2840d3170775768fb85686d94869 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Mon, 29 Mar 2010 19:23:55 +0000 Subject: Compile pflash_cfi02 only once Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl --- hw/musicpal.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hw/musicpal.c') diff --git a/hw/musicpal.c b/hw/musicpal.c index 7fc9fb37cb..ebd933e2f5 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -1558,12 +1558,22 @@ static void musicpal_init(ram_addr_t ram_size, * 0xFF800000 (if there is 8 MB flash). So remap flash access if the * image is smaller than 32 MB. */ +#ifdef TARGET_WORDS_BIGENDIAN pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, qemu_ram_alloc(flash_size), dinfo->bdrv, 0x10000, (flash_size + 0xffff) >> 16, MP_FLASH_SIZE_MAX / flash_size, 2, 0x00BF, 0x236D, 0x0000, 0x0000, - 0x5555, 0x2AAA); + 0x5555, 0x2AAA, 1); +#else + pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, qemu_ram_alloc(flash_size), + dinfo->bdrv, 0x10000, + (flash_size + 0xffff) >> 16, + MP_FLASH_SIZE_MAX / flash_size, + 2, 0x00BF, 0x236D, 0x0000, 0x0000, + 0x5555, 0x2AAA, 0); +#endif + } sysbus_create_simple("mv88w8618_flashcfg", MP_FLASHCFG_BASE, NULL); -- cgit v1.2.3