mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 23:50:26 +09:00
fdt: Change OF_BAD_ADDR to FDT_ADDR_T_NONE
Currently OF_BAD_ADDR is always -1ULL. When using OF_BAD_ADDR as the return value of dev_get_addr(), it creates potential size mismatch as dev_get_addr() uses FDT_ADDR_T_NONE as the return value which can be either -1U or -1ULL depending on CONFIG_PHYS_64BIT. Now we change OF_BAD_ADDR to FDT_ADDR_T_NONE to avoid such case. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
8555dd88cd
commit
a0ae380b3c
@ -16,6 +16,7 @@
|
|||||||
#include <libfdt.h>
|
#include <libfdt.h>
|
||||||
#include <fdt_support.h>
|
#include <fdt_support.h>
|
||||||
#include <exports.h>
|
#include <exports.h>
|
||||||
|
#include <fdtdec.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fdt_getprop_u32_default_node - Return a node's property or a default
|
* fdt_getprop_u32_default_node - Return a node's property or a default
|
||||||
@ -950,7 +951,7 @@ void fdt_del_node_and_alias(void *blob, const char *alias)
|
|||||||
|
|
||||||
/* Max address size we deal with */
|
/* Max address size we deal with */
|
||||||
#define OF_MAX_ADDR_CELLS 4
|
#define OF_MAX_ADDR_CELLS 4
|
||||||
#define OF_BAD_ADDR ((u64)-1)
|
#define OF_BAD_ADDR FDT_ADDR_T_NONE
|
||||||
#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
|
#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
|
||||||
(ns) > 0)
|
(ns) > 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user