/* NOR flash devices */
typedef struct pflash_t pflash_t;
-pflash_t *pflash_register (target_phys_addr_t base, ram_addr_t off,
- BlockDriverState *bs,
- uint32_t sector_len, int nb_blocs, int width,
- uint16_t id0, uint16_t id1,
- uint16_t id2, uint16_t id3);
+/* pflash_cfi01.c */
+pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
+ BlockDriverState *bs,
+ uint32_t sector_len, int nb_blocs, int width,
+ uint16_t id0, uint16_t id1,
+ uint16_t id2, uint16_t id3);
+
+/* pflash_cfi02.c */
+pflash_t *pflash_cfi02_register(target_phys_addr_t base, ram_addr_t off,
+ BlockDriverState *bs,
+ uint32_t sector_len, int nb_blocs, int width,
+ uint16_t id0, uint16_t id1,
+ uint16_t id2, uint16_t id3);
/* nand.c */
struct nand_flash_s;
void ecc_reset(struct ecc_state_s *s);
void ecc_put(QEMUFile *f, struct ecc_state_s *s);
void ecc_get(QEMUFile *f, struct ecc_state_s *s);
-
exit(1);
}
- if (!pflash_register(0x00000000, qemu_ram_alloc(connex_rom),
+ if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(connex_rom),
drives_table[index].bdrv, sector_len, connex_rom / sector_len,
2, 0, 0, 0, 0)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
exit(1);
}
- if (!pflash_register(0x00000000, qemu_ram_alloc(verdex_rom),
+ if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(verdex_rom),
drives_table[index].bdrv, sector_len, verdex_rom / sector_len,
2, 0, 0, 0, 0)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
"'pflash' parameter\n");
exit(1);
}
- if (!pflash_register(MST_FLASH_0, mainstone_ram + PXA2XX_INTERNAL_SIZE,
+ if (!pflash_cfi01_register(MST_FLASH_0,
+ mainstone_ram + PXA2XX_INTERNAL_SIZE,
drives_table[index].bdrv,
256 * 1024, 128, 4, 0, 0, 0, 0)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
"'pflash' parameter\n");
exit(1);
}
- if (!pflash_register(MST_FLASH_1, mainstone_ram + PXA2XX_INTERNAL_SIZE,
+ if (!pflash_cfi01_register(MST_FLASH_1,
+ mainstone_ram + PXA2XX_INTERNAL_SIZE,
drives_table[index].bdrv,
256 * 1024, 128, 4, 0, 0, 0, 0)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
return ret;
}
-pflash_t *pflash_register (target_phys_addr_t base, ram_addr_t off,
- BlockDriverState *bs,
- target_ulong sector_len, int nb_blocs, int width,
- uint16_t id0, uint16_t id1,
- uint16_t id2, uint16_t id3)
+pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
+ BlockDriverState *bs, target_ulong sector_len,
+ int nb_blocs, int width,
+ uint16_t id0, uint16_t id1,
+ uint16_t id2, uint16_t id3)
{
pflash_t *pfl;
target_long total_len;
return ret;
}
-pflash_t *pflash_register (target_phys_addr_t base, ram_addr_t off,
- BlockDriverState *bs,
- uint32_t sector_len, int nb_blocs, int width,
- uint16_t id0, uint16_t id1,
- uint16_t id2, uint16_t id3)
+pflash_t *pflash_cfi02_register(target_phys_addr_t base, ram_addr_t off,
+ BlockDriverState *bs, target_ulong sector_len,
+ int nb_blocs, int width,
+ uint16_t id0, uint16_t id1,
+ uint16_t id2, uint16_t id3)
{
pflash_t *pfl;
int32_t total_len;
fl_idx, bios_size, bios_offset, -bios_size,
bdrv_get_device_name(drives_table[index].bdrv), fl_sectors);
#endif
- pflash_register((uint32_t)(-bios_size), bios_offset,
- drives_table[index].bdrv, 65536, fl_sectors, 2,
- 0x0001, 0x22DA, 0x0000, 0x0000);
+ pflash_cfi02_register((uint32_t)(-bios_size), bios_offset,
+ drives_table[index].bdrv, 65536, fl_sectors, 2,
+ 0x0001, 0x22DA, 0x0000, 0x0000);
fl_idx++;
} else
#endif
fl_idx, bios_size, bios_offset, -bios_size,
bdrv_get_device_name(drives_table[index].bdrv), fl_sectors);
#endif
- pflash_register((uint32_t)(-bios_size), bios_offset,
- drives_table[index].bdrv, 65536, fl_sectors, 4,
- 0x0001, 0x22DA, 0x0000, 0x0000);
+ pflash_cfi02_register((uint32_t)(-bios_size), bios_offset,
+ drives_table[index].bdrv, 65536, fl_sectors, 4,
+ 0x0001, 0x22DA, 0x0000, 0x0000);
fl_idx++;
} else
#endif
fl_idx, bios_size, bios_offset, (target_ulong)0xfc000000,
bdrv_get_device_name(drives_table[index].bdrv));
#endif
- pflash_register(0xfc000000, bios_offset, drives_table[index].bdrv,
- 65536, fl_sectors, 4,
- 0x0001, 0x22DA, 0x0000, 0x0000);
+ pflash_cfi02_register(0xfc000000, bios_offset,
+ drives_table[index].bdrv, 65536, fl_sectors, 4,
+ 0x0001, 0x22DA, 0x0000, 0x0000);
fl_idx++;
}
/* Register CLPD & LCD display */