PCI/PTM: Separate configuration and enable
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 9 Sep 2022 20:24:59 +0000 (15:24 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 12 Sep 2022 20:29:32 +0000 (15:29 -0500)
commit118b9dfdc18b68abf736a71330e3ad1f5af7e47e
tree0f5116254dcbce977690ab9ff51bb912cd105e2c
parente243c173c015d62b2bca9b030777ceba13311033
PCI/PTM: Separate configuration and enable

PTM configuration and enabling were previously mixed together:
pci_ptm_init() collected granularity info and enabled PTM for Root Ports
and Switch Upstream Ports; pci_enable_ptm() did the same for Endpoints.

Move everything related to the PTM Capability register to pci_ptm_init()
for all devices, and everything related to the PTM Control register to
pci_enable_ptm().

Link: https://lore.kernel.org/r/20220909202505.314195-4-helgaas@kernel.org
Tested-by: Rajvi Jingar <rajvi.jingar@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/pcie/ptm.c