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/gumstix.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'hw/gumstix.c') diff --git a/hw/gumstix.c b/hw/gumstix.c index 8fbf64c0f3..3fd31f4bfc 100644 --- a/hw/gumstix.c +++ b/hw/gumstix.c @@ -48,6 +48,7 @@ static void connex_init(ram_addr_t ram_size, { PXA2xxState *cpu; DriveInfo *dinfo; + int be; uint32_t connex_rom = 0x01000000; uint32_t connex_ram = 0x04000000; @@ -61,9 +62,14 @@ static void connex_init(ram_addr_t ram_size, exit(1); } +#ifdef TARGET_WORDS_BIGENDIAN + be = 1; +#else + be = 0; +#endif if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(connex_rom), - dinfo->bdrv, sector_len, connex_rom / sector_len, - 2, 0, 0, 0, 0)) { + dinfo->bdrv, sector_len, connex_rom / sector_len, + 2, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); exit(1); } @@ -82,6 +88,7 @@ static void verdex_init(ram_addr_t ram_size, { PXA2xxState *cpu; DriveInfo *dinfo; + int be; uint32_t verdex_rom = 0x02000000; uint32_t verdex_ram = 0x10000000; @@ -95,9 +102,14 @@ static void verdex_init(ram_addr_t ram_size, exit(1); } +#ifdef TARGET_WORDS_BIGENDIAN + be = 1; +#else + be = 0; +#endif if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(verdex_rom), - dinfo->bdrv, sector_len, verdex_rom / sector_len, - 2, 0, 0, 0, 0)) { + dinfo->bdrv, sector_len, verdex_rom / sector_len, + 2, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); exit(1); } -- cgit v1.2.3