blob: 6526e139a4636783959ee2820c078881c57b33c8 [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 Munautde411892007-05-07 01:38:46 +100024extern ssize_t of_device_get_modalias(struct of_device *ofdev,
25 char *str, ssize_t len);
Sylvain Munauteb0cb8a2007-02-12 23:13:25 +010026extern int of_device_uevent(struct device *dev,
Kay Sievers7eff2e72007-08-14 15:15:12 +020027 struct kobj_uevent_env *env);
Sylvain Munauteb0cb8a2007-02-12 23:13:25 +010028
Stephen Rothwellf898f8d2007-05-01 16:49:51 +100029/* This is just here during the transition */
30#include <linux/of_device.h>
31
Arnd Bergmann88ced032005-12-16 22:43:46 +010032#endif /* __KERNEL__ */
Paul Mackerras2e686bc2005-10-06 13:22:17 +100033#endif /* _ASM_POWERPC_OF_DEVICE_H */