diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:57:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:57:03 -0500 |
commit | 0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281 (patch) | |
tree | 7d9732bcf5f2f646cb0c2c529c48b454b15d4ae2 /include | |
parent | 57cc7215b70856dc6bae8e55b00ecd7b1d7429b1 (diff) | |
parent | a081748735c5feb96b1365e78a5ff0fb6ca7e3a4 (diff) |
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
of/flattree: forward declare struct device_node in of_fdt.h
ipmi: explicitly include of_address.h and of_irq.h
sparc: explicitly cast negative phandle checks to s32
powerpc/405: Fix missing #{address,size}-cells in i2c node
powerpc/5200: dts: refactor dts files
powerpc/5200: dts: Change combatible strings on localbus
powerpc/5200: dts: remove unused properties
powerpc/5200: dts: rename nodes to prepare for refactoring dts files
of/flattree: Update dtc to current mainline.
of/device: Don't register disabled devices
powerpc/dts: fix syntax bugs in bluestone.dts
of: Fixes for OF probing on little endian systems
of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
of/flattree: Add of_flat_dt_match() helper function
of_serial: explicitly include of_irq.h
of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
of/flattree: Reorder unflatten_dt_node
of/flattree: Refactor unflatten_dt_node
of/flattree: Add non-boottime device tree functions
of/flattree: Add Kconfig for EARLY_FLATTREE
...
Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 13 | ||||
-rw-r--r-- | include/linux/of_address.h | 6 | ||||
-rw-r--r-- | include/linux/of_fdt.h | 18 | ||||
-rw-r--r-- | include/linux/of_net.h | 15 |
4 files changed, 47 insertions, 5 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index bd69d79208de..05cbad03c5ab 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -67,7 +67,8 @@ | |||
67 | * Align to a 32 byte boundary equal to the | 67 | * Align to a 32 byte boundary equal to the |
68 | * alignment gcc 4.5 uses for a struct | 68 | * alignment gcc 4.5 uses for a struct |
69 | */ | 69 | */ |
70 | #define STRUCT_ALIGN() . = ALIGN(32) | 70 | #define STRUCT_ALIGNMENT 32 |
71 | #define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT) | ||
71 | 72 | ||
72 | /* The actual configuration determine if the init/exit sections | 73 | /* The actual configuration determine if the init/exit sections |
73 | * are handled as text/data or they can be discarded (which | 74 | * are handled as text/data or they can be discarded (which |
@@ -146,6 +147,13 @@ | |||
146 | #define TRACE_SYSCALLS() | 147 | #define TRACE_SYSCALLS() |
147 | #endif | 148 | #endif |
148 | 149 | ||
150 | |||
151 | #define KERNEL_DTB() \ | ||
152 | STRUCT_ALIGN(); \ | ||
153 | VMLINUX_SYMBOL(__dtb_start) = .; \ | ||
154 | *(.dtb.init.rodata) \ | ||
155 | VMLINUX_SYMBOL(__dtb_end) = .; | ||
156 | |||
149 | /* .data section */ | 157 | /* .data section */ |
150 | #define DATA_DATA \ | 158 | #define DATA_DATA \ |
151 | *(.data) \ | 159 | *(.data) \ |
@@ -468,7 +476,8 @@ | |||
468 | MCOUNT_REC() \ | 476 | MCOUNT_REC() \ |
469 | DEV_DISCARD(init.rodata) \ | 477 | DEV_DISCARD(init.rodata) \ |
470 | CPU_DISCARD(init.rodata) \ | 478 | CPU_DISCARD(init.rodata) \ |
471 | MEM_DISCARD(init.rodata) | 479 | MEM_DISCARD(init.rodata) \ |
480 | KERNEL_DTB() | ||
472 | 481 | ||
473 | #define INIT_TEXT \ | 482 | #define INIT_TEXT \ |
474 | *(.init.text) \ | 483 | *(.init.text) \ |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 8aea06f0564c..2feda6ee6140 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/ioport.h> | 3 | #include <linux/ioport.h> |
4 | #include <linux/of.h> | 4 | #include <linux/of.h> |
5 | 5 | ||
6 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); | 6 | extern u64 of_translate_address(struct device_node *np, const __be32 *addr); |
7 | extern int of_address_to_resource(struct device_node *dev, int index, | 7 | extern int of_address_to_resource(struct device_node *dev, int index, |
8 | struct resource *r); | 8 | struct resource *r); |
9 | extern void __iomem *of_iomap(struct device_node *device, int index); | 9 | extern void __iomem *of_iomap(struct device_node *device, int index); |
@@ -21,7 +21,7 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; } | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef CONFIG_PCI | 23 | #ifdef CONFIG_PCI |
24 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 24 | extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, |
25 | u64 *size, unsigned int *flags); | 25 | u64 *size, unsigned int *flags); |
26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
27 | struct resource *r); | 27 | struct resource *r); |
@@ -32,7 +32,7 @@ static inline int of_pci_address_to_resource(struct device_node *dev, int bar, | |||
32 | return -ENOSYS; | 32 | return -ENOSYS; |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline const u32 *of_get_pci_address(struct device_node *dev, | 35 | static inline const __be32 *of_get_pci_address(struct device_node *dev, |
36 | int bar_no, u64 *size, unsigned int *flags) | 36 | int bar_no, u64 *size, unsigned int *flags) |
37 | { | 37 | { |
38 | return NULL; | 38 | return NULL; |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 7bbf5b328438..0ef22a1f129e 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -58,6 +58,23 @@ struct boot_param_header { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #if defined(CONFIG_OF_FLATTREE) | 60 | #if defined(CONFIG_OF_FLATTREE) |
61 | |||
62 | struct device_node; | ||
63 | |||
64 | /* For scanning an arbitrary device-tree at any time */ | ||
65 | extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset); | ||
66 | extern void *of_fdt_get_property(struct boot_param_header *blob, | ||
67 | unsigned long node, | ||
68 | const char *name, | ||
69 | unsigned long *size); | ||
70 | extern int of_fdt_is_compatible(struct boot_param_header *blob, | ||
71 | unsigned long node, | ||
72 | const char *compat); | ||
73 | extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, | ||
74 | const char **compat); | ||
75 | extern void of_fdt_unflatten_tree(unsigned long *blob, | ||
76 | struct device_node **mynodes); | ||
77 | |||
61 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ | 78 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ |
62 | extern int __initdata dt_root_addr_cells; | 79 | extern int __initdata dt_root_addr_cells; |
63 | extern int __initdata dt_root_size_cells; | 80 | extern int __initdata dt_root_size_cells; |
@@ -71,6 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, | |||
71 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, | 88 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, |
72 | unsigned long *size); | 89 | unsigned long *size); |
73 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); | 90 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); |
91 | extern int of_flat_dt_match(unsigned long node, const char **matches); | ||
74 | extern unsigned long of_get_flat_dt_root(void); | 92 | extern unsigned long of_get_flat_dt_root(void); |
75 | 93 | ||
76 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, | 94 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, |
diff --git a/include/linux/of_net.h b/include/linux/of_net.h new file mode 100644 index 000000000000..e913081fb52a --- /dev/null +++ b/include/linux/of_net.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * OF helpers for network devices. | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __LINUX_OF_NET_H | ||
8 | #define __LINUX_OF_NET_H | ||
9 | |||
10 | #ifdef CONFIG_OF_NET | ||
11 | #include <linux/of.h> | ||
12 | extern const void *of_get_mac_address(struct device_node *np); | ||
13 | #endif | ||
14 | |||
15 | #endif /* __LINUX_OF_NET_H */ | ||