Revision 130b0c98 hw/nand.c
b/hw/nand.c | ||
---|---|---|
450 | 450 |
cpu_abort(cpu_single_env, "%s: Unsupported NAND chip ID.\n", |
451 | 451 |
__FUNCTION__); |
452 | 452 |
} |
453 |
index = drive_get_index(IF_MTD, 0, 0); |
|
454 |
if (index == -1) { |
|
455 |
cpu_abort(cpu_single_env, "%s: missing MTD device\n", |
|
456 |
__FUNCTION__); |
|
457 |
} |
|
458 | 453 |
|
459 | 454 |
s = (struct nand_flash_s *) qemu_mallocz(sizeof(struct nand_flash_s)); |
460 |
s->bdrv = drives_table[index].bdrv; |
|
455 |
index = drive_get_index(IF_MTD, 0, 0); |
|
456 |
if (index != -1) |
|
457 |
s->bdrv = drives_table[index].bdrv; |
|
461 | 458 |
s->manf_id = manf_id; |
462 | 459 |
s->chip_id = chip_id; |
463 | 460 |
s->size = nand_flash_ids[s->chip_id].size << 20; |
Also available in: Unified diff