nb/intel/nehalem: Fix DEVEN defines

The DEVEN defines are wrong, but weren't used at all.
Fix them as they are needed by the hybrid_graphics_driver and
use the defines instead of magic values.

Tested on Lenovo T410: The IGD turns on with the correct value.

Change-Id: Idf9fc0115de5c72f7d5d88cbb09ae1d2fee0afd0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27104
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Patrick Rudolph
2018-06-14 16:00:19 +02:00
committed by Patrick Rudolph
parent d37a5bc29e
commit 847f12b031
2 changed files with 5 additions and 5 deletions

View File

@ -151,7 +151,8 @@ void nehalem_early_initialization(int chipset_type)
nehalem_setup_bars();
/* Device Enable */
pci_write_config32(PCI_DEV(0, 0, 0), D0F0_DEVEN, 9 | 2);
pci_write_config32(PCI_DEV(0, 0, 0), D0F0_DEVEN,
DEVEN_IGD | DEVEN_PEG10 | DEVEN_HOST);
early_cpu_init();

View File

@ -69,11 +69,10 @@ typedef struct {
#define D0F0_MCHBAR_HI 0x4c
#define D0F0_GGC 0x52
#define D0F0_DEVEN 0x54
/* Note: Intel's datasheet is broken. Assume the following values are correct */
#define DEVEN_PEG60 (1 << 13)
#define DEVEN_IGD (1 << 4)
#define DEVEN_PEG10 (1 << 3)
#define DEVEN_PEG11 (1 << 2)
#define DEVEN_PEG12 (1 << 1)
#define DEVEN_IGD (1 << 3)
#define DEVEN_PEG10 (1 << 1)
#define DEVEN_HOST (1 << 0)
#define D0F0_PCIEXBAR_LO 0x60
#define D0F0_PCIEXBAR_HI 0x64