summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan/s2882/mainboard.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2003-09-25 22:04:19 +0000
committerRonald G. Minnich <rminnich@gmail.com>2003-09-25 22:04:19 +0000
commit3ff7bdaad7afa8f926eb8e1b6151d34cd467dbb0 (patch)
treece1d82069e1cf4e1d5c26def23ef52c1deca15ab /src/mainboard/tyan/s2882/mainboard.c
parent1621e9303cd9fcd6363553a091358bdfb908b8e9 (diff)
downloadcoreboot-3ff7bdaad7afa8f926eb8e1b6151d34cd467dbb0.tar.xz
new from yh lu
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1136 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/tyan/s2882/mainboard.c')
-rw-r--r--src/mainboard/tyan/s2882/mainboard.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/mainboard/tyan/s2882/mainboard.c b/src/mainboard/tyan/s2882/mainboard.c
index d9acaf2384..299401a5d7 100644
--- a/src/mainboard/tyan/s2882/mainboard.c
+++ b/src/mainboard/tyan/s2882/mainboard.c
@@ -4,6 +4,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
+#include "../../../northbridge/amd/amdk8/northbridge.h"
#include "chip.h"
//#include <part/mainboard.h>
//#include "lsi_scsi.c"
@@ -91,7 +92,7 @@ static void onboard_scsi_fixup(void)
{
struct device *dev;
unsigned char i,j,k;
-#if 1
+#if 0
for(i=0;i<=4;i++) {
for(j=0;j<=0x1f;j++) {
for (k=0;k<=6;k++){
@@ -166,9 +167,28 @@ void final_mainboard_fixup(void)
enable_ide_devices();
#endif
}
+static struct device_operations mainboard_operations = {
+ .read_resources = root_dev_read_resources,
+ .set_resources = root_dev_set_resources,
+ .enable_resources = enable_childrens_resources,
+ .init = 0,
+ .scan_bus = amdk8_scan_root_bus,
+ .enable = 0,
+};
+static void enumerate(struct chip *chip)
+{
+ struct chip *child;
+ dev_root.ops = &mainboard_operations;
+ chip->dev = &dev_root;
+ chip->bus = 0;
+ for(child = chip->children; child; child = child->next) {
+ child->bus = &dev_root.link[0];
+ }
+}
struct chip_control mainboard_tyan_s2882_control = {
- .enable= enable,
- .name= "Tyan s2882 mainboard "
+ .enable = enable,
+ .enumerate = enumerate,
+ .name = "Tyan s2882 mainboard ",
};