From 1abf46c74ed34eb394921d2f72817c728e3bb9ee Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 13 Apr 2010 21:31:42 +0000 Subject: ip1000: fix seabios start, fix flash gpio detection simplify i82830 code. Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5422 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/intel/i82830/northbridge.c | 83 ++++++++++++++++-------------- 1 file changed, 43 insertions(+), 40 deletions(-) (limited to 'src/northbridge/intel/i82830/northbridge.c') diff --git a/src/northbridge/intel/i82830/northbridge.c b/src/northbridge/intel/i82830/northbridge.c index 5cd13b7033..aff13838d4 100644 --- a/src/northbridge/intel/i82830/northbridge.c +++ b/src/northbridge/intel/i82830/northbridge.c @@ -114,49 +114,52 @@ static void pci_domain_set_resources(device_t dev) pci_tolm = find_pci_tolm(&dev->link[0]); mc_dev = dev->link[0].children; - if (mc_dev) { - unsigned long tomk, tolmk; - int idx; - - if (CONFIG_VIDEO_MB == 512) { - igd_memory = (CONFIG_VIDEO_MB); - printk(BIOS_DEBUG, "%dKB IGD UMA\n", igd_memory >> 10); - } else { - igd_memory = (CONFIG_VIDEO_MB * 1024); - printk(BIOS_DEBUG, "%dMB IGD UMA\n", igd_memory >> 10); - } - - /* Get the value of the highest DRB. This tells the end of - * the physical memory. The units are ticks of 32MB - * i.e. 1 means 32MB. - */ - tomk = ((unsigned long)pci_read_config8(mc_dev, DRB + 3)) << 15; - tomk -= igd_memory; - - /* For reserving UMA memory in the memory map */ - uma_memory_base = tomk * 1024ULL; - uma_memory_size = igd_memory * 1024ULL; - printk(BIOS_DEBUG, "Available memory: %ldKB\n", tomk); - - /* Compute the top of low memory. */ - tolmk = pci_tolm >> 10; - if (tolmk >= tomk) { - /* The PCI hole does does not overlap the memory. */ - tolmk = tomk; - } - - /* Report the memory regions. */ - idx = 10; - ram_resource(dev, idx++, 0, 640); - ram_resource(dev, idx++, 1024, tolmk - 1024); + if (!mc_dev) + return; -#if CONFIG_WRITE_HIGH_TABLES==1 - /* Leave some space for ACPI, PIRQ and MP tables */ - high_tables_base = (tomk - HIGH_TABLES_SIZE) * 1024; - high_tables_size = HIGH_TABLES_SIZE * 1024; -#endif + unsigned long tomk, tolmk; + int idx; + + if (CONFIG_VIDEO_MB == 512) { + igd_memory = (CONFIG_VIDEO_MB); + printk(BIOS_DEBUG, "%dKB IGD UMA\n", igd_memory >> 10); + } else { + igd_memory = (CONFIG_VIDEO_MB * 1024); + printk(BIOS_DEBUG, "%dMB IGD UMA\n", igd_memory >> 10); + } + + /* Get the value of the highest DRB. This tells the end of + * the physical memory. The units are ticks of 32MB + * i.e. 1 means 32MB. + */ + tomk = ((unsigned long)pci_read_config8(mc_dev, DRB + 3)) << 15; + tomk -= igd_memory; + + /* For reserving UMA memory in the memory map */ + uma_memory_base = tomk * 1024ULL; + uma_memory_size = igd_memory * 1024ULL; + printk(BIOS_DEBUG, "Available memory: %ldKB\n", tomk); + + /* Compute the top of low memory. */ + tolmk = pci_tolm >> 10; + if (tolmk >= tomk) { + /* The PCI hole does does not overlap the memory. */ + tolmk = tomk; } + + /* Report the memory regions. */ + idx = 10; + ram_resource(dev, idx++, 0, 640); + ram_resource(dev, idx++, 768, 256); + ram_resource(dev, idx++, 1024, tolmk - 1024); + assign_resources(&dev->link[0]); + +#if CONFIG_WRITE_HIGH_TABLES==1 + /* Leave some space for ACPI, PIRQ and MP tables */ + high_tables_base = (tomk - HIGH_TABLES_SIZE) * 1024; + high_tables_size = HIGH_TABLES_SIZE * 1024; +#endif } static struct device_operations pci_domain_ops = { -- cgit v1.2.3