Paul Mackerras | 2e686bc | 2005-10-06 13:22:17 +1000 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_OF_DEVICE_H |
| 2 | #define _ASM_POWERPC_OF_DEVICE_H |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 3 | #ifdef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
| 5 | #include <linux/device.h> |
Stephen Rothwell | f898f8d | 2007-05-01 16:49:51 +1000 | [diff] [blame] | 6 | #include <linux/of.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
| 8 | /* |
| 9 | * The of_device is a kind of "base class" that is a superset of |
| 10 | * struct device for use by devices attached to an OF node and |
Stephen Rothwell | f898f8d | 2007-05-01 16:49:51 +1000 | [diff] [blame] | 11 | * probed using OF properties. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | */ |
| 13 | struct of_device |
| 14 | { |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 15 | struct device_node *node; /* to be obsoleted */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | u64 dma_mask; /* DMA mask */ |
| 17 | struct device dev; /* Generic device interface */ |
| 18 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
Joachim Fenkes | fec738d | 2007-09-26 19:44:12 +1000 | [diff] [blame] | 20 | extern struct of_device *of_device_alloc(struct device_node *np, |
| 21 | const char *bus_id, |
| 22 | struct device *parent); |
| 23 | |
Sylvain Munaut | eb0cb8a | 2007-02-12 23:13:25 +0100 | [diff] [blame] | 24 | extern int of_device_uevent(struct device *dev, |
Kay Sievers | 7eff2e7 | 2007-08-14 15:15:12 +0200 | [diff] [blame] | 25 | struct kobj_uevent_env *env); |
Sylvain Munaut | eb0cb8a | 2007-02-12 23:13:25 +0100 | [diff] [blame] | 26 | |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 27 | #endif /* __KERNEL__ */ |
Paul Mackerras | 2e686bc | 2005-10-06 13:22:17 +1000 | [diff] [blame] | 28 | #endif /* _ASM_POWERPC_OF_DEVICE_H */ |