[OpenBIOS] [PATCH 3/5] adb: set compatible property differently if PMU is present

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Tue Jun 12 18:02:10 CEST 2018


This matches the device tree from a real mac99 system.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 drivers/adb_bus.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/adb_bus.c b/drivers/adb_bus.c
index d67d1f1..88a3a2d 100644
--- a/drivers/adb_bus.c
+++ b/drivers/adb_bus.c
@@ -20,6 +20,7 @@
  */
 
 #include "config.h"
+#include "drivers/drivers.h"
 #include "libopenbios/bindings.h"
 #include "libc/vsprintf.h"
 
@@ -37,7 +38,12 @@ adb_initialize (int *idx)
 	push_str("adb");
 	fword("device-type");
 
-	set_property(ph, "compatible", "adb", 4);
+	if (has_pmu()) {
+		set_property(ph, "compatible", "pmu-99", 7);
+	} else {
+		set_property(ph, "compatible", "adb", 4);
+	}
+
 	set_int_property(ph, "#address-cells", 1);
 	set_int_property(ph, "#size-cells", 0);
 }
-- 
2.11.0




More information about the OpenBIOS mailing list