Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro
@ 2025-06-07 15:55 Hans Zhang
  2025-06-07 15:55 ` [PATCH v2 1/3] PCI: Add PCIE_SPEED2LNKCTL2_TLS conversion macro Hans Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Hans Zhang @ 2025-06-07 15:55 UTC (permalink / raw)
  To: bhelgaas, lpieralisi, kw, kwilczynski, mani, ilpo.jarvinen,
	jingoohan1
  Cc: robh, linux-pci, linux-kernel, Hans Zhang

This series standardizes PCIe link speed handling across multiple drivers
by introducing a common conversion macro PCIE_SPEED2LNKCTL2_TLS(). The
changes eliminate redundant speed-to-register mappings and simplify code
maintenance:

The refactoring improves code consistency and reduces conditional
branching, while maintaining full backward compatibility with existing
speed settings.

---
Changes for v2:
- s/PCIE_SPEED2LNKCTL2_TLS_ENC/PCIE_SPEED2LNKCTL2_TLS
- The patch commit message were modified.
---

Hans Zhang (3):
  PCI: Add PCIE_SPEED2LNKCTL2_TLS conversion macro
  PCI: dwc: Simplify link speed configuration with macro
  PCI/bwctrl: Replace legacy speed conversion with shared macro

 drivers/pci/controller/dwc/pcie-designware.c | 18 +++---------------
 drivers/pci/pci.h                            |  9 +++++++++
 drivers/pci/pcie/bwctrl.c                    | 19 +------------------
 3 files changed, 13 insertions(+), 33 deletions(-)


base-commit: ec7714e4947909190ffb3041a03311a975350fe0
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-24 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-07 15:55 [PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro Hans Zhang
2025-06-07 15:55 ` [PATCH v2 1/3] PCI: Add PCIE_SPEED2LNKCTL2_TLS conversion macro Hans Zhang
2025-06-07 15:55 ` [PATCH v2 2/3] PCI: dwc: Simplify link speed configuration with macro Hans Zhang
2025-06-07 15:55 ` [PATCH v2 3/3] PCI/bwctrl: Replace legacy speed conversion with shared macro Hans Zhang
2025-06-19 13:26 ` [PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro Manivannan Sadhasivam
2025-06-24 15:13 ` Hans Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox