aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-25 00:29:23 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-25 00:29:23 +0000
commit1fc678cc72d7ba572fe1ac55dc2f711e77357e54 (patch)
tree10d7eaa1dfca94ee4dc6c56572c0de7b918e8db6 /hw
parentc81b74018df51d5e04fad731d1e159e524189e44 (diff)
downloadqemu-1fc678cc72d7ba572fe1ac55dc2f711e77357e54.zip
qemu-1fc678cc72d7ba572fe1ac55dc2f711e77357e54.tar.gz
qemu-1fc678cc72d7ba572fe1ac55dc2f711e77357e54.tar.bz2
Fix board init arg list (spotted by pbrook),
clean-up NOR flash parameters. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3734 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/gumstix.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/hw/gumstix.c b/hw/gumstix.c
index 5ef1fb7..15562b7 100644
--- a/hw/gumstix.c
+++ b/hw/gumstix.c
@@ -39,9 +39,10 @@
#include "devices.h"
#include "boards.h"
+static const int sector_len = 128 * 1024;
+
static void connex_init(int ram_size, int vga_ram_size,
const char *boot_device, DisplayState *ds,
- const char **fd_filename, int snapshot,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
@@ -64,8 +65,9 @@ static void connex_init(int ram_size, int vga_ram_size,
exit(1);
}
- if (!pflash_register(0x00000000, connex_ram + PXA2XX_INTERNAL_SIZE,
- pflash_table[0], 128 * 1024, 128, 2, 0, 0, 0, 0)) {
+ if (!pflash_register(0x00000000, qemu_ram_alloc(connex_rom),
+ pflash_table[0], sector_len, connex_rom / sector_len,
+ 2, 0, 0, 0, 0)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
exit(1);
}
@@ -93,7 +95,7 @@ static void verdex_init(int ram_size, int vga_ram_size,
exit(1);
}
- cpu = pxa270_init(verdex_ram, ds, "pxa270-c0");
+ cpu = pxa270_init(verdex_ram, ds, cpu_model ?: "pxa270-c0");
if (pflash_table[0] == NULL) {
fprintf(stderr, "A flash image must be given with the "
@@ -101,8 +103,9 @@ static void verdex_init(int ram_size, int vga_ram_size,
exit(1);
}
- if (!pflash_register(0x00000000, verdex_ram + PXA2XX_INTERNAL_SIZE,
- pflash_table[0], 128 * 1024, 256, 2, 0, 0, 0, 0)) {
+ if (!pflash_register(0x00000000, qemu_ram_alloc(verdex_rom),
+ pflash_table[0], sector_len, verdex_rom / sector_len,
+ 2, 0, 0, 0, 0)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
exit(1);
}