aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/tyan/s2885/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/s2885/mainboard.c
parent1621e9303cd9fcd6363553a091358bdfb908b8e9 (diff)
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/s2885/mainboard.c')
-rw-r--r--src/mainboard/tyan/s2885/mainboard.c45
1 files changed, 32 insertions, 13 deletions
diff --git a/src/mainboard/tyan/s2885/mainboard.c b/src/mainboard/tyan/s2885/mainboard.c
index 524cb80ab2..8d1252042a 100644
--- a/src/mainboard/tyan/s2885/mainboard.c
+++ b/src/mainboard/tyan/s2885/mainboard.c
@@ -4,9 +4,9 @@
#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"
unsigned long initial_apicid[CONFIG_MAX_CPUS] =
{
0,1
@@ -46,7 +46,7 @@ static void print_pci_regs(struct device *dev)
for(i=0;i<256;i++) {
byte = pci_read_config8(dev, i);
- if((i%16)==0) printk_info("\n%02x:",i);
+ if((i%16)==0) printk_debug("\n%02x:",i);
printk_debug(" %02x",byte);
}
printk_debug("\n");
@@ -89,10 +89,11 @@ static void amd8111_enable_rom(void)
#endif
static void onboard_scsi_fixup(void)
{
- struct device *dev;
+ struct device *dev;
+#if 0
unsigned char i,j,k;
-#if 1
- for(i=0;i<=4;i++) {
+
+ for(i=0;i<=6;i++) {
for(j=0;j<=0x1f;j++) {
for (k=0;k<=6;k++){
dev = dev_find_slot(i, PCI_DEVFN(j, k));
@@ -118,7 +119,7 @@ static void onboard_scsi_fixup(void)
// print_mem();
// amd8111_enable_rom();
}
-/*
+
static void vga_fixup(void) {
// we do this right here because:
// - all the hardware is working, and some VGA bioses seem to need
@@ -130,12 +131,12 @@ static void vga_fixup(void) {
#endif
#if CONFIG_VGABIOS == 1
printk_debug("DO THE VGA BIOS\n");
- do_vgabios();
+ do_vgabios(0x0600);
post_code(0x93);
#endif
}
- */
+
static void
enable(struct chip *chip, enum chip_pass pass)
@@ -152,8 +153,8 @@ enable(struct chip *chip, enum chip_pass pass)
case CONF_PASS_PRE_BOOT:
if (conf->fixup_scsi)
onboard_scsi_fixup();
-// if (conf->fixup_vga)
-// vga_fixup();
+ if (conf->fixup_vga)
+ vga_fixup();
printk_debug("mainboard fixup pass %d done\r\n",
pass);
break;
@@ -166,9 +167,27 @@ 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_s2885_control = {
- .enable= enable,
- .name= "Tyan s2885 mainboard "
+ .enable = enable,
+ .enumerate = enumerate,
+ .name = "Tyan s2885 mainboard ",
};
-