mirror of
https://review.coreboot.org/flashrom.git
synced 2025-08-15 19:40:19 +02:00
chipset_enable.c: Use PCI_ACCESS_ECAM to access pci register
In the latest pciutils(v3.13.0), it supports accessing pci registers by ecam. This patch uses libpci version check to decide whether flashrom calls libpci and use 0xcf8/0xcfc or ecam to access pci registers. BUG=b:359813524 TEST=with libpci >= 3.13.0, flashrom is working with ECAM access Change-Id: I4549f87c8b01da0a1d3d8ce0b3b75c1f5fa2cbab Signed-off-by: Kane Chen <kane.chen@intel.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/83896 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hsuan-ting Chen <roccochen@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
This commit is contained in:

committed by
Peter Marheine

parent
33dda3387c
commit
1197f0832d
@@ -165,6 +165,13 @@ libusb1 = dependency('libusb-1.0', required : group_usb)
|
||||
libftdi1 = dependency('libftdi1', required : group_ftdi)
|
||||
libjaylink = dependency('libjaylink', required : group_jlink, version : '>=0.3.0')
|
||||
|
||||
# ECAM is supported in libpci after 3.13.0
|
||||
if libpci.version().version_compare('>=3.13.0')
|
||||
add_project_arguments('-DCONFIG_USE_LIBPCI_ECAM=1', language: 'c')
|
||||
else
|
||||
add_project_arguments('-DCONFIG_USE_LIBPCI_ECAM=0', language: 'c')
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
# Specifying an include_path that doesn't exist is an error,
|
||||
# but we only use this if the library is found in the same directory.
|
||||
|
Reference in New Issue
Block a user