Commit bd4524edb80610a5e5523599aaa81614a512056c

Authored by aurel32
1 parent 3098dba0

ppc_oldworld: swap the MACIO and CMD646 IDE controllers

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6763 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 8 additions and 9 deletions
hw/ppc_oldworld.c
... ... @@ -308,12 +308,13 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
308 308 for(i = 0; i < nb_nics; i++)
309 309 pci_nic_init(pci_bus, &nd_table[i], -1, "ne2k_pci");
310 310  
311   - /* First IDE channel is a CMD646 on the PCI bus */
312 311  
313 312 if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) {
314 313 fprintf(stderr, "qemu: too many IDE bus\n");
315 314 exit(1);
316 315 }
  316 +
  317 + /* First IDE channel is a MAC IDE on the MacIO bus */
317 318 index = drive_get_index(IF_IDE, 0, 0);
318 319 if (index == -1)
319 320 hd[0] = NULL;
... ... @@ -324,10 +325,11 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
324 325 hd[1] = NULL;
325 326 else
326 327 hd[1] = drives_table[index].bdrv;
327   - hd[3] = hd[2] = NULL;
328   - pci_cmd646_ide_init(pci_bus, hd, 0);
  328 + dbdma = DBDMA_init(&dbdma_mem_index);
  329 + ide_mem_index[0] = -1;
  330 + ide_mem_index[1] = pmac_ide_init(hd, pic[0x0D], dbdma, 0x16, pic[0x02]);
329 331  
330   - /* Second IDE channel is a MAC IDE on the MacIO bus */
  332 + /* Second IDE channel is a CMD646 on the PCI bus */
331 333 index = drive_get_index(IF_IDE, 1, 0);
332 334 if (index == -1)
333 335 hd[0] = NULL;
... ... @@ -338,11 +340,8 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
338 340 hd[1] = NULL;
339 341 else
340 342 hd[1] = drives_table[index].bdrv;
341   -
342   - dbdma = DBDMA_init(&dbdma_mem_index);
343   -
344   - ide_mem_index[0] = -1;
345   - ide_mem_index[1] = pmac_ide_init(hd, pic[0x0D], dbdma, 0x16, pic[0x02]);
  343 + hd[3] = hd[2] = NULL;
  344 + pci_cmd646_ide_init(pci_bus, hd, 0);
346 345  
347 346 /* cuda also initialize ADB */
348 347 cuda_init(&cuda_mem_index, pic[0x12]);
... ...