summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan/s2885/mainboard.c
diff options
context:
space:
mode:
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 ",
};
-