aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2003-07-21 04:20:08 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2003-07-21 04:20:08 +0000
commit8275bad6f640d0da5ead72984f1efe32e6172d7d (patch)
tree6bf67678b269cb6ad5ff0365acef72d362dc9607 /src
parent54b3d233ed4a66bc9fbc8af7dd742af7d8f2aca3 (diff)
more chip stuff
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@990 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/devices/Config.lb1
-rw-r--r--src/devices/chip.c11
-rw-r--r--src/include/device/chip.h8
-rw-r--r--src/mainboard/motorola/sandpoint/Config.lb2
4 files changed, 19 insertions, 3 deletions
diff --git a/src/devices/Config.lb b/src/devices/Config.lb
index 3dd2ac3935..199c7da46b 100644
--- a/src/devices/Config.lb
+++ b/src/devices/Config.lb
@@ -1,3 +1,4 @@
object device.o
object device_util.o
object pci_device.o
+object chip.o
diff --git a/src/devices/chip.c b/src/devices/chip.c
index d25c92e0d7..e99d731043 100644
--- a/src/devices/chip.c
+++ b/src/devices/chip.c
@@ -10,6 +10,15 @@
void
chip_configure(struct chip *root, enum chip_pass pass)
{
- while (root) {
+ struct chip *c;
+
+ for (c = root; c; c = c->next) {
+ if (root->control && root->control->enable)
+ root->control->enable(root, pass);
+ }
+
+ for (c = root; c; c = c->next) {
+ if (root->children)
+ chip_configure(root->children, pass);
}
}
diff --git a/src/include/device/chip.h b/src/include/device/chip.h
index 8de91a1129..328b64216e 100644
--- a/src/include/device/chip.h
+++ b/src/include/device/chip.h
@@ -6,6 +6,11 @@
*/
/* some of the types of resources chips can control */
+#ifndef CHIP_CONFIGURE
+#define CHIP_CONFIGURE(chip, pass) chip_configure(chip, pass)
+#else
+#define CHIP_CONFIGURE(chip, pass)
+#endif
struct com_ports {
unsigned int enable,baud, base, irq;
@@ -24,6 +29,7 @@ struct lpt_ports {
enum chip_pass {
CHIP_PRE_CONSOLE,
+ CHIP_PRE_PCI,
CHIP_PRE_DEVICE_ENUMERATE,
CHIP_PRE_DEVICE_CONFIGURE,
CHIP_PRE_DEVICE_ENABLE,
@@ -59,5 +65,5 @@ struct chip {
void *chip_info; /* the dreaded "void *" */
};
-extern struct chip *root;
+extern struct chip root;
extern void chip_configure(struct chip *, enum chip_pass);
diff --git a/src/mainboard/motorola/sandpoint/Config.lb b/src/mainboard/motorola/sandpoint/Config.lb
index f5e6c17a50..49e529e37f 100644
--- a/src/mainboard/motorola/sandpoint/Config.lb
+++ b/src/mainboard/motorola/sandpoint/Config.lb
@@ -34,7 +34,7 @@ end
##
southbridge winbond/w83c553 end
superio NSC/pc97307
- register "com1={1} com2={1} floppy=0 lpt=1 keyboard=1 hwmonitor=1"
+ register ".com1={1}, .lpt={0}, .port=SIO_COM1_BASE"
end
##