From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lg4B1-0007m8-IE for qemu-devel@nongnu.org; Sat, 07 Mar 2009 16:35:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lg4B1-0007ls-33 for qemu-devel@nongnu.org; Sat, 07 Mar 2009 16:35:23 -0500 Received: from [199.232.76.173] (port=35842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lg4B1-0007lp-05 for qemu-devel@nongnu.org; Sat, 07 Mar 2009 16:35:23 -0500 Received: from savannah.gnu.org ([199.232.41.3]:58332 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lg4B0-0003Kw-MS for qemu-devel@nongnu.org; Sat, 07 Mar 2009 16:35:22 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Lg4Az-0006B3-Lk for qemu-devel@nongnu.org; Sat, 07 Mar 2009 21:35:21 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Lg4Az-0006Az-D2 for qemu-devel@nongnu.org; Sat, 07 Mar 2009 21:35:21 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sat, 07 Mar 2009 21:35:21 +0000 Subject: [Qemu-devel] [6763] ppc_oldworld: swap the MACIO and CMD646 IDE controllers Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6763 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6763 Author: aurel32 Date: 2009-03-07 21:35:21 +0000 (Sat, 07 Mar 2009) Log Message: ----------- ppc_oldworld: swap the MACIO and CMD646 IDE controllers Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/hw/ppc_oldworld.c Modified: trunk/hw/ppc_oldworld.c =================================================================== --- trunk/hw/ppc_oldworld.c 2009-03-07 21:28:24 UTC (rev 6762) +++ trunk/hw/ppc_oldworld.c 2009-03-07 21:35:21 UTC (rev 6763) @@ -308,12 +308,13 @@ for(i = 0; i < nb_nics; i++) 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) { fprintf(stderr, "qemu: too many IDE bus\n"); exit(1); } + + /* First IDE channel is a MAC IDE on the MacIO bus */ index = drive_get_index(IF_IDE, 0, 0); if (index == -1) hd[0] = NULL; @@ -324,10 +325,11 @@ hd[1] = NULL; else hd[1] = drives_table[index].bdrv; - hd[3] = hd[2] = NULL; - pci_cmd646_ide_init(pci_bus, hd, 0); + dbdma = DBDMA_init(&dbdma_mem_index); + 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); if (index == -1) hd[0] = NULL; @@ -338,12 +340,9 @@ hd[1] = NULL; else hd[1] = drives_table[index].bdrv; + hd[3] = hd[2] = NULL; + pci_cmd646_ide_init(pci_bus, hd, 0); - dbdma = DBDMA_init(&dbdma_mem_index); - - ide_mem_index[0] = -1; - ide_mem_index[1] = pmac_ide_init(hd, pic[0x0D], dbdma, 0x16, pic[0x02]); - /* cuda also initialize ADB */ cuda_init(&cuda_mem_index, pic[0x12]);