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.
This commit is contained in:
commit
0bd2cbcdfa
83 changed files with 2957 additions and 3471 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
15
include/linux/of_net.h
Normal file
15
include/linux/of_net.h
Normal file
|
|
@ -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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue