From 5bdc10121bb8eabc3921db5d950ff5c96eb81b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 18 Feb 2013 00:42:10 +0100 Subject: [PATCH] U-Boot: use FDT call directly in of_init() in OF wrapper This avoids calling dprintf() and allows calling it earlier. --- src/system/kernel/platform/u-boot/openfirmware.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/platform/u-boot/openfirmware.cpp b/src/system/kernel/platform/u-boot/openfirmware.cpp index 557f4e5bc2..12115b12b6 100644 --- a/src/system/kernel/platform/u-boot/openfirmware.cpp +++ b/src/system/kernel/platform/u-boot/openfirmware.cpp @@ -49,7 +49,8 @@ static int fdt2of(int err) status_t of_init(int (*openFirmwareEntry)(void *)) { - gChosen = of_finddevice("/chosen"); + gChosen = fdt2of(fdt_path_offset(gFDT, "/chosen")); + if (gChosen == OF_FAILED) return B_ERROR;