summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds2011-01-10 17:57:03 +0100
committerLinus Torvalds2011-01-10 17:57:03 +0100
commit0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281 (patch)
tree7d9732bcf5f2f646cb0c2c529c48b454b15d4ae2 /include/linux
parentheaders: kobject.h redux (diff)
parentof/flattree: forward declare struct device_node in of_fdt.h (diff)
downloadkernel-qcow2-linux-0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281.tar.gz
kernel-qcow2-linux-0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281.tar.xz
kernel-qcow2-linux-0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281.zip
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.h6
-rw-r--r--include/linux/of_fdt.h18
-rw-r--r--include/linux/of_net.h15
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 @@
#include <linux/ioport.h>
#include <linux/of.h>
-extern u64 of_translate_address(struct device_node *np, const u32 *addr);
+extern u64 of_translate_address(struct device_node *np, const __be32 *addr);
extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r);
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; }
#endif
#ifdef CONFIG_PCI
-extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no,
+extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no,
u64 *size, unsigned int *flags);
extern int of_pci_address_to_resource(struct device_node *dev, int bar,
struct resource *r);
@@ -32,7 +32,7 @@ static inline int of_pci_address_to_resource(struct device_node *dev, int bar,
return -ENOSYS;
}
-static inline const u32 *of_get_pci_address(struct device_node *dev,
+static inline const __be32 *of_get_pci_address(struct device_node *dev,
int bar_no, u64 *size, unsigned int *flags)
{
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 {
};
#if defined(CONFIG_OF_FLATTREE)
+
+struct device_node;
+
+/* For scanning an arbitrary device-tree at any time */
+extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset);
+extern void *of_fdt_get_property(struct boot_param_header *blob,
+ unsigned long node,
+ const char *name,
+ unsigned long *size);
+extern int of_fdt_is_compatible(struct boot_param_header *blob,
+ unsigned long node,
+ const char *compat);
+extern int of_fdt_match(struct boot_param_header *blob, unsigned long node,
+ const char **compat);
+extern void of_fdt_unflatten_tree(unsigned long *blob,
+ struct device_node **mynodes);
+
/* TBD: Temporary export of fdt globals - remove when code fully merged */
extern int __initdata dt_root_addr_cells;
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,
extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
unsigned long *size);
extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
+extern int of_flat_dt_match(unsigned long node, const char **matches);
extern unsigned long of_get_flat_dt_root(void);
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 @@
+/*
+ * OF helpers for network devices.
+ *
+ * This file is released under the GPLv2
+ */
+
+#ifndef __LINUX_OF_NET_H
+#define __LINUX_OF_NET_H
+
+#ifdef CONFIG_OF_NET
+#include <linux/of.h>
+extern const void *of_get_mac_address(struct device_node *np);
+#endif
+
+#endif /* __LINUX_OF_NET_H */