From 018d8dd60f2cc0c82faac0ee2657daa163dd43e7 Mon Sep 17 00:00:00 2001 From: Eric Biederman Date: Thu, 4 Nov 2004 11:04:33 +0000 Subject: - Update abuild.sh so it will rebuild successfull builds - Move pci_set_method out of hardwaremain.c - Re-add debugging name field but only include the CONFIG_CHIP_NAME is enabled. All instances are now wrapped in CHIP_NAME - Many minor cleanups so most ports build. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1737 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/tyan/s4882/mainboard.c | 108 +---------------------------------- 1 file changed, 1 insertion(+), 107 deletions(-) (limited to 'src/mainboard/tyan/s4882/mainboard.c') diff --git a/src/mainboard/tyan/s4882/mainboard.c b/src/mainboard/tyan/s4882/mainboard.c index 59723ac4e3..39696b8741 100644 --- a/src/mainboard/tyan/s4882/mainboard.c +++ b/src/mainboard/tyan/s4882/mainboard.c @@ -162,112 +162,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_s4882_ops = { - .enable_dev = enable_dev, + CHIP_NAME("Tyan s4882 mainboard") }; -- cgit v1.2.3