Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5816910rdb; Wed, 13 Dec 2023 23:31:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRe4rIsWFnvYqDj7sNwOMrVt/X03PVJ6h2dvOXdHfWZ3R0KJPJS2u9QV/KHP/vX+JwdzYy X-Received: by 2002:a05:6830:1d86:b0:6d9:d876:fe42 with SMTP id y6-20020a0568301d8600b006d9d876fe42mr9416665oti.57.1702539079648; Wed, 13 Dec 2023 23:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702539079; cv=none; d=google.com; s=arc-20160816; b=BRu7B+8WW0MxR1V4C5hmg0M/Ne51trBVBRpT+Taqc0+2W5XZurCVhIH4pfEZ1yYMWq zfOb1vkRC+wqUH0fa9FZcVPbcJ5j8T0krPisA5pUyAzd+h3izaWYFXafOVZXgEUc4w1u wt3ruuKVBfks8vi1lYb+74XPkQ1XN82G+wpd+9C1Y5zmzFVs2qY7b+/FOcOpC4QB6Vf9 BfX7Piq7P5qmV4BDicRrabrL6WfoTSSlGbyQ279r2EW3zXABVNd8UJ5VBEuWdbHlainJ sAiZOhjIeVv92ijhFp/GMG0SAsbEzhL8bNQT2IEQMFms5+cKXHCP5CybTzRPFCRk4gUe 6w7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jQZq/YQDnR3Pr/RcapRDcBqrLga+xw4R46ixTtMt38U=; fh=ld3UXb1S5Y4IkunPfuj6e9Ppmc+fy6ncC+eQtrVLfK8=; b=XCyLujAVSrmHTJSvgOp2Yf+XI2WjnAFb6iZUsafEEX30p4800LF1DAwfzKx6c1GEaw fO0ADMC1I+gVlLPIe4aHdFBura1d34K1c1tdLwJj9rwKzxXylusYmezLTccHRIplh50q E6kpUagx5LLJOHY0tRaptw1PFNBmR4Uv4FtMxe3RGoTyiwBfOaDEhVDM3YgEKpZXboz2 7McF6aqU+pZoBQq4PYGJtO/CXhZIgTy+CFpNYd3KUxh/FPN2pOykITgF96YBzeR0XLlO 7bvej5/ViGDNHgrszztRMOj4VIGPqRA5jI345uQ7myeSlJ25nsPlD8jXHSiwqDhAgHoK 6Emw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id e1-20020a656881000000b005c278464e08si10687917pgt.275.2023.12.13.23.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:31:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7314C8077A79; Wed, 13 Dec 2023 23:30:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443359AbjLNH3h (ORCPT + 99 others); Thu, 14 Dec 2023 02:29:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443399AbjLNH3X (ORCPT ); Thu, 14 Dec 2023 02:29:23 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4385A1BE; Wed, 13 Dec 2023 23:29:16 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id ED63124E30C; Thu, 14 Dec 2023 15:29:14 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 14 Dec 2023 15:29:14 +0800 Received: from ubuntu.localdomain (113.72.145.168) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 14 Dec 2023 15:29:11 +0800 From: Minda Chen To: Conor Dooley , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , "Daire McNamara" , Emil Renner Berthing , Krzysztof Kozlowski CC: , , , , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v13 07/21] PCI: microchip: Rename two setup functions Date: Thu, 14 Dec 2023 15:28:25 +0800 Message-ID: <20231214072839.2367-8-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231214072839.2367-1-minda.chen@starfivetech.com> References: <20231214072839.2367-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.145.168] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 23:30:11 -0800 (PST) Rename two setup functions to plda prefix. Prepare to re-use these two setup function. For two setup functions names are similar, rename mc_pcie_setup_windows() to plda_pcie_setup_iomems(). Signed-off-by: Minda Chen Reviewed-by: Conor Dooley --- .../pci/controller/plda/pcie-microchip-host.c | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c index 261147a0a446..4877d130ee4c 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -838,9 +838,9 @@ static int mc_pcie_init_irq_domains(struct plda_pcie_rp *port) return mc_allocate_msi_domains(port); } -static void mc_pcie_setup_window(void __iomem *bridge_base_addr, u32 index, - phys_addr_t axi_addr, phys_addr_t pci_addr, - size_t size) +static void plda_pcie_setup_window(void __iomem *bridge_base_addr, u32 index, + phys_addr_t axi_addr, phys_addr_t pci_addr, + size_t size) { u32 atr_sz = ilog2(size) - 1; u32 val; @@ -876,8 +876,8 @@ static void mc_pcie_setup_window(void __iomem *bridge_base_addr, u32 index, writel(0, bridge_base_addr + ATR0_PCIE_WIN0_SRC_ADDR); } -static int mc_pcie_setup_windows(struct platform_device *pdev, - struct plda_pcie_rp *port) +static int plda_pcie_setup_iomems(struct platform_device *pdev, + struct plda_pcie_rp *port) { void __iomem *bridge_base_addr = port->bridge_addr; struct pci_host_bridge *bridge = platform_get_drvdata(pdev); @@ -888,9 +888,9 @@ static int mc_pcie_setup_windows(struct platform_device *pdev, resource_list_for_each_entry(entry, &bridge->windows) { if (resource_type(entry->res) == IORESOURCE_MEM) { pci_addr = entry->res->start - entry->offset; - mc_pcie_setup_window(bridge_base_addr, index, - entry->res->start, pci_addr, - resource_size(entry->res)); + plda_pcie_setup_window(bridge_base_addr, index, + entry->res->start, pci_addr, + resource_size(entry->res)); index++; } } @@ -1023,15 +1023,15 @@ static int mc_platform_init(struct pci_config_window *cfg) int ret; /* Configure address translation table 0 for PCIe config space */ - mc_pcie_setup_window(bridge_base_addr, 0, cfg->res.start, - cfg->res.start, - resource_size(&cfg->res)); + plda_pcie_setup_window(bridge_base_addr, 0, cfg->res.start, + cfg->res.start, + resource_size(&cfg->res)); /* Need some fixups in config space */ mc_pcie_enable_msi(port, cfg->win); /* Configure non-config space outbound ranges */ - ret = mc_pcie_setup_windows(pdev, &port->plda); + ret = plda_pcie_setup_iomems(pdev, &port->plda); if (ret) return ret; -- 2.17.1