linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI: dra7xx: PCI_EXP_LNKCTL2 usage
@ 2019-07-16 13:59 Bjorn Helgaas
  0 siblings, 0 replies; only message in thread
From: Bjorn Helgaas @ 2019-07-16 13:59 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Lorenzo Pieralisi, linux-omap, linux-pci, linux-kernel

ab5fe4f4d31e ("PCI: dra7xx: Add support to force RC to work in GEN1 mode")
added this:

  +       dw_pcie_cfg_read(pp->dbi_base + exp_cap_off + PCI_EXP_LNKCTL2,
  +                        2, &reg);
  +       if ((reg & PCI_EXP_LNKCAP_SLS) != PCI_EXP_LNKCAP_SLS_2_5GB) {
  +               reg &= ~((u32)PCI_EXP_LNKCAP_SLS);
  +               reg |= PCI_EXP_LNKCAP_SLS_2_5GB;
  +               dw_pcie_cfg_write(pp->dbi_base + exp_cap_off +
  +                                 PCI_EXP_LNKCTL2, 2, reg);
  +       }

This probably works as intended, but it *looks* wrong because it uses
LNKCAP_* symbols on LNKCTL2 register values.  We do have
PCI_EXP_LNKCTL2_* symbols, so I think it would be better if we used
used those.

Bjorn

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-16 13:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-16 13:59 PCI: dra7xx: PCI_EXP_LNKCTL2 usage Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).