Commit 1fc678cc72d7ba572fe1ac55dc2f711e77357e54
1 parent
c81b7401
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
Showing
1 changed file
with
9 additions
and
6 deletions
hw/gumstix.c
| @@ -39,9 +39,10 @@ | @@ -39,9 +39,10 @@ | ||
| 39 | #include "devices.h" | 39 | #include "devices.h" |
| 40 | #include "boards.h" | 40 | #include "boards.h" |
| 41 | 41 | ||
| 42 | +static const int sector_len = 128 * 1024; | ||
| 43 | + | ||
| 42 | static void connex_init(int ram_size, int vga_ram_size, | 44 | static void connex_init(int ram_size, int vga_ram_size, |
| 43 | const char *boot_device, DisplayState *ds, | 45 | const char *boot_device, DisplayState *ds, |
| 44 | - const char **fd_filename, int snapshot, | ||
| 45 | const char *kernel_filename, const char *kernel_cmdline, | 46 | const char *kernel_filename, const char *kernel_cmdline, |
| 46 | const char *initrd_filename, const char *cpu_model) | 47 | const char *initrd_filename, const char *cpu_model) |
| 47 | { | 48 | { |
| @@ -64,8 +65,9 @@ static void connex_init(int ram_size, int vga_ram_size, | @@ -64,8 +65,9 @@ static void connex_init(int ram_size, int vga_ram_size, | ||
| 64 | exit(1); | 65 | exit(1); |
| 65 | } | 66 | } |
| 66 | 67 | ||
| 67 | - if (!pflash_register(0x00000000, connex_ram + PXA2XX_INTERNAL_SIZE, | ||
| 68 | - pflash_table[0], 128 * 1024, 128, 2, 0, 0, 0, 0)) { | 68 | + if (!pflash_register(0x00000000, qemu_ram_alloc(connex_rom), |
| 69 | + pflash_table[0], sector_len, connex_rom / sector_len, | ||
| 70 | + 2, 0, 0, 0, 0)) { | ||
| 69 | fprintf(stderr, "qemu: Error registering flash memory.\n"); | 71 | fprintf(stderr, "qemu: Error registering flash memory.\n"); |
| 70 | exit(1); | 72 | exit(1); |
| 71 | } | 73 | } |
| @@ -93,7 +95,7 @@ static void verdex_init(int ram_size, int vga_ram_size, | @@ -93,7 +95,7 @@ static void verdex_init(int ram_size, int vga_ram_size, | ||
| 93 | exit(1); | 95 | exit(1); |
| 94 | } | 96 | } |
| 95 | 97 | ||
| 96 | - cpu = pxa270_init(verdex_ram, ds, "pxa270-c0"); | 98 | + cpu = pxa270_init(verdex_ram, ds, cpu_model ?: "pxa270-c0"); |
| 97 | 99 | ||
| 98 | if (pflash_table[0] == NULL) { | 100 | if (pflash_table[0] == NULL) { |
| 99 | fprintf(stderr, "A flash image must be given with the " | 101 | 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, | @@ -101,8 +103,9 @@ static void verdex_init(int ram_size, int vga_ram_size, | ||
| 101 | exit(1); | 103 | exit(1); |
| 102 | } | 104 | } |
| 103 | 105 | ||
| 104 | - if (!pflash_register(0x00000000, verdex_ram + PXA2XX_INTERNAL_SIZE, | ||
| 105 | - pflash_table[0], 128 * 1024, 256, 2, 0, 0, 0, 0)) { | 106 | + if (!pflash_register(0x00000000, qemu_ram_alloc(verdex_rom), |
| 107 | + pflash_table[0], sector_len, verdex_rom / sector_len, | ||
| 108 | + 2, 0, 0, 0, 0)) { | ||
| 106 | fprintf(stderr, "qemu: Error registering flash memory.\n"); | 109 | fprintf(stderr, "qemu: Error registering flash memory.\n"); |
| 107 | exit(1); | 110 | exit(1); |
| 108 | } | 111 | } |