aboutsummaryrefslogtreecommitdiff
path: root/hw/omap2.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/omap2.c
parent8a14daa5a1ae22fcfc317f4727a88d6c15c39aae (diff)
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/omap2.c')
-rw-r--r--hw/omap2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/omap2.c b/hw/omap2.c
index 8cbc4b5ea4..e43b4a88b3 100644
--- a/hw/omap2.c
+++ b/hw/omap2.c
@@ -4496,7 +4496,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(unsigned long sdram_size,
qemu_irq *cpu_irq;
qemu_irq dma_irqs[4];
omap_clk gpio_clks[4];
- int sdindex;
+ DriveInfo *dinfo;
int i;
/* Core */
@@ -4645,12 +4645,12 @@ struct omap_mpu_state_s *omap2420_mpu_init(unsigned long sdram_size,
s->sdrc = omap_sdrc_init(0x68009000);
s->gpmc = omap_gpmc_init(0x6800a000, s->irq[0][OMAP_INT_24XX_GPMC_IRQ]);
- 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 = omap2_mmc_init(omap_l4tao(s->l4, 9), drives_table[sdindex].bdrv,
+ s->mmc = omap2_mmc_init(omap_l4tao(s->l4, 9), dinfo->bdrv,
s->irq[0][OMAP_INT_24XX_MMC_IRQ],
&s->drq[OMAP24XX_DMA_MMC1_TX],
omap_findclk(s, "mmc_fclk"), omap_findclk(s, "mmc_iclk"));