diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> | 2013-02-24 12:01:44 +0100 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-04-16 05:20:12 +0200 |
commit | ed7e29e6202485ba7b4f27bd415c891abdbb9f1d (patch) | |
tree | 1b25ed74218adb5681b0a7f7e08bd9b1ab03cb10 /src/northbridge/intel | |
parent | cef4ea7fb53f01a74126b85232503a2d106d9933 (diff) |
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 <GNUtoo@no-log.org>
Reviewed-on: http://review.coreboot.org/2998
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r-- | src/northbridge/intel/i945/gma.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 |