blob: a64debf177dca8efcbe7534333f81a5b2d3d26d5 [file] [log] [blame]
Paul Mackerras2e686bc2005-10-06 13:22:17 +10001#ifndef _ASM_POWERPC_OF_DEVICE_H
2#define _ASM_POWERPC_OF_DEVICE_H
Arnd Bergmann88ced032005-12-16 22:43:46 +01003#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
5#include <linux/device.h>
Stephen Rothwellf898f8d2007-05-01 16:49:51 +10006#include <linux/of.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
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 Rothwellf898f8d2007-05-01 16:49:51 +100011 * probed using OF properties.
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 */
13struct of_device
14{
Benjamin Herrenschmidt12d04ee2006-11-11 17:25:02 +110015 struct device_node *node; /* to be obsoleted */
Linus Torvalds1da177e2005-04-16 15:20:36 -070016 u64 dma_mask; /* DMA mask */
17 struct device dev; /* Generic device interface */
18};
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
Joachim Fenkesfec738d2007-09-26 19:44:12 +100020extern struct of_device *of_device_alloc(struct device_node *np,
21 const char *bus_id,
22 struct device *parent);
23
Sylvain Munauteb0cb8a2007-02-12 23:13:25 +010024extern int of_device_uevent(struct device *dev,
Kay Sievers7eff2e72007-08-14 15:15:12 +020025 struct kobj_uevent_env *env);
Sylvain Munauteb0cb8a2007-02-12 23:13:25 +010026
Arnd Bergmann88ced032005-12-16 22:43:46 +010027#endif /* __KERNEL__ */
Paul Mackerras2e686bc2005-10-06 13:22:17 +100028#endif /* _ASM_POWERPC_OF_DEVICE_H */