PCIe ports reserved for VMD use are not visible to BIOS and therefore not
configured to enable PCIE ASPM. Additionally, PCIE LTR values may be left
unset since BIOS will set a default maximum LTR value on endpoints to
ensure that they don't block SoC power management. Lack of this programming
results in high power consumption on laptops as reported in bugzilla [1].
For currently affected products, use pci_enable_default_link_state to set
the allowed link states for devices on the root ports. Also set the LTR
value to the maximum value needed for the SoC. Per the VMD hardware team
future products using VMD will enable BIOS configuration of these
capabilities. This solution is a workaround for current products that
mainly targets laptops. Support is not provided if a switch used nor for
hotplug.
Add vmd_device_data to allow adding additional info for driver data. Also
refactor the PCI ID list to use PCI_VDEVICE.
Signed-off-by: David E. Box <email address hidden>
(cherry picked from https://<email address hidden>/)
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>
a1314a5...
by
Michael Bottini <email address hidden>
Add pci_enable_default_link_state() to allow devices to change the default
BIOS configured states. Clears the BIOS default settings then sets the new
states and reconfigures the link under the semaphore. Also add
PCIE_LINK_STATE_ALL macro for convenience for callers that want to enable
all link states.
Signed-off-by: Michael Bottini <email address hidden>
Signed-off-by: David E. Box <email address hidden>
(cherry picked from https://<email address hidden>/)
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>