summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan/s2882
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/tyan/s2882')
-rw-r--r--src/mainboard/tyan/s2882/auto.c5
-rw-r--r--src/mainboard/tyan/s2882/mainboard.c107
2 files changed, 3 insertions, 109 deletions
diff --git a/src/mainboard/tyan/s2882/auto.c b/src/mainboard/tyan/s2882/auto.c
index b076acdd1a..73aeda4107 100644
--- a/src/mainboard/tyan/s2882/auto.c
+++ b/src/mainboard/tyan/s2882/auto.c
@@ -126,11 +126,10 @@ static inline int spd_read_byte(unsigned device, unsigned address)
return smbus_read_byte(device, address);
}
-//#include "northbridge/amd/amdk8/setup_resource_map.c"
-#include "northbridge/amd/amdk8/resourcemap.c"
#include "northbridge/amd/amdk8/raminit.c"
#include "northbridge/amd/amdk8/coherent_ht.c"
#include "sdram/generic_sdram.c"
+#include "northbridge/amd/amdk8/resourcemap.c"
#define FIRST_CPU 1
@@ -196,7 +195,7 @@ static void main(unsigned long bist)
console_init();
/* Halt if there was a built in self test failure */
-// report_bist_failure(bist);
+ report_bist_failure(bist);
setup_default_resource_map();
needs_reset = setup_coherent_ht_domain();
diff --git a/src/mainboard/tyan/s2882/mainboard.c b/src/mainboard/tyan/s2882/mainboard.c
index 8bc1ac9b9a..9bee33d598 100644
--- a/src/mainboard/tyan/s2882/mainboard.c
+++ b/src/mainboard/tyan/s2882/mainboard.c
@@ -163,111 +163,6 @@ enable(struct chip *chip, enum chip_pass pass)
}
#endif
-#undef DEBUG
-#define DEBUG 0
-#if DEBUG
-static void debug_init(device_t dev)
-{
- unsigned bus;
- unsigned devfn;
-#if 0
- for(bus = 0; bus < 256; bus++) {
- for(devfn = 0; devfn < 256; devfn++) {
- int i;
- dev = dev_find_slot(bus, devfn);
- if (!dev) {
- continue;
- }
- if (!dev->enabled) {
- continue;
- }
- printk_info("%02x:%02x.%0x aka %s\n",
- bus, devfn >> 3, devfn & 7, dev_path(dev));
- for(i = 0; i < 256; i++) {
- if ((i & 0x0f) == 0) {
- printk_info("%02x:", i);
- }
- printk_info(" %02x", pci_read_config8(dev, i));
- if ((i & 0x0f) == 0xf) {
- printk_info("\n");
- }
- }
- printk_info("\n");
- }
- }
-#endif
-#if 0
- msr_t msr;
- unsigned index;
- unsigned eax, ebx, ecx, edx;
- index = 0x80000007;
- printk_debug("calling cpuid 0x%08x\n", index);
- asm volatile(
- "cpuid"
- : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
- : "a" (index)
- );
- printk_debug("cpuid[%08x]: %08x %08x %08x %08x\n",
- index, eax, ebx, ecx, edx);
- if (edx & (3 << 1)) {
- index = 0xC0010042;
- printk_debug("Reading msr: 0x%08x\n", index);
- msr = rdmsr(index);
- printk_debug("msr[0x%08x]: 0x%08x%08x\n",
- index, msr.hi, msr.hi);
- }
-#endif
-}
-
-static void debug_noop(device_t dummy)
-{
-}
-
-static struct device_operations debug_operations = {
- .read_resources = debug_noop,
- .set_resources = debug_noop,
- .enable_resources = debug_noop,
- .init = debug_init,
-};
-
-static unsigned int scan_root_bus(device_t root, unsigned int max)
-{
- struct device_path path;
- device_t debug;
- max = root_dev_scan_bus(root, max);
- path.type = DEVICE_PATH_PNP;
- path.u.pnp.port = 0;
- path.u.pnp.device = 0;
- debug = alloc_dev(&root->link[1], &path);
- debug->ops = &debug_operations;
- return max;
-}
-#endif
-
-static void mainboard_init(device_t dev)
-{
- root_dev_init(dev);
-
-// do_verify_cpu_voltages();
-}
-
-static struct device_operations mainboard_operations = {
- .read_resources = root_dev_read_resources,
- .set_resources = root_dev_set_resources,
- .enable_resources = root_dev_enable_resources,
- .init = mainboard_init,
-#if !DEBUG
- .scan_bus = root_dev_scan_bus,
-#else
- .scan_bus = scan_root_bus,
-#endif
- .enable = 0,
-};
-
-static void enable_dev(struct device *dev)
-{
- dev_root.ops = &mainboard_operations;
-}
struct chip_operations mainboard_tyan_s2882_ops = {
- .enable_dev = enable_dev,
+ CHIP_NAME("Tyan s2882 mainboard")
};