aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/of_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/of_device.h')
-rw-r--r--include/asm-sparc64/of_device.h50
1 files changed, 4 insertions, 46 deletions
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h
index 60e9173c9acb..46d69b3223c5 100644
--- a/include/asm-sparc64/of_device.h
+++ b/include/asm-sparc64/of_device.h
@@ -3,14 +3,9 @@
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4 4
5#include <linux/device.h> 5#include <linux/device.h>
6#include <linux/of.h>
6#include <linux/mod_devicetable.h> 7#include <linux/mod_devicetable.h>
7#include <asm/openprom.h> 8#include <asm/openprom.h>
8#include <asm/prom.h>
9
10extern struct bus_type isa_bus_type;
11extern struct bus_type ebus_bus_type;
12extern struct bus_type sbus_bus_type;
13extern struct bus_type of_bus_type;
14 9
15/* 10/*
16 * The of_device is a kind of "base class" that is a superset of 11 * The of_device is a kind of "base class" that is a superset of
@@ -31,50 +26,13 @@ struct of_device
31 int portid; 26 int portid;
32 int clock_freq; 27 int clock_freq;
33}; 28};
34#define to_of_device(d) container_of(d, struct of_device, dev)
35 29
36extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); 30extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
37extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); 31extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size);
38 32
39extern struct of_device *of_find_device_by_node(struct device_node *); 33/* These are just here during the transition */
40 34#include <linux/of_device.h>
41extern const struct of_device_id *of_match_device( 35#include <linux/of_platform.h>
42 const struct of_device_id *matches, const struct of_device *dev);
43
44extern struct of_device *of_dev_get(struct of_device *dev);
45extern void of_dev_put(struct of_device *dev);
46
47/*
48 * An of_platform_driver driver is attached to a basic of_device on
49 * the ISA, EBUS, and SBUS busses on sparc64.
50 */
51struct of_platform_driver
52{
53 char *name;
54 struct of_device_id *match_table;
55 struct module *owner;
56
57 int (*probe)(struct of_device* dev, const struct of_device_id *match);
58 int (*remove)(struct of_device* dev);
59
60 int (*suspend)(struct of_device* dev, pm_message_t state);
61 int (*resume)(struct of_device* dev);
62 int (*shutdown)(struct of_device* dev);
63
64 struct device_driver driver;
65};
66#define to_of_platform_driver(drv) container_of(drv,struct of_platform_driver, driver)
67
68extern int of_register_driver(struct of_platform_driver *drv,
69 struct bus_type *bus);
70extern void of_unregister_driver(struct of_platform_driver *drv);
71extern int of_device_register(struct of_device *ofdev);
72extern void of_device_unregister(struct of_device *ofdev);
73extern struct of_device *of_platform_device_create(struct device_node *np,
74 const char *bus_id,
75 struct device *parent,
76 struct bus_type *bus);
77extern void of_release_dev(struct device *dev);
78 36
79#endif /* __KERNEL__ */ 37#endif /* __KERNEL__ */
80#endif /* _ASM_SPARC64_OF_DEVICE_H */ 38#endif /* _ASM_SPARC64_OF_DEVICE_H */