summaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/dtc.h b/dtc.h
index 47664f2..cf2c6ac 100644
--- a/dtc.h
+++ b/dtc.h
@@ -51,6 +51,11 @@ extern int annotate; /* annotate .dts with input source location */
typedef uint32_t cell_t;
+static inline bool phandle_is_valid(cell_t phandle)
+{
+ return phandle != 0 && phandle != ~0U;
+}
+
static inline uint16_t dtb_ld16(const void *p)
{
const uint8_t *bp = (const uint8_t *)p;