From 751c6a17042b5d011013d6963c0505d671cf708e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 22 Jul 2009 16:42:57 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- hw/omap1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/omap1.c') diff --git a/hw/omap1.c b/hw/omap1.c index 14d7a829c0..93515ee810 100644 --- a/hw/omap1.c +++ b/hw/omap1.c @@ -4628,7 +4628,7 @@ struct omap_mpu_state_s *omap310_mpu_init(unsigned long sdram_size, ram_addr_t imif_base, emiff_base; qemu_irq *cpu_irq; qemu_irq dma_irqs[6]; - int sdindex; + DriveInfo *dinfo; if (!core) core = "ti925t"; @@ -4740,12 +4740,12 @@ struct omap_mpu_state_s *omap310_mpu_init(unsigned long sdram_size, omap_dpll_init(&s->dpll[1], 0xfffed000, omap_findclk(s, "dpll2")); omap_dpll_init(&s->dpll[2], 0xfffed100, omap_findclk(s, "dpll3")); - sdindex = drive_get_index(IF_SD, 0, 0); - if (sdindex == -1) { + dinfo = drive_get(IF_SD, 0, 0); + if (!dinfo) { fprintf(stderr, "qemu: missing SecureDigital device\n"); exit(1); } - s->mmc = omap_mmc_init(0xfffb7800, drives_table[sdindex].bdrv, + s->mmc = omap_mmc_init(0xfffb7800, dinfo->bdrv, s->irq[1][OMAP_INT_OQN], &s->drq[OMAP_DMA_MMC_TX], omap_findclk(s, "mmc_ck")); -- cgit v1.2.3