diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-03-29 19:23:56 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-03-29 19:23:56 +0000 |
commit | 3d08ff698b938613699682b5c5432547a7ebe898 (patch) | |
tree | d5613c54e9bb1ce20d5e26db288d99d2a00ad128 /hw/gumstix.c | |
parent | 5f9fc5ad7efe2840d3170775768fb85686d94869 (diff) |
Compile pflash_cfi01 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/gumstix.c')
-rw-r--r-- | hw/gumstix.c | 20 |
1 files changed, 16 insertions, 4 deletions
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); } |