summaryrefslogtreecommitdiff
path: root/hw/etraxfs.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-07-22 16:42:57 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 14:08:23 -0500
commit751c6a17042b5d011013d6963c0505d671cf708e (patch)
tree61a769ed1a1c16ebdfc1397ce9d775222dfa8e57 /hw/etraxfs.c
parent8a14daa5a1ae22fcfc317f4727a88d6c15c39aae (diff)
downloadqemu-751c6a17042b5d011013d6963c0505d671cf708e.tar.gz
kill drives_table
First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/etraxfs.c')
-rw-r--r--hw/etraxfs.c5
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);