summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2014-10-07 10:14:03 (GMT)
committerMinkyu Kang <mk7.kang@samsung.com>2014-10-07 10:14:03 (GMT)
commit3cc83f9d08a80fddf4c1e8e766eff8273f30814c (patch)
tree831246a1b77d26d0296a84c90684e0fee0368737 /include/fdt_support.h
parent64f41212d880f3d00c6994d973aadeec5bda1b65 (diff)
parent6dd0e7c00bfa5ce861a72b8e4a3ef9e787306125 (diff)
downloadu-boot-3cc83f9d08a80fddf4c1e8e766eff8273f30814c.tar.xz
Merge branch 'uboot'
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 1bda686..c3d1fbc 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -133,6 +133,18 @@ static inline int fdt_status_fail_by_alias(void *fdt, const char *alias)
return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_FAIL, 0);
}
+/* Helper to read a big number; size is in cells (not bytes) */
+static inline u64 of_read_number(const fdt32_t *cell, int size)
+{
+ u64 r = 0;
+ while (size--)
+ r = (r << 32) | fdt32_to_cpu(*(cell++));
+ return r;
+}
+
+void of_bus_default_count_cells(void *blob, int parentoffset,
+ int *addrc, int *sizec);
+
#endif /* ifdef CONFIG_OF_LIBFDT */
#ifdef USE_HOSTCC