[Skiboot] [PATCH 6/6] plat/qemu: check device tree for RTC definitions
Cédric Le Goater
clg at fr.ibm.com
Thu Apr 7 02:30:12 AEST 2016
QEMU populates the device tree with devices found on the ISA
bus. Let's check that a RTC device is not already there.
Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---
platforms/astbmc/qemu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/platforms/astbmc/qemu.c b/platforms/astbmc/qemu.c
index 11d3a99339d8..6089a2812aca 100644
--- a/platforms/astbmc/qemu.c
+++ b/platforms/astbmc/qemu.c
@@ -56,6 +56,14 @@ static void qemu_dt_fixup_rtc(struct dt_node *lpc)
struct dt_node *rtc;
char namebuf[32];
+ /* First check if a RTC interface is already there */
+ dt_for_each_child(lpc, rtc) {
+ if (dt_node_is_compatible(rtc, "pnpPNP,b00")) {
+ prlog(PR_WARNING, "QEMU: rtc device already here\n");
+ return;
+ }
+ }
+
/*
* Follows the structure expected by the kernel file
* arch/powerpc/sysdev/rtc_cmos_setup.c
--
2.1.4
More information about the Skiboot
mailing list