diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2009-10-15 12:58:04 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-10-15 12:58:04 -0400 |
commit | 8482f56803b9498af84bc09e7bc769a5924f6443 (patch) | |
tree | 9951afd8639d8e389d3ace2bd1a4c5bf79ed1b71 | |
parent | 526b5b3ed97bac22ed0c9feed97adcdc3a25244c (diff) |
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>
-rw-r--r-- | arch/microblaze/include/asm/prom.h | 11 | ||||
-rw-r--r-- | arch/powerpc/include/asm/prom.h | 10 | ||||
-rw-r--r-- | include/linux/of_fdt.h | 14 |
3 files changed, 14 insertions, 21 deletions
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index c92b4a9e4397..be4db2a22245 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h | |||
@@ -40,17 +40,6 @@ extern struct device_node *of_chosen; | |||
40 | extern struct device_node *allnodes; /* temporary while merging */ | 40 | extern struct device_node *allnodes; /* temporary while merging */ |
41 | extern rwlock_t devtree_lock; /* temporary while merging */ | 41 | extern rwlock_t devtree_lock; /* temporary while merging */ |
42 | 42 | ||
43 | /* For scanning the flat device-tree at boot time */ | ||
44 | extern int __init of_scan_flat_dt(int (*it)(unsigned long node, | ||
45 | const char *uname, int depth, | ||
46 | void *data), | ||
47 | void *data); | ||
48 | extern void *__init of_get_flat_dt_prop(unsigned long node, const char *name, | ||
49 | unsigned long *size); | ||
50 | extern int __init | ||
51 | of_flat_dt_is_compatible(unsigned long node, const char *name); | ||
52 | extern unsigned long __init of_get_flat_dt_root(void); | ||
53 | |||
54 | /* For updating the device tree at runtime */ | 43 | /* For updating the device tree at runtime */ |
55 | extern void of_attach_node(struct device_node *); | 44 | extern void of_attach_node(struct device_node *); |
56 | extern void of_detach_node(struct device_node *); | 45 | extern void of_detach_node(struct device_node *); |
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h index 622769cd1d62..c8b59330b04a 100644 --- a/arch/powerpc/include/asm/prom.h +++ b/arch/powerpc/include/asm/prom.h | |||
@@ -34,16 +34,6 @@ extern struct device_node *of_chosen; | |||
34 | 34 | ||
35 | #define HAVE_ARCH_DEVTREE_FIXUPS | 35 | #define HAVE_ARCH_DEVTREE_FIXUPS |
36 | 36 | ||
37 | /* For scanning the flat device-tree at boot time */ | ||
38 | extern int __init of_scan_flat_dt(int (*it)(unsigned long node, | ||
39 | const char *uname, int depth, | ||
40 | void *data), | ||
41 | void *data); | ||
42 | extern void* __init of_get_flat_dt_prop(unsigned long node, const char *name, | ||
43 | unsigned long *size); | ||
44 | extern int __init of_flat_dt_is_compatible(unsigned long node, const char *name); | ||
45 | extern unsigned long __init of_get_flat_dt_root(void); | ||
46 | |||
47 | /* For updating the device tree at runtime */ | 37 | /* For updating the device tree at runtime */ |
48 | extern void of_attach_node(struct device_node *); | 38 | extern void of_attach_node(struct device_node *); |
49 | extern void of_detach_node(struct device_node *); | 39 | extern void of_detach_node(struct device_node *); |
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 @@ | |||
12 | #ifndef _LINUX_OF_FDT_H | 12 | #ifndef _LINUX_OF_FDT_H |
13 | #define _LINUX_OF_FDT_H | 13 | #define _LINUX_OF_FDT_H |
14 | 14 | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/init.h> | ||
17 | |||
15 | /* Definitions used by the flattened device tree */ | 18 | /* Definitions used by the flattened device tree */ |
16 | #define OF_DT_HEADER 0xd00dfeed /* marker */ | 19 | #define OF_DT_HEADER 0xd00dfeed /* marker */ |
17 | #define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */ | 20 | #define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */ |
@@ -54,5 +57,16 @@ struct boot_param_header { | |||
54 | u32 dt_struct_size; /* size of the DT structure block */ | 57 | u32 dt_struct_size; /* size of the DT structure block */ |
55 | }; | 58 | }; |
56 | 59 | ||
60 | /* For scanning the flat device-tree at boot time */ | ||
61 | extern int __init of_scan_flat_dt(int (*it)(unsigned long node, | ||
62 | const char *uname, int depth, | ||
63 | void *data), | ||
64 | void *data); | ||
65 | extern void __init *of_get_flat_dt_prop(unsigned long node, const char *name, | ||
66 | unsigned long *size); | ||
67 | extern int __init of_flat_dt_is_compatible(unsigned long node, | ||
68 | const char *name); | ||
69 | extern unsigned long __init of_get_flat_dt_root(void); | ||
70 | |||
57 | #endif /* __ASSEMBLY__ */ | 71 | #endif /* __ASSEMBLY__ */ |
58 | #endif /* _LINUX_OF_FDT_H */ | 72 | #endif /* _LINUX_OF_FDT_H */ |