aboutsummaryrefslogtreecommitdiff
path: root/hw/omap1.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/omap1.c')
-rw-r--r--hw/omap1.c8
1 files changed, 4 insertions, 4 deletions
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"));