diff options
Diffstat (limited to 'src/southbridge/intel/lynxpoint/early_pch.c')
-rw-r--r-- | src/southbridge/intel/lynxpoint/early_pch.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/southbridge/intel/lynxpoint/early_pch.c b/src/southbridge/intel/lynxpoint/early_pch.c index 92cbf0176f..80b8939c5a 100644 --- a/src/southbridge/intel/lynxpoint/early_pch.c +++ b/src/southbridge/intel/lynxpoint/early_pch.c @@ -18,10 +18,25 @@ extern const struct pch_lp_gpio_map mainboard_gpio_map[]; #include <southbridge/intel/common/gpio.h> #endif +enum pch_platform_type get_pch_platform_type(void) +{ + const u16 did = pci_read_config16(PCH_LPC_DEV, PCI_DEVICE_ID); + + /* Check if this is a LPT-LP or WPT-LP device ID */ + if ((did & 0xff00) == 0x9c00) + return PCH_TYPE_ULT; + + /* Non-LP laptop SKUs have an odd device ID (least significant bit is one) */ + if (did & 1) + return PCH_TYPE_MOBILE; + + /* Desktop and Server SKUs have an even device ID */ + return PCH_TYPE_DESKTOP; +} + int pch_is_lp(void) { - u8 id = pci_read_config8(PCH_LPC_DEV, PCI_DEVICE_ID + 1); - return id == PCH_TYPE_LPT_LP; + return get_pch_platform_type() == PCH_TYPE_ULT; } static void pch_enable_bars(void) |