[OpenBIOS] [commit] r1371 - trunk/openbios-devel/drivers

repository service svn at openbios.org
Mon Jan 4 13:03:41 CET 2016


Author: mcayland
Date: Mon Jan  4 13:03:40 2016
New Revision: 1371
URL: http://tracker.coreboot.org/trac/openbios/changeset/1371

Log:
macio: switch over to use 2 ata-3 ide controllers

This better matches real device trees and fixes Darwin/OS X boot from CDROM
under the QEMU mac99 machine (it seems that IOKit will only detect macio IDE
devices connected to an ata-3 ide controller rather than the previous ata-4
ide controller).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
Reviewed-by: Alexander Graf <agraf at suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/drivers/ide.c
   trunk/openbios-devel/drivers/pci.c

Modified: trunk/openbios-devel/drivers/ide.c
==============================================================================
--- trunk/openbios-devel/drivers/ide.c	Mon Jan  4 13:03:37 2016	(r1370)
+++ trunk/openbios-devel/drivers/ide.c	Mon Jan  4 13:03:40 2016	(r1371)
@@ -1542,10 +1542,10 @@
 	struct ide_channel *chan;
 
 	/* IDE ports on Macs are numbered from 3.
-	 * Also see comments in macio.c:openpic_init() */
+	 * Also see comments in pci.c:ob_pci_host_set_interrupt_map() */
 	current_channel = 3;
 
-	for (i = 0; i < nb_channels; i++, current_channel++) {
+	for (i = 0; i < nb_channels; i++) {
 
 		chan = malloc(sizeof(struct ide_channel));
 
@@ -1651,7 +1651,7 @@
 		OLDWORLD(set_property(dnode, "AAPL,address",
 				      (char *)&props, 2*sizeof(props[0])));
 
-		props[0] = 0;
+		props[0] = i;
 		set_property(dnode, "AAPL,bus-id", (char*)props,
 			 1 * sizeof(props[0]));
 		IDE_DPRINTF(DEV_NAME": [io ports 0x%lx]\n",

Modified: trunk/openbios-devel/drivers/pci.c
==============================================================================
--- trunk/openbios-devel/drivers/pci.c	Mon Jan  4 13:03:37 2016	(r1370)
+++ trunk/openbios-devel/drivers/pci.c	Mon Jan  4 13:03:40 2016	(r1371)
@@ -1430,12 +1430,12 @@
         /* On a new world Mac these are not numbered but named by the
          * ATA version they support. Thus we have: ata-3, ata-3, ata-4
          * On g3beige they all called just ide.
-         * We take ata-3 and ata-4 which seems to work for both
-         * at least for clients we care about */
-        target_node = find_dev("/pci/mac-io/ata-3");
+         * We take 2 x ata-3 buses which seems to work for
+         * at least the clients we care about */
+        target_node = find_dev("/pci/mac-io/ata-3 at 20000");
         set_int_property(target_node, "interrupt-parent", dnode);
 
-        target_node = find_dev("/pci/mac-io/ata-4");
+        target_node = find_dev("/pci/mac-io/ata-3 at 21000");
         set_int_property(target_node, "interrupt-parent", dnode);
 
         target_node = find_dev("/pci/mac-io/via-cuda");



More information about the OpenBIOS mailing list