linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] PCI endpoint BAR hardware description cleanup
@ 2024-02-16 13:45 Niklas Cassel
  2024-02-16 13:45 ` [PATCH v2 1/2] PCI: endpoint: Clean up hardware description for BARs Niklas Cassel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Niklas Cassel @ 2024-02-16 13:45 UTC (permalink / raw)
  To: Richard Zhu, Lucas Stach, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Minghuan Lian, Mingkai Hu, Roy Zang,
	Srikanth Thokala, Marek Vasut, Yoshihiro Shimoda, Thierry Reding,
	Jonathan Hunter, Kunihiko Hayashi, Masami Hiramatsu, Jon Mason,
	Dave Jiang, Allen Hubbe, Manivannan Sadhasivam,
	Kishon Vijay Abraham I
  Cc: Damien Le Moal, Frank Li, Niklas Cassel, linux-pci,
	linux-arm-kernel, linuxppc-dev, linux-renesas-soc, linux-tegra,
	ntb

The series is based on top of:
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=endpoint


Hello all,

This series cleans up the hardware description for PCI endpoint BARs.

The problems with the existing hardware description:
-The documentation is lackluster.
-Some of the names are confusingly similar, e.g. fixed_64bit and
 fixed_size, even though these are for completely unrelated things.
-The way that the BARs are defined in the endpoint controller drivers
 is messy, because the left hand side is not a BAR, so you can mark a
 BAR as e.g. both fixed size and reserved.

This series tries to address all the problems above.

Personally, I think that the code is more readable, both the endpoint
controller drivers, but also pci-epc-core.c.

(I will be sending out a patch series that adds BAR_RESIZABLE to enum
pci_epc_bar_type in the coming week.)


Kind regards,
Niklas


Changes since V1:
-Picked up tags from Kishon and Mani.
-Improved commit message for patch 1/2 as suggested by Mani.
-Improved kdoc in patch 2/2 as suggested by Mani.


Niklas Cassel (2):
  PCI: endpoint: Clean up hardware description for BARs
  PCI: endpoint: Drop only_64bit on reserved BARs

 drivers/pci/controller/dwc/pci-imx6.c         |  3 +-
 drivers/pci/controller/dwc/pci-keystone.c     | 12 +++---
 .../pci/controller/dwc/pci-layerscape-ep.c    |  5 ++-
 drivers/pci/controller/dwc/pcie-keembay.c     |  8 +++-
 drivers/pci/controller/dwc/pcie-rcar-gen4.c   |  4 +-
 drivers/pci/controller/dwc/pcie-tegra194.c    | 10 +++--
 drivers/pci/controller/dwc/pcie-uniphier-ep.c | 15 +++++--
 drivers/pci/controller/pcie-rcar-ep.c         | 14 ++++---
 drivers/pci/endpoint/functions/pci-epf-ntb.c  |  4 +-
 drivers/pci/endpoint/functions/pci-epf-test.c |  8 ++--
 drivers/pci/endpoint/functions/pci-epf-vntb.c |  2 +-
 drivers/pci/endpoint/pci-epc-core.c           | 25 +++++-------
 drivers/pci/endpoint/pci-epf-core.c           | 15 +++----
 include/linux/pci-epc.h                       | 39 ++++++++++++++++---
 14 files changed, 106 insertions(+), 58 deletions(-)

-- 
2.43.1


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

end of thread, other threads:[~2024-02-16 15:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 13:45 [PATCH v2 0/2] PCI endpoint BAR hardware description cleanup Niklas Cassel
2024-02-16 13:45 ` [PATCH v2 1/2] PCI: endpoint: Clean up hardware description for BARs Niklas Cassel
2024-02-16 14:59   ` Manivannan Sadhasivam
2024-02-16 13:45 ` [PATCH v2 2/2] PCI: endpoint: Drop only_64bit on reserved BARs Niklas Cassel
2024-02-16 15:02 ` [PATCH v2 0/2] PCI endpoint BAR hardware description cleanup Manivannan Sadhasivam

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).