mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
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>
This commit is contained in:
parent
8a14daa5a1
commit
751c6a1704
36 changed files with 308 additions and 343 deletions
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue