]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/omap.c
Add -drive parameter, by Laurent Vivier.
[mirror_qemu.git] / hw / omap.c
index c8d5064f634aef7d15b14ffc3d12625eee253ca5..c56cd2423d78f3ff5b5f758a4f02cf1d06b3b778 100644 (file)
--- a/hw/omap.c
+++ b/hw/omap.c
@@ -4901,6 +4901,7 @@ struct omap_mpu_state_s *omap310_mpu_init(unsigned long sdram_size,
     struct omap_mpu_state_s *s = (struct omap_mpu_state_s *)
             qemu_mallocz(sizeof(struct omap_mpu_state_s));
     ram_addr_t imif_base, emiff_base;
+    int index;
     
     if (!core)
         core = "ti925t";
@@ -4997,7 +4998,13 @@ 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"));
 
-    s->mmc = omap_mmc_init(0xfffb7800, sd_bdrv, s->irq[1][OMAP_INT_OQN],
+    index = drive_get_index(IF_SD, 0, 0);
+    if (index == -1) {
+        fprintf(stderr, "qemu: missing SecureDigital device\n");
+        exit(1);
+    }
+    s->mmc = omap_mmc_init(0xfffb7800, drives_table[index].bdrv,
+                    s->irq[1][OMAP_INT_OQN],
                     &s->drq[OMAP_DMA_MMC_TX], omap_findclk(s, "mmc_ck"));
 
     s->mpuio = omap_mpuio_init(0xfffb5000,