Revision 75717903 hw/ppc_newworld.c

b/hw/ppc_newworld.c
325 325
    for(i = 0; i < nb_nics; i++)
326 326
        pci_nic_init_nofail(&nd_table[i], "ne2k_pci", NULL);
327 327

  
328
    if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) {
329
        fprintf(stderr, "qemu: too many IDE bus\n");
330
        exit(1);
331
    }
328
    ide_drive_get(hd, MAX_IDE_BUS);
332 329
    dbdma = DBDMA_init(&dbdma_mem_index);
333 330

  
334 331
    /* We only emulate 2 out of 3 IDE controllers for now */
335 332
    ide_mem_index[0] = -1;
336
    hd[0] = drive_get(IF_IDE, 0, 0);
337
    hd[1] = drive_get(IF_IDE, 0, 1);
338 333
    ide_mem_index[1] = pmac_ide_init(hd, pic[0x0d], dbdma, 0x16, pic[0x02]);
339
    hd[0] = drive_get(IF_IDE, 1, 0);
340
    hd[1] = drive_get(IF_IDE, 1, 1);
341
    ide_mem_index[2] = pmac_ide_init(hd, pic[0x0e], dbdma, 0x1a, pic[0x02]);
334
    ide_mem_index[2] = pmac_ide_init(&hd[MAX_IDE_DEVS], pic[0x0e], dbdma, 0x1a, pic[0x02]);
342 335

  
343 336
    /* cuda also initialize ADB */
344 337
    if (machine_arch == ARCH_MAC99_U3) {

Also available in: Unified diff