Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40968 )
Change subject: soc/intel/tigerlake: Disable Thunderbolt PCIe root ports bus master
......................................................................
Patch Set 17: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/40968/17/src/soc/intel/tigerlake/fi...
File src/soc/intel/tigerlake/finalize.c:
https://review.coreboot.org/c/coreboot/+/40968/17/src/soc/intel/tigerlake/fi...
PS17, Line 90: pci_dev_disable_bus_master(dev);
Can’t this be written in a for loop?
Yes, one can add a few helper #defines in a header:
#define SA_DEVFN_TBT(x) PCI_DEVFN(SA_DEV_SLOT_TBT, (x))
#define NUM_TBT_FUNCTIONS 4
Then write this function as:
static void tbt_finalize(void)
{
int i;
/* Disable Thunderbolt PCIe root ports bus master */
for (i = 0; i < NUM_TBT_FUNCTIONS; i++) {
struct device *const dev = pcidev_path_on_root(SA_DEVFN_TBT(i)
if (dev)
pci_dev_disable_bus_master(dev);
}
}
--
To view, visit
https://review.coreboot.org/c/coreboot/+/40968
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9650b9dd4df1f9bee53ae3737b7bf60b2ef8017b
Gerrit-Change-Number: 40968
Gerrit-PatchSet: 17
Gerrit-Owner: John Zhao
john.zhao@intel.com
Gerrit-Reviewer: Alex Levin
levinale@google.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Caveh Jalali
caveh@chromium.org
Gerrit-Reviewer: Divya S Sasidharan
divya.s.sasidharan@intel.com
Gerrit-Reviewer: Duncan Laurie
dlaurie@chromium.org
Gerrit-Reviewer: John Zhao
john.zhao@intel.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Prashant Malani
pmalani@google.com
Gerrit-Reviewer: Shamile Khan
shamile.khan@intel.com
Gerrit-Reviewer: Wonkyu Kim
wonkyu.kim@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Felix Singer
felixsinger@posteo.net
Gerrit-CC: Aaron Durbin
adurbin@chromium.org
Gerrit-CC: Chiranjeevi Rapolu
chiranjeevi.rapolu@intel.corp-partner.google.com
Gerrit-CC: Divya Sasidharan
divya.s.sasidharan@intel.corp-partner.google.com
Gerrit-CC: Lalithambika Krishnakumar
lalithambika.krishnakumar@intel.corp-partner.google.com
Gerrit-CC: Nico Huber
nico.h@gmx.de
Gerrit-CC: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-CC: Tanu Malhotra
tanu.malhotra@intel.com
Gerrit-CC: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Comment-Date: Tue, 07 Jul 2020 10:19:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-MessageType: comment