summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 16:24:01 +0300
committerSimon Glass <sjg@chromium.org>2021-09-25 18:46:15 +0300
commit7de8bd03c37af6120cf5bba9bf1adb492ed56868 (patch)
tree03d977384b888feedf77e0d274f7682d732d6be9 /arch
parentbb38d77ca779cc8bdad3d4ceb6cecc687f4987c2 (diff)
downloadu-boot-7de8bd03c37af6120cf5bba9bf1adb492ed56868.tar.xz
treewide: fdt: Move fdt_get_config_... to ofnode_conf_read...
The current API is outdated as it requires a devicetree pointer. Move these functions to use the ofnode API and update this globally. Add some tests while we are here. Correct the call in exynos_dsim_config_parse_dt() which is obviously wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-rockchip/rk3188/rk3188.c4
-rw-r--r--arch/sandbox/dts/test.dts3
-rw-r--r--arch/x86/cpu/coreboot/coreboot.c5
3 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index ad8c6cd1d7..5a02914e1b 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -15,6 +15,7 @@
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/grf_rk3188.h>
#include <asm/arch-rockchip/hardware.h>
+#include <dm/ofnode.h>
#include <linux/err.h>
#define GRF_BASE 0x20008000
@@ -107,7 +108,6 @@ int rk_board_late_init(void)
}
#ifdef CONFIG_SPL_BUILD
-DECLARE_GLOBAL_DATA_PTR;
static int setup_led(void)
{
#ifdef CONFIG_SPL_LED
@@ -115,7 +115,7 @@ static int setup_led(void)
char *led_name;
int ret;
- led_name = fdtdec_get_config_string(gd->fdt_blob, "u-boot,boot-led");
+ led_name = ofnode_conf_read_str("u-boot,boot-led");
if (!led_name)
return 0;
ret = led_get_by_label(led_name, &dev);
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index b36447c4a7..2dfae1c106 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -62,6 +62,9 @@
};
config {
+ testing-bool;
+ testing-int = <123>;
+ testing-str = "testing";
environment {
from_fdt = "yes";
fdt_env_path = "";
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 69cf8f417c..aaa5ae112e 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -16,8 +16,7 @@
#include <asm/mtrr.h>
#include <asm/cb_sysinfo.h>
#include <asm/arch/timestamp.h>
-
-DECLARE_GLOBAL_DATA_PTR;
+#include <dm/ofnode.h>
int arch_cpu_init(void)
{
@@ -65,7 +64,7 @@ static void board_final_init(void)
mtrr_close(&state, true);
}
- if (!fdtdec_get_config_bool(gd->fdt_blob, "u-boot,no-apm-finalize")) {
+ if (!ofnode_conf_read_bool("u-boot,no-apm-finalize")) {
/*
* Issue SMI to coreboot to lock down ME and registers
* when allowed via device tree