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
This commit is contained in:
		
							parent
							
								
									3098dba01c
								
							
						
					
					
						commit
						bd4524edb8
					
				@ -308,12 +308,13 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
 | 
				
			|||||||
    for(i = 0; i < nb_nics; i++)
 | 
					    for(i = 0; i < nb_nics; i++)
 | 
				
			||||||
        pci_nic_init(pci_bus, &nd_table[i], -1, "ne2k_pci");
 | 
					        pci_nic_init(pci_bus, &nd_table[i], -1, "ne2k_pci");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* First IDE channel is a CMD646 on the PCI bus */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) {
 | 
					    if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) {
 | 
				
			||||||
        fprintf(stderr, "qemu: too many IDE bus\n");
 | 
					        fprintf(stderr, "qemu: too many IDE bus\n");
 | 
				
			||||||
        exit(1);
 | 
					        exit(1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* First IDE channel is a MAC IDE on the MacIO bus */
 | 
				
			||||||
    index = drive_get_index(IF_IDE, 0, 0);
 | 
					    index = drive_get_index(IF_IDE, 0, 0);
 | 
				
			||||||
    if (index == -1)
 | 
					    if (index == -1)
 | 
				
			||||||
        hd[0] = NULL;
 | 
					        hd[0] = NULL;
 | 
				
			||||||
@ -324,10 +325,11 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
 | 
				
			|||||||
        hd[1] = NULL;
 | 
					        hd[1] = NULL;
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        hd[1] =  drives_table[index].bdrv;
 | 
					        hd[1] =  drives_table[index].bdrv;
 | 
				
			||||||
    hd[3] = hd[2] = NULL;
 | 
					    dbdma = DBDMA_init(&dbdma_mem_index);
 | 
				
			||||||
    pci_cmd646_ide_init(pci_bus, hd, 0);
 | 
					    ide_mem_index[0] = -1;
 | 
				
			||||||
 | 
					    ide_mem_index[1] = pmac_ide_init(hd, pic[0x0D], dbdma, 0x16, pic[0x02]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Second IDE channel is a MAC IDE on the MacIO bus */
 | 
					    /* Second IDE channel is a CMD646 on the PCI bus */
 | 
				
			||||||
    index = drive_get_index(IF_IDE, 1, 0);
 | 
					    index = drive_get_index(IF_IDE, 1, 0);
 | 
				
			||||||
    if (index == -1)
 | 
					    if (index == -1)
 | 
				
			||||||
        hd[0] = NULL;
 | 
					        hd[0] = NULL;
 | 
				
			||||||
@ -338,11 +340,8 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
 | 
				
			|||||||
        hd[1] = NULL;
 | 
					        hd[1] = NULL;
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        hd[1] =  drives_table[index].bdrv;
 | 
					        hd[1] =  drives_table[index].bdrv;
 | 
				
			||||||
 | 
					    hd[3] = hd[2] = NULL;
 | 
				
			||||||
    dbdma = DBDMA_init(&dbdma_mem_index);
 | 
					    pci_cmd646_ide_init(pci_bus, hd, 0);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    ide_mem_index[0] = -1;
 | 
					 | 
				
			||||||
    ide_mem_index[1] = pmac_ide_init(hd, pic[0x0D], dbdma, 0x16, pic[0x02]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* cuda also initialize ADB */
 | 
					    /* cuda also initialize ADB */
 | 
				
			||||||
    cuda_init(&cuda_mem_index, pic[0x12]);
 | 
					    cuda_init(&cuda_mem_index, pic[0x12]);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user