]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: dwc: Consolidate args of dw_pcie_prog_outbound_atu() into a structure
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 18 Apr 2024 16:04:25 +0000 (12:04 -0400)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 9 Jul 2024 23:20:05 +0000 (18:20 -0500)
commitaa85ef61d841dc5506861f71c28c351e17a9f472
treec60c83fcfc83df8007ff71b06fa17c019eb6d1d2
parentc2a57ee0f2f1ad8c970ff58b78a43e85abbdeb7f
PCI: dwc: Consolidate args of dw_pcie_prog_outbound_atu() into a structure

This is a preparation before adding the Msg-type outbound iATU
mapping. The respective update will require two more arguments added
to __dw_pcie_prog_outbound_atu(). That will make the already
complicated function prototype even more hard to comprehend accepting
_eight_ arguments.

To prevent that and keep the code more-or-less readable, move all the
outbound iATU-related arguments to a new config structure: struct
dw_pcie_ob_atu_cfg, and pass a pointer to dw_pcie_prog_outbound_atu(). The
structure should be locally defined and populated with the outbound iATU
settings implied by the caller context.

As a result of this change there is no longer need in having the two
distinctive methods for the Host and Endpoint outbound iATU setups since
the code can directly call the dw_pcie_prog_outbound_atu() method with the
config structure populated, so drop dw_pcie_prog_ep_outbound_atu().

[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240418-pme_msg-v8-2-a54265c39742@nxp.com
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
drivers/pci/controller/dwc/pcie-designware-ep.c
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.c
drivers/pci/controller/dwc/pcie-designware.h