summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDario Binacchi <dariobin@libero.it>2021-05-01 17:05:26 +0200
committerLokesh Vutla <lokeshvutla@ti.com>2021-05-12 16:27:57 +0530
commita47abd7bf4b87e4bd5cbdaf88bbece6810d8c837 (patch)
tree041bf77db28e7e3659ee632e08bd104d1bcdd736 /common
parent5a6caf916cb302a6b83edce8c60d830d9261956d (diff)
downloadu-boot-a47abd7bf4b87e4bd5cbdaf88bbece6810d8c837.tar.gz
u-boot-a47abd7bf4b87e4bd5cbdaf88bbece6810d8c837.tar.bz2
u-boot-a47abd7bf4b87e4bd5cbdaf88bbece6810d8c837.zip
Revert "fdt: translate address if #size-cells = <0>"
This reverts commit d64b9cdcd475eb7f07b49741ded87e24dae4a5fc. As pointed by [1] and [2], the reverted patch made every DT 'reg' property translatable. What the patch was trying to fix was fixed in a different way from previously submitted patches which instead of correcting the generic address translation function fixed the issue with appropriate platform code. [1] https://patchwork.ozlabs.org/project/uboot/patch/1614324949-61314-1-git-send-email-bmeng.cn@gmail.com/ [2] https://lore.kernel.org/linux-clk/20210402192054.7934-1-dariobin@libero.it/T/ Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/fdt_support.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 7eb5ba3bb2..695d8e134a 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -20,8 +20,6 @@
#include <exports.h>
#include <fdtdec.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* fdt_getprop_u32_default_node - Return a node's property or a default
*
@@ -1001,8 +999,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 || gd_size_cells_0()))
+#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
+ (ns) > 0)
/* Debug utility */
#ifdef DEBUG