]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 27 Mar 2024 09:13:35 +0000 (14:43 +0530)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Wed, 10 Apr 2024 17:51:28 +0000 (17:51 +0000)
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>
drivers/pci/controller/dwc/pcie-designware-ep.c
drivers/pci/controller/dwc/pcie-designware.h
drivers/pci/controller/dwc/pcie-qcom-ep.c
drivers/pci/controller/dwc/pcie-tegra194.c

index eeff7f1ff8f1f1653b44f392fcb70eaedce03c4c..761d3012a073fee43432292d54444dd4ce548093 100644 (file)
@@ -674,14 +674,14 @@ static unsigned int dw_pcie_ep_find_ext_capability(struct dw_pcie *pci, int cap)
 }
 
 /**
- * dw_pcie_ep_init_complete - Complete DWC EP initialization
+ * dw_pcie_ep_init_registers - Initialize DWC EP specific registers
  * @ep: DWC EP device
  *
- * Complete the initialization of the registers (CSRs) specific to DWC EP. This
- * API should be called only when the endpoint receives an active refclk (either
- * from host or generated locally).
+ * Initialize the registers (CSRs) specific to DWC EP. This API should be called
+ * only when the endpoint receives an active refclk (either from host or
+ * generated locally).
  */
-int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep)
+int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep)
 {
        struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
        struct dw_pcie_ep_func *ep_func;
@@ -801,7 +801,7 @@ err_remove_edma:
 
        return ret;
 }
-EXPORT_SYMBOL_GPL(dw_pcie_ep_init_complete);
+EXPORT_SYMBOL_GPL(dw_pcie_ep_init_registers);
 
 /**
  * dw_pcie_ep_init - Initialize the endpoint device
@@ -880,7 +880,7 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep)
         * (Ex: tegra194). Any hardware access on such platforms result
         * in system hang.
         */
-       ret = dw_pcie_ep_init_complete(ep);
+       ret = dw_pcie_ep_init_registers(ep);
        if (ret)
                goto err_free_epc_mem;
 
index 351d2fe3ea4d0276ee5a5f8b595facde9d47af07..f8e5431a207bd5aa01c9c6c98666f4d0fbf16b6c 100644 (file)
@@ -669,7 +669,7 @@ static inline void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus,
 #ifdef CONFIG_PCIE_DW_EP
 void dw_pcie_ep_linkup(struct dw_pcie_ep *ep);
 int dw_pcie_ep_init(struct dw_pcie_ep *ep);
-int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep);
+int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep);
 void dw_pcie_ep_init_notify(struct dw_pcie_ep *ep);
 void dw_pcie_ep_deinit(struct dw_pcie_ep *ep);
 void dw_pcie_ep_cleanup(struct dw_pcie_ep *ep);
@@ -693,7 +693,7 @@ static inline int dw_pcie_ep_init(struct dw_pcie_ep *ep)
        return 0;
 }
 
-static inline int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep)
+static inline int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep)
 {
        return 0;
 }
index 59b1c01102884ded4910eb1d0a20b14591531e4e..3697b4a944ccfad8d6bffd5918037b19bbe598a8 100644 (file)
@@ -463,7 +463,7 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
              PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA;
        writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK);
 
-       ret = dw_pcie_ep_init_complete(&pcie_ep->pci.ep);
+       ret = dw_pcie_ep_init_registers(&pcie_ep->pci.ep);
        if (ret) {
                dev_err(dev, "Failed to complete initialization: %d\n", ret);
                goto err_disable_resources;
index 26ea2f8313eb22e505d6612b3da5adf96b22ca97..db043f579fbe4f0ea2ee3c7d9542b1940f9c0ed5 100644 (file)
@@ -1897,7 +1897,7 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
        val = (upper_32_bits(ep->msi_mem_phys) & MSIX_ADDR_MATCH_HIGH_OFF_MASK);
        dw_pcie_writel_dbi(pci, MSIX_ADDR_MATCH_HIGH_OFF, val);
 
-       ret = dw_pcie_ep_init_complete(ep);
+       ret = dw_pcie_ep_init_registers(ep);
        if (ret) {
                dev_err(dev, "Failed to complete initialization: %d\n", ret);
                goto fail_init_complete;