Commit 6f192492 authored by Grant Likely's avatar Grant Likely

of: merge struct device_node

Merge of common code duplicated between Sparc, PowerPC and Microblaze
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 731581e6
...@@ -73,26 +73,6 @@ struct boot_param_header { ...@@ -73,26 +73,6 @@ struct boot_param_header {
u32 dt_struct_size; /* size of the DT structure block */ u32 dt_struct_size; /* size of the DT structure block */
}; };
struct device_node {
const char *name;
const char *type;
phandle node;
phandle linux_phandle;
char *full_name;
struct property *properties;
struct property *deadprops; /* removed properties */
struct device_node *parent;
struct device_node *child;
struct device_node *sibling;
struct device_node *next; /* next device of same type */
struct device_node *allnext; /* next in list of all nodes */
struct proc_dir_entry *pde; /* this node's proc directory */
struct kref kref;
unsigned long _flags;
void *data;
};
extern struct device_node *of_chosen; extern struct device_node *of_chosen;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag) static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
......
...@@ -71,26 +71,6 @@ struct boot_param_header ...@@ -71,26 +71,6 @@ struct boot_param_header
u32 dt_struct_size; /* size of the DT structure block */ u32 dt_struct_size; /* size of the DT structure block */
}; };
struct device_node {
const char *name;
const char *type;
phandle node;
phandle linux_phandle;
char *full_name;
struct property *properties;
struct property *deadprops; /* removed properties */
struct device_node *parent;
struct device_node *child;
struct device_node *sibling;
struct device_node *next; /* next device of same type */
struct device_node *allnext; /* next in list of all nodes */
struct proc_dir_entry *pde; /* this node's proc directory */
struct kref kref;
unsigned long _flags;
void *data;
};
extern struct device_node *of_chosen; extern struct device_node *of_chosen;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag) static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
......
...@@ -29,30 +29,6 @@ ...@@ -29,30 +29,6 @@
#define of_prop_cmp(s1, s2) strcasecmp((s1), (s2)) #define of_prop_cmp(s1, s2) strcasecmp((s1), (s2))
#define of_node_cmp(s1, s2) strcmp((s1), (s2)) #define of_node_cmp(s1, s2) strcmp((s1), (s2))
struct of_irq_controller;
struct device_node {
const char *name;
const char *type;
phandle node;
char *path_component_name;
char *full_name;
struct property *properties;
struct property *deadprops; /* removed properties */
struct device_node *parent;
struct device_node *child;
struct device_node *sibling;
struct device_node *next; /* next device of same type */
struct device_node *allnext; /* next in list of all nodes */
struct proc_dir_entry *pde; /* this node's proc directory */
struct kref kref;
unsigned long _flags;
void *data;
unsigned int unique_id;
struct of_irq_controller *irq_trans;
};
struct of_irq_controller { struct of_irq_controller {
unsigned int (*irq_build)(struct device_node *, unsigned int, void *); unsigned int (*irq_build)(struct device_node *, unsigned int, void *);
void *data; void *data;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/kref.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
typedef u32 phandle; typedef u32 phandle;
...@@ -31,6 +32,37 @@ struct property { ...@@ -31,6 +32,37 @@ struct property {
unsigned int unique_id; unsigned int unique_id;
}; };
#if defined(CONFIG_SPARC)
struct of_irq_controller;
#endif
struct device_node {
const char *name;
const char *type;
phandle node;
#if !defined(CONFIG_SPARC)
phandle linux_phandle;
#endif
char *full_name;
struct property *properties;
struct property *deadprops; /* removed properties */
struct device_node *parent;
struct device_node *child;
struct device_node *sibling;
struct device_node *next; /* next device of same type */
struct device_node *allnext; /* next in list of all nodes */
struct proc_dir_entry *pde; /* this node's proc directory */
struct kref kref;
unsigned long _flags;
void *data;
#if defined(CONFIG_SPARC)
char *path_component_name;
unsigned int unique_id;
struct of_irq_controller *irq_trans;
#endif
};
#include <asm/prom.h> #include <asm/prom.h>
/* flag descriptions */ /* flag descriptions */
......
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