Stephen Rothwell | b41912c | 2007-05-01 16:12:57 +1000 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_OF_PLATFORM_H |
| 2 | #define _ASM_POWERPC_OF_PLATFORM_H |
Benjamin Herrenschmidt | 7eebde7 | 2006-11-11 17:24:59 +1100 | [diff] [blame] | 3 | /* |
| 4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. |
| 5 | * <benh@kernel.crashing.org> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation; either version |
| 10 | * 2 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | */ |
| 13 | |
Stephen Rothwell | b41912c | 2007-05-01 16:12:57 +1000 | [diff] [blame] | 14 | /* This is just here during the transition */ |
| 15 | #include <linux/of_platform.h> |
Benjamin Herrenschmidt | 7eebde7 | 2006-11-11 17:24:59 +1100 | [diff] [blame] | 16 | |
| 17 | /* Platform drivers register/unregister */ |
Stephen Rothwell | 18cce5d | 2007-10-17 13:43:34 +1000 | [diff] [blame] | 18 | static inline int of_register_platform_driver(struct of_platform_driver *drv) |
| 19 | { |
| 20 | return of_register_driver(drv, &of_platform_bus_type); |
| 21 | } |
| 22 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) |
| 23 | { |
| 24 | of_unregister_driver(drv); |
| 25 | } |
Benjamin Herrenschmidt | 7eebde7 | 2006-11-11 17:24:59 +1100 | [diff] [blame] | 26 | |
| 27 | /* Platform devices and busses creation */ |
| 28 | extern struct of_device *of_platform_device_create(struct device_node *np, |
| 29 | const char *bus_id, |
| 30 | struct device *parent); |
| 31 | /* pseudo "matches" value to not do deep probe */ |
| 32 | #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1) |
| 33 | |
| 34 | extern int of_platform_bus_probe(struct device_node *root, |
Stephen Rothwell | b91bdd1 | 2007-12-21 15:21:51 +1100 | [diff] [blame] | 35 | const struct of_device_id *matches, |
Benjamin Herrenschmidt | 7eebde7 | 2006-11-11 17:24:59 +1100 | [diff] [blame] | 36 | struct device *parent); |
| 37 | |
Benjamin Herrenschmidt | 7eebde7 | 2006-11-11 17:24:59 +1100 | [diff] [blame] | 38 | extern struct of_device *of_find_device_by_phandle(phandle ph); |
Stephen Rothwell | b41912c | 2007-05-01 16:12:57 +1000 | [diff] [blame] | 39 | |
David Gibson | 22258fa | 2008-01-11 14:25:34 +1100 | [diff] [blame] | 40 | extern void of_instantiate_rtc(void); |
| 41 | |
Stephen Rothwell | b41912c | 2007-05-01 16:12:57 +1000 | [diff] [blame] | 42 | #endif /* _ASM_POWERPC_OF_PLATFORM_H */ |