diff options
Diffstat (limited to 'hw/etraxfs.c')
-rw-r--r-- | hw/etraxfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/etraxfs.c b/hw/etraxfs.c index c2eca5275e..ab6a3a302f 100644 --- a/hw/etraxfs.c +++ b/hw/etraxfs.c @@ -55,6 +55,7 @@ void bareetraxfs_init (ram_addr_t ram_size, void *etraxfs_dmac; struct etraxfs_dma_client *eth[2] = {NULL, NULL}; int kernel_size; + DriveInfo *dinfo; int i; ram_addr_t phys_ram; ram_addr_t phys_flash; @@ -79,9 +80,9 @@ void bareetraxfs_init (ram_addr_t ram_size, phys_flash = qemu_ram_alloc(FLASH_SIZE); - i = drive_get_index(IF_PFLASH, 0, 0); + dinfo = drive_get(IF_PFLASH, 0, 0); pflash_cfi02_register(0x0, phys_flash, - i != -1 ? drives_table[i].bdrv : NULL, (64 * 1024), + dinfo ? dinfo->bdrv : NULL, (64 * 1024), FLASH_SIZE >> 16, 1, 2, 0x0000, 0x0000, 0x0000, 0x0000, 0x555, 0x2aa); |