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/linux | |
| 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/linux')
| -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 |
3 files changed, 36 insertions, 3 deletions
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 */ | ||
