aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/of_device.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-06-29 17:34:50 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-29 19:37:12 -0400
commitcf44bbc26cf1361b692ab68c884f6a0df7da2fdb (patch)
treee16c980a25df8a31445a005d75da2c37f30a7b67 /include/asm-sparc/of_device.h
parent3ae9a3489a4e2ba665a344a9250c2af05b7b0c59 (diff)
[SPARC]: Beginnings of generic of_device framework.
The idea is to fully construct the device register and interrupt values into these of_device objects, and convert all of SBUS, EBUS, ISA drivers to use this new stuff. Much ideas and code taken from Ben H.'s powerpc work. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc/of_device.h')
-rw-r--r--include/asm-sparc/of_device.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/asm-sparc/of_device.h b/include/asm-sparc/of_device.h
index 4816d102f918..1b43ee5eb5e7 100644
--- a/include/asm-sparc/of_device.h
+++ b/include/asm-sparc/of_device.h
@@ -4,10 +4,12 @@
4 4
5#include <linux/device.h> 5#include <linux/device.h>
6#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
7#include <asm/openprom.h>
7#include <asm/prom.h> 8#include <asm/prom.h>
8 9
9extern struct bus_type ebus_bus_type; 10extern struct bus_type ebus_bus_type;
10extern struct bus_type sbus_bus_type; 11extern struct bus_type sbus_bus_type;
12extern struct bus_type of_bus_type;
11 13
12/* 14/*
13 * The of_device is a kind of "base class" that is a superset of 15 * The of_device is a kind of "base class" that is a superset of
@@ -16,8 +18,16 @@ extern struct bus_type sbus_bus_type;
16 */ 18 */
17struct of_device 19struct of_device
18{ 20{
19 struct device_node *node; /* OF device node */ 21 struct device_node *node;
20 struct device dev; /* Generic device interface */ 22 struct device dev;
23 struct resource resource[PROMREG_MAX];
24 unsigned int irq;
25
26 void *sysdata;
27
28 int slot;
29 int portid;
30 int clock_freq;
21}; 31};
22#define to_of_device(d) container_of(d, struct of_device, dev) 32#define to_of_device(d) container_of(d, struct of_device, dev)
23 33