aboutsummaryrefslogtreecommitdiff
path: root/src/include/device/chip.h
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-09-02 03:36:25 +0000
committerEric Biederman <ebiederm@xmission.com>2003-09-02 03:36:25 +0000
commite9a271e32c53076445ef70da8aec8201c82693ec (patch)
treeaf88f51ba907922157d3b97f9713a07480223372 /src/include/device/chip.h
parentd4c14524f53d8e812cf52b57e16c53d259c44ea0 (diff)
- Major update of the dynamic device tree so it can handle
* subtractive resources * merging with the static device tree * more device types than just pci - The piece to watch out for is the new enable_resources method that was needed in all of the drivers git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1096 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/include/device/chip.h')
-rw-r--r--src/include/device/chip.h45
1 files changed, 32 insertions, 13 deletions
diff --git a/src/include/device/chip.h b/src/include/device/chip.h
index d1132a1f36..a98625a7ab 100644
--- a/src/include/device/chip.h
+++ b/src/include/device/chip.h
@@ -1,3 +1,7 @@
+#ifndef DEVICE_CHIP_H
+
+#include <device/path.h>
+
/* chips are arbitrary chips (superio, southbridge, etc.)
* They have private structures that define chip resources and default
* settings. They have four externally visible functions for control.
@@ -48,23 +52,38 @@ struct chip;
/* there is one of these for each TYPE of chip */
struct chip_control {
- void (*enable)(struct chip *, enum chip_pass);
- char *path; /* the default path. Can be overridden
- * by commands in config
- */
- // This is the print name for debugging
- char *name;
+ /* This is the print name for debugging */
+ char *name;
+ void (*enable)(struct chip *, enum chip_pass);
+ void (*enumerate)(struct chip *chip);
};
+
+struct chip_device_path {
+ struct device_path path;
+ unsigned channel;
+ int enable;
+};
+
+struct device;
+struct bus;
+
+#ifndef MAX_CHIP_PATHS
+#define MAX_CHIP_PATHS 16
+#endif
struct chip {
- struct chip_control *control; /* for this device */
- char *path; /* can be 0, in which case the default is taken */
- char *configuration; /* can be 0. */
- int irq;
- struct chip *next, *children;
- /* there is one of these for each INSTANCE of a chip */
- void *chip_info; /* the dreaded "void *" */
+ struct chip_control *control; /* for this device */
+ struct chip_device_path path[MAX_CHIP_PATHS]; /* can be 0, in which case the default is taken */
+ char *configuration; /* can be 0. */
+ struct chip *next, *children;
+ /* there is one of these for each INSTANCE of a chip */
+ void *chip_info; /* the dreaded "void *" */
+ /* bus and device links into the device tree */
+ struct bus *bus;
+ struct device *dev;
};
extern struct chip static_root;
extern void chip_configure(struct chip *, enum chip_pass);
+extern void chip_enumerate(struct chip *chip);
+#endif /* DEVICE_CHIP_H */