Commit 8482f568 authored by Grant Likely's avatar Grant Likely

of: merge of_*_flat_dt*() functions

Merge common flattened device tree code between Microblaze and PowerPC
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarMichal Simek <monstr@monstr.eu>
Acked-by: default avatarStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
parent 526b5b3e
...@@ -40,17 +40,6 @@ extern struct device_node *of_chosen; ...@@ -40,17 +40,6 @@ extern struct device_node *of_chosen;
extern struct device_node *allnodes; /* temporary while merging */ extern struct device_node *allnodes; /* temporary while merging */
extern rwlock_t devtree_lock; /* temporary while merging */ extern rwlock_t devtree_lock; /* temporary while merging */
/* 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);
/* For updating the device tree at runtime */ /* For updating the device tree at runtime */
extern void of_attach_node(struct device_node *); extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *); extern void of_detach_node(struct device_node *);
......
...@@ -34,16 +34,6 @@ extern struct device_node *of_chosen; ...@@ -34,16 +34,6 @@ extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS #define HAVE_ARCH_DEVTREE_FIXUPS
/* 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);
/* For updating the device tree at runtime */ /* For updating the device tree at runtime */
extern void of_attach_node(struct device_node *); extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *); extern void of_detach_node(struct device_node *);
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#ifndef _LINUX_OF_FDT_H #ifndef _LINUX_OF_FDT_H
#define _LINUX_OF_FDT_H #define _LINUX_OF_FDT_H
#include <linux/types.h>
#include <linux/init.h>
/* Definitions used by the flattened device tree */ /* Definitions used by the flattened device tree */
#define OF_DT_HEADER 0xd00dfeed /* marker */ #define OF_DT_HEADER 0xd00dfeed /* marker */
#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */ #define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
...@@ -54,5 +57,16 @@ struct boot_param_header { ...@@ -54,5 +57,16 @@ struct boot_param_header {
u32 dt_struct_size; /* size of the DT structure block */ 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 /* __ASSEMBLY__ */
#endif /* _LINUX_OF_FDT_H */ #endif /* _LINUX_OF_FDT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment