From ed7e29e6202485ba7b4f27bd415c891abdbb9f1d Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sun, 24 Feb 2013 12:01:44 +0100 Subject: Lenovo ThinkPad X60: Add Native VGA init. The code has been taken from the google link mainboard and modified to fit the ThinkPad X60. Change-Id: Ie16e45163acdc651ea46699ecc33055bfd34099c Signed-off-by: Denis 'GNUtoo' Carikli Reviewed-on: http://review.coreboot.org/2998 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/northbridge/intel/i945/gma.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/northbridge/intel/i945/gma.c') diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index b1e0c7bbe8..20e8bf3667 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -42,7 +42,26 @@ static void gma_func0_init(struct device *dev) reg32 = pci_read_config32(dev, PCI_COMMAND); pci_write_config32(dev, PCI_COMMAND, reg32 | PCI_COMMAND_MASTER); + +#if !CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT + /* PCI Init, will run VBIOS */ pci_dev_init(dev); +#endif + + +#if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT + /* This should probably run before post VBIOS init. */ + printk(BIOS_SPEW, "Initializing VGA without OPROM.\n"); + u32 iobase, mmiobase, physbase, graphics_base; + iobase = dev->resource_list[1].base; + mmiobase = dev->resource_list[0].base; + physbase = pci_read_config32(dev, 0x5c) & ~0xf; + graphics_base = dev->resource_list[2].base + 0x20000 ; + + int i915lightup(u32 physbase, u32 iobase, u32 mmiobase, u32 gfx); + i915lightup(physbase, iobase, mmiobase, graphics_base); +#endif + } /* This doesn't reclaim stolen UMA memory, but IGD could still -- cgit v1.2.3