]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Add PTM clock granularity information
authorBjorn Helgaas <bhelgaas@google.com>
Sun, 12 Jun 2016 21:26:40 +0000 (16:26 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 25 Aug 2016 13:32:34 +0000 (08:32 -0500)
commitd59d7f272978861a48043d892cf2d577de964a0a
tree96adee8ae73a95035e7d523214c8674b026377ee
parent58260e0d5eefb757036df7d9cec93709c8a9821e
PCI: Add PTM clock granularity information

The PTM Control register (PCIe r3.1, sec 7.32.3) contains an Effective
Granularity field:

  This provides information relating to the expected accuracy of the PTM
  clock, but does not otherwise affect the PTM mechanism.

Set the Effective Granularity based on the PTM Root and any intervening PTM
Time Sources.

This does not set Effective Granularity for Root Complex Integrated
Endpoints because I don't know how to figure out clock granularity for
them.  The spec says:

  ... system software must set [Effective Granularity] to the value
  reported in the Local Clock Granularity field by the associated PTM
  Time Source.

but I don't know how to identify the associated PTM Time Source.  Normally
it's the upstream bridge, but an integrated endpoint has no upstream
bridge.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/ptm.c
include/linux/pci.h
include/uapi/linux/pci_regs.h