summaryrefslogtreecommitdiffstats
path: root/include/linux/of_fdt.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2009-10-15 10:58:04 -0600
committerGrant Likely <grant.likely@secretlab.ca>2009-10-15 10:58:04 -0600
commit8482f56803b9498af84bc09e7bc769a5924f6443 (patch)
tree9951afd8639d8e389d3ace2bd1a4c5bf79ed1b71 /include/linux/of_fdt.h
parent526b5b3ed97bac22ed0c9feed97adcdc3a25244c (diff)
downloadlinux-8482f56803b9498af84bc09e7bc769a5924f6443.tar.gz
linux-8482f56803b9498af84bc09e7bc769a5924f6443.tar.bz2
linux-8482f56803b9498af84bc09e7bc769a5924f6443.zip
of: merge of_*_flat_dt*() functions
Merge common flattened device tree code between Microblaze and PowerPC Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r--include/linux/of_fdt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index b37ad3a973b9..b363eadea819 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -12,6 +12,9 @@
#ifndef _LINUX_OF_FDT_H
#define _LINUX_OF_FDT_H
+#include <linux/types.h>
+#include <linux/init.h>
+
/* Definitions used by the flattened device tree */
#define OF_DT_HEADER 0xd00dfeed /* marker */
#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
@@ -54,5 +57,16 @@ struct boot_param_header {
u32 dt_struct_size; /* size of the DT structure block */
};
+/* For scanning the flat device-tree at boot time */
+extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
+ const char *uname, int depth,
+ void *data),
+ void *data);
+extern void __init *of_get_flat_dt_prop(unsigned long node, const char *name,
+ unsigned long *size);
+extern int __init of_flat_dt_is_compatible(unsigned long node,
+ const char *name);
+extern unsigned long __init of_get_flat_dt_root(void);
+
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_OF_FDT_H */