[OpenBIOS] [PATCH 4/5] ppc: fix up IDE device tree and control transfer
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Fri Oct 9 18:20:32 CEST 2015
From: Cormac O'Brien <cormac at c-obrien.org>
Mac OS 9 is finicky about devices having the correct properties, so we change
some IDE data to more closely model a real New World Mac.
Signed-off-by: Cormac O'Brien <cormac at c-obrien.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
openbios-devel/drivers/ide.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/openbios-devel/drivers/ide.c b/openbios-devel/drivers/ide.c
index 327c64a..ce9305a 100644
--- a/openbios-devel/drivers/ide.c
+++ b/openbios-devel/drivers/ide.c
@@ -1581,6 +1581,12 @@ int macio_ide_init(const char *path, uint32_t addr, int nb_channels)
set_property(dnode, "compatible", (is_oldworld() ?
"heathrow-ata" : "keylargo-ata"), 13);
+ set_property(dnode, "model", ((current_channel == 3) ?
+ "ata-3" : "ata-4"), strlen("ata-*") + 1);
+
+ set_property(dnode, "AAPL,connector", "ata",
+ strlen("ata") + 1);
+
props[0] = 0x00000526;
props[1] = 0x00000085;
props[2] = 0x00000025;
@@ -1589,8 +1595,8 @@ int macio_ide_init(const char *path, uint32_t addr, int nb_channels)
props[5] = 0x00000000;
props[6] = 0x00000000;
props[7] = 0x00000000;
- OLDWORLD(set_property(dnode, "AAPL,pio-timing",
- (char *)&props, 8*sizeof(props[0])));
+ set_property(dnode, "AAPL,pio-timing",
+ (char *)&props, 8*sizeof(props[0]));
/* The first interrupt entry is the ide interrupt, the second
the dbdma interrupt */
@@ -1634,8 +1640,8 @@ int macio_ide_init(const char *path, uint32_t addr, int nb_channels)
(char *)&props, 2*sizeof(props[0])));
props[0] = 0;
- OLDWORLD(set_property(dnode, "AAPL,bus-id", (char*)props,
- 1 * sizeof(props[0])));
+ set_property(dnode, "AAPL,bus-id", (char*)props,
+ 1 * sizeof(props[0]));
IDE_DPRINTF(DEV_NAME": [io ports 0x%lx]\n",
current_channel, chan->mmio);
--
1.7.10.4
More information about the OpenBIOS
mailing list