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 | de41189 | 2007-05-07 01:38:46 +1000 | [diff] [blame] | 24 | extern ssize_t of_device_get_modalias(struct of_device *ofdev, |
| 25 | char *str, ssize_t len); |
Sylvain Munaut | eb0cb8a | 2007-02-12 23:13:25 +0100 | [diff] [blame] | 26 | extern int of_device_uevent(struct device *dev, |
Kay Sievers | 7eff2e7 | 2007-08-14 15:15:12 +0200 | [diff] [blame] | 27 | struct kobj_uevent_env *env); |
Sylvain Munaut | eb0cb8a | 2007-02-12 23:13:25 +0100 | [diff] [blame] | 28 | |
Stephen Rothwell | f898f8d | 2007-05-01 16:49:51 +1000 | [diff] [blame] | 29 | /* This is just here during the transition */ |
| 30 | #include <linux/of_device.h> |
| 31 | |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 32 | #endif /* __KERNEL__ */ |
Paul Mackerras | 2e686bc | 2005-10-06 13:22:17 +1000 | [diff] [blame] | 33 | #endif /* _ASM_POWERPC_OF_DEVICE_H */ |