aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-04 00:10:34 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-04 00:10:34 +0000
commit9d413d1d4902a22059fa0ac6e6b621fe43cf9403 (patch)
tree389b83f9091f79833a7aaac238c40e55977f65d8 /hw
parent6a5bd307023ac14089cbcc9e26790f8747f96af9 (diff)
Always create an SD bdrv, so that PXA and OMAP boards can boot with
no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3771 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/omap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/omap.c b/hw/omap.c
index c56cd2423d..af938706e4 100644
--- a/hw/omap.c
+++ b/hw/omap.c
@@ -4901,7 +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;
+ int sdindex;
if (!core)
core = "ti925t";
@@ -4998,14 +4998,14 @@ 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"));
- index = drive_get_index(IF_SD, 0, 0);
- if (index == -1) {
+ sdindex = drive_get_index(IF_SD, 0, 0);
+ if (sdindex == -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->mmc = omap_mmc_init(0xfffb7800, drives_table[sdindex].bdrv,
+ s->irq[1][OMAP_INT_OQN], &s->drq[OMAP_DMA_MMC_TX],
+ omap_findclk(s, "mmc_ck"));
s->mpuio = omap_mpuio_init(0xfffb5000,
s->irq[1][OMAP_INT_KEYBOARD], s->irq[1][OMAP_INT_MPUIO],