[OpenBIOS] [PATCH] Make naming of ata devices match what is found on Apple hardware
BALATON Zoltan
balaton at eik.bme.hu
Sat Apr 12 14:19:15 CEST 2014
Signed-off-by: BALATON Zoltan <balaton at eik.bme.hu>
Index: openbios-devel/drivers/ide.c
===================================================================
--- openbios-devel/drivers/ide.c (revision 1286)
+++ openbios-devel/drivers/ide.c (working copy)
@@ -1574,7 +1574,8 @@
dnode = find_dev(nodebuff);
- set_property(dnode, "compatible", "heathrow-ata", 13);
+ set_property(dnode, "compatible", (is_oldworld() ?
+ "heathrow-ata" : "keylargo-ata"), 13);
props[0] = 0x00000526;
props[1] = 0x00000085;
Index: openbios-devel/drivers/macio.c
===================================================================
--- openbios-devel/drivers/macio.c (revision 1286)
+++ openbios-devel/drivers/macio.c (working copy)
@@ -130,7 +130,7 @@
else
it_shift = NW_IO_NVRAM_SHIFT;
- for (i=0; i< arch_nvram_size() ; i++)
+ for (i=0; i < arch_nvram_size(); i++)
nvram[i << it_shift] = buf[i];
#ifdef DUMP_NVRAM
printk("new nvram:\n");
@@ -202,18 +202,19 @@
target_node = find_dev("/pci/mac-io/escc/ch-b");
set_int_property(target_node, "interrupt-parent", dnode);
- target_node = find_dev("/pci/mac-io/ata-1");
+ /* QEMU only emulates 2 of the 3 ata buses currently */
+ /* On a Mac these are strangely named as ata-3, ata-3, ata-4 */
+ target_node = find_dev("/pci/mac-io/ata-3");
set_int_property(target_node, "interrupt-parent", dnode);
- target_node = find_dev("/pci/mac-io/ata-2");
+ target_node = find_dev("/pci/mac-io/ata-4");
set_int_property(target_node, "interrupt-parent", dnode);
- target_node = find_dev("/pci/mac-io/ata-3");
+ target_node = find_dev((is_oldworld() ?
+ "/pci/mac-io/via-cuda" :
+ "/pci/mac-io/via-pmu"));
set_int_property(target_node, "interrupt-parent", dnode);
- target_node = find_dev("/pci/mac-io/via-cuda");
- set_int_property(target_node, "interrupt-parent", dnode);
-
target_node = find_dev("/pci");
set_int_property(target_node, "interrupt-parent", dnode);
Index: openbios-devel/config/examples/ppc_config.xml
===================================================================
--- openbios-devel/config/examples/ppc_config.xml (revision 1286)
+++ openbios-devel/config/examples/ppc_config.xml (working copy)
@@ -70,7 +70,7 @@
<option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
<option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
<option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
- <option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>
+ <option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="3"/>
<option name="CONFIG_IDE_DEV_NAME" type="string" value="ata-%d"/>
<option name="CONFIG_IDE_DEV_TYPE" type="string" value="ata"/>
<option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
More information about the OpenBIOS
mailing list