mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branch 'pci/enumeration'
- Remove x86 and arm64 node-local allocation for host bridge structures
(Punit Agrawal)
- Pay attention to device-specific _PXM node values (Jonathan Cameron)
- Support new Immediate Readiness bit (Felipe Balbi)
* pci/enumeration:
PCI: Add support for Immediate Readiness
ACPI/PCI: Pay attention to device-specific _PXM node values
x86/PCI: Remove node-local allocation when initialising host controller
arm64: PCI: Remove node-local allocations when initialising host controller
This commit is contained in:
commit
de468b7554
6 changed files with 22 additions and 5 deletions
|
|
@ -751,10 +751,15 @@ static void pci_acpi_setup(struct device *dev)
|
|||
{
|
||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||
struct acpi_device *adev = ACPI_COMPANION(dev);
|
||||
int node;
|
||||
|
||||
if (!adev)
|
||||
return;
|
||||
|
||||
node = acpi_get_node(adev->handle);
|
||||
if (node != NUMA_NO_NODE)
|
||||
set_dev_node(dev, node);
|
||||
|
||||
pci_acpi_optimize_delay(pci_dev, adev->handle);
|
||||
|
||||
pci_acpi_add_pm_notifier(adev, pci_dev);
|
||||
|
|
|
|||
|
|
@ -999,7 +999,7 @@ static void __pci_start_power_transition(struct pci_dev *dev, pci_power_t state)
|
|||
* because have already delayed for the bridge.
|
||||
*/
|
||||
if (dev->runtime_d3cold) {
|
||||
if (dev->d3cold_delay)
|
||||
if (dev->d3cold_delay && !dev->imm_ready)
|
||||
msleep(dev->d3cold_delay);
|
||||
/*
|
||||
* When powering on a bridge from D3cold, the
|
||||
|
|
@ -2644,6 +2644,7 @@ EXPORT_SYMBOL_GPL(pci_d3cold_disable);
|
|||
void pci_pm_init(struct pci_dev *dev)
|
||||
{
|
||||
int pm;
|
||||
u16 status;
|
||||
u16 pmc;
|
||||
|
||||
pm_runtime_forbid(&dev->dev);
|
||||
|
|
@ -2706,6 +2707,10 @@ void pci_pm_init(struct pci_dev *dev)
|
|||
/* Disable the PME# generation functionality */
|
||||
pci_pme_active(dev, false);
|
||||
}
|
||||
|
||||
pci_read_config_word(dev, PCI_STATUS, &status);
|
||||
if (status & PCI_STATUS_IMM_READY)
|
||||
dev->imm_ready = 1;
|
||||
}
|
||||
|
||||
static unsigned long pci_ea_flags(struct pci_dev *dev, u8 prop)
|
||||
|
|
@ -4376,6 +4381,9 @@ int pcie_flr(struct pci_dev *dev)
|
|||
|
||||
pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
|
||||
|
||||
if (dev->imm_ready)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Per PCIe r4.0, sec 6.6.2, a device must complete an FLR within
|
||||
* 100ms, but may silently discard requests while the FLR is in
|
||||
|
|
@ -4417,6 +4425,9 @@ static int pci_af_flr(struct pci_dev *dev, int probe)
|
|||
|
||||
pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);
|
||||
|
||||
if (dev->imm_ready)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Per Advanced Capabilities for Conventional PCI ECN, 13 April 2006,
|
||||
* updated 27 July 2006; a device must complete an FLR within
|
||||
|
|
|
|||
Loading…
Reference in a new issue