diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 07:48:13 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 16:14:28 -0600 |
commit | 5fd200f3b351183b5489cef69961c60af9cead2f (patch) | |
tree | 322780d69cfefd88dd959e2b60aa23ce28cc8d2c /include/linux/of_platform.h | |
parent | 34a1c1e8c700f7cd849deb21193718a172722f8d (diff) |
of/device: Merge of_platform_bus_probe()
Merge common code between PowerPC and microblaze. This patch merges
the code that scans the tree and registers devices. The functions
merged are of_platform_bus_probe(), of_platform_bus_create(), and
of_platform_device_create().
This patch also move the of_default_bus_ids[] table out of a Microblaze
header file and makes it non-static. The device ids table isn't merged
because powerpc and microblaze use different default data.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
CC: Michal Simek <monstr@monstr.eu>
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
Diffstat (limited to 'include/linux/of_platform.h')
-rw-r--r-- | include/linux/of_platform.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 1643d3761eb..4bbba41396e 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -25,6 +25,8 @@ */ extern struct bus_type of_platform_bus_type; +extern const struct of_device_id of_default_bus_ids[]; + /* * An of_platform_driver driver is attached to a basic of_device on * the "platform bus" (of_platform_bus_type). @@ -63,6 +65,21 @@ static inline void of_unregister_platform_driver(struct of_platform_driver *drv) extern struct of_device *of_find_device_by_node(struct device_node *np); extern int of_bus_type_init(struct bus_type *bus, const char *name); + +#if !defined(CONFIG_SPARC) /* SPARC has its own device registration method */ +/* Platform devices and busses creation */ +extern struct of_device *of_platform_device_create(struct device_node *np, + const char *bus_id, + struct device *parent); + +/* pseudo "matches" value to not do deep probe */ +#define OF_NO_DEEP_PROBE ((struct of_device_id *)-1) + +extern int of_platform_bus_probe(struct device_node *root, + const struct of_device_id *matches, + struct device *parent); +#endif /* !CONFIG_SPARC */ + #endif /* CONFIG_OF_DEVICE */ #endif /* _LINUX_OF_PLATFORM_H */ |