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