Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers()

The goal of the dw_pcie_ep_init_complete() API is to initialize the DWC
specific registers post registering the controller with the EP framework.

But the naming doesn't reflect its functionality and causes confusion. So,
let's rename it to dw_pcie_ep_init_registers() to make it clear that it
initializes the DWC specific registers.

Link: https://lore.kernel.org/linux-pci/20240327-pci-dbi-rework-v12-6-082625472414@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>

authored by

Manivannan Sadhasivam and committed by
Krzysztof Wilczyński
7d6e64c4 570d7715

+11 -11
+7 -7
drivers/pci/controller/dwc/pcie-designware-ep.c
··· 674 674 } 675 675 676 676 /** 677 - * dw_pcie_ep_init_complete - Complete DWC EP initialization 677 + * dw_pcie_ep_init_registers - Initialize DWC EP specific registers 678 678 * @ep: DWC EP device 679 679 * 680 - * Complete the initialization of the registers (CSRs) specific to DWC EP. This 681 - * API should be called only when the endpoint receives an active refclk (either 682 - * from host or generated locally). 680 + * Initialize the registers (CSRs) specific to DWC EP. This API should be called 681 + * only when the endpoint receives an active refclk (either from host or 682 + * generated locally). 683 683 */ 684 - int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep) 684 + int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep) 685 685 { 686 686 struct dw_pcie *pci = to_dw_pcie_from_ep(ep); 687 687 struct dw_pcie_ep_func *ep_func; ··· 801 801 802 802 return ret; 803 803 } 804 - EXPORT_SYMBOL_GPL(dw_pcie_ep_init_complete); 804 + EXPORT_SYMBOL_GPL(dw_pcie_ep_init_registers); 805 805 806 806 /** 807 807 * dw_pcie_ep_init - Initialize the endpoint device ··· 880 880 * (Ex: tegra194). Any hardware access on such platforms result 881 881 * in system hang. 882 882 */ 883 - ret = dw_pcie_ep_init_complete(ep); 883 + ret = dw_pcie_ep_init_registers(ep); 884 884 if (ret) 885 885 goto err_free_epc_mem; 886 886
+2 -2
drivers/pci/controller/dwc/pcie-designware.h
··· 669 669 #ifdef CONFIG_PCIE_DW_EP 670 670 void dw_pcie_ep_linkup(struct dw_pcie_ep *ep); 671 671 int dw_pcie_ep_init(struct dw_pcie_ep *ep); 672 - int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep); 672 + int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep); 673 673 void dw_pcie_ep_init_notify(struct dw_pcie_ep *ep); 674 674 void dw_pcie_ep_deinit(struct dw_pcie_ep *ep); 675 675 void dw_pcie_ep_cleanup(struct dw_pcie_ep *ep); ··· 693 693 return 0; 694 694 } 695 695 696 - static inline int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep) 696 + static inline int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep) 697 697 { 698 698 return 0; 699 699 }
+1 -1
drivers/pci/controller/dwc/pcie-qcom-ep.c
··· 463 463 PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA; 464 464 writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK); 465 465 466 - ret = dw_pcie_ep_init_complete(&pcie_ep->pci.ep); 466 + ret = dw_pcie_ep_init_registers(&pcie_ep->pci.ep); 467 467 if (ret) { 468 468 dev_err(dev, "Failed to complete initialization: %d\n", ret); 469 469 goto err_disable_resources;
+1 -1
drivers/pci/controller/dwc/pcie-tegra194.c
··· 1897 1897 val = (upper_32_bits(ep->msi_mem_phys) & MSIX_ADDR_MATCH_HIGH_OFF_MASK); 1898 1898 dw_pcie_writel_dbi(pci, MSIX_ADDR_MATCH_HIGH_OFF, val); 1899 1899 1900 - ret = dw_pcie_ep_init_complete(ep); 1900 + ret = dw_pcie_ep_init_registers(ep); 1901 1901 if (ret) { 1902 1902 dev_err(dev, "Failed to complete initialization: %d\n", ret); 1903 1903 goto fail_init_complete;