diff options
author | Nico Huber <nico.huber@secunet.com> | 2017-03-30 17:47:24 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-06 17:27:10 +0200 |
commit | da94e171b57c77217b5bd8ad071208475f33cf56 (patch) | |
tree | 4fbd98143ecba743fc9d3cbd8fc45c646d3dcf46 /util/inteltool/inteltool.c | |
parent | 0660c6c1ffb8ff1de04d62432a22b2f0a625fca2 (diff) |
inteltool/ahci: Add Skylake support
The SATA device moved from 0:1f.2 to 0:17.0, 0:1f.2 became PMC. We
detect that by checking the PCI device class.
The ABAR MMIO space has grown to 2KiB and up to 8 ports are supported
now. For backwards compatibility, only dump port registers of ports
that are enabled in the Ports Implemented (PI) register.
Change-Id: I8e0f07d7359d92f689882b5afefa5ffb3766ee8b
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/19584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r-- | util/inteltool/inteltool.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c index 3f55685993..ccb8facfa0 100644 --- a/util/inteltool/inteltool.c +++ b/util/inteltool/inteltool.c @@ -4,6 +4,7 @@ * Copyright (C) 2008-2010 by coresystems GmbH * written by Stefan Reinauer <stepan@coresystems.de> * Copyright (C) 2009 Carl-Daniel Hailfinger + * Copyright (C) 2017 secunet Security Networks AG * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -457,17 +458,24 @@ int main(int argc, char *argv[]) gfx = 0; } - if (sb->device_id == PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC) + if (sb->device_id == PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC) { ahci = pci_get_dev(pacc, 0, 0, 0x13, 0); - else + } else { ahci = pci_get_dev(pacc, 0, 0, 0x1f, 2); + if (ahci) { + pci_fill_info(ahci, PCI_FILL_CLASS); + if (ahci->device_class != PCI_CLASS_STORAGE_SATA) + ahci = pci_get_dev(pacc, 0, 0, 0x17, 0); + } + } if (ahci) { pci_fill_info(ahci, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); - if (ahci->vendor_id != PCI_VENDOR_ID_INTEL) - ahci = 0; + if (ahci->vendor_id != PCI_VENDOR_ID_INTEL || + ahci->device_class != PCI_CLASS_STORAGE_SATA) + ahci = NULL; } id = cpuid(1); |