summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-12 09:32:48 -0500
committerTom Rini <trini@konsulko.com>2021-01-12 09:32:48 -0500
commitee6726be4f0dccb612f0193c62ca149164c8a5af (patch)
treec58716b51bec487da0c5ac8929bc072549c90b07 /common
parent996f217ea368ecaef84863bb29699c0e185b9be7 (diff)
parentea3f5348063ebe4f41be7d1ba3ef0afe56a04a40 (diff)
downloadu-boot-ee6726be4f0dccb612f0193c62ca149164c8a5af.tar.gz
u-boot-ee6726be4f0dccb612f0193c62ca149164c8a5af.tar.xz
u-boot-ee6726be4f0dccb612f0193c62ca149164c8a5af.zip
Merge tag 'ti-v2021.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
- DM support for OMAP PWM backlight - USB host mode support for AM654 - Minor SPI fixes - Add support k2g ice board with 1GHz silicon - Fix GTC programming for K3 devices
Diffstat (limited to 'common')
-rw-r--r--common/fdt_support.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 5ae75df3c6..638eca983e 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -20,6 +20,8 @@
#include <exports.h>
#include <fdtdec.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/**
* fdt_getprop_u32_default_node - Return a node's property or a default
*
@@ -996,8 +998,8 @@ void fdt_del_node_and_alias(void *blob, const char *alias)
/* Max address size we deal with */
#define OF_MAX_ADDR_CELLS 4
#define OF_BAD_ADDR FDT_ADDR_T_NONE
-#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
- (ns) > 0)
+#define OF_CHECK_COUNTS(na, ns) (((na) > 0 && (na) <= OF_MAX_ADDR_CELLS) && \
+ ((ns) > 0 || gd_size_cells_0()))
/* Debug utility */
#ifdef DEBUG