Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp730086rdg; Wed, 11 Oct 2023 04:06:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUUMrlw+1fj2oroSu7OrEFN5VvKEk9OfLlj4eeStrdn+ZR+Ph8Zt0oRdhwhJt4fFbgZdIv X-Received: by 2002:a17:90b:4b4d:b0:278:fb87:43e3 with SMTP id mi13-20020a17090b4b4d00b00278fb8743e3mr20099720pjb.12.1697022405153; Wed, 11 Oct 2023 04:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697022405; cv=none; d=google.com; s=arc-20160816; b=p3n3aIKsRM/q5wnUtpm5UiGsPHGtAyWdeZ42mNL82JUi1Y+QA7Pmsh1quIJJH4TM6r EQ8oyUe/Rcmf/tdfI3QvKPX7gTE6GCqMIka1QJ7rDvwXFtjaRy/rZ5BU5IwBksgOBRqW QZNm4yc1nalmcWkSMPcnNcv/nlTQ+TLauxkKXp85b+MRtge9cnfLhWCwTYHMRb/GT1or xwqQyzvVYVhu5eDPjcGSeOkIJ9A7Qt7VsfkBRoL/PZRIeCI9wL6FH+esSjW2XdvMsowR /ugNGIqkqZDiYnaUGuhZetdtPWjZERvUaJv9r6vFxP2hcTUSTNOFzXpKcKrUU/s19Jqg 6WHw== 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=rClcf2zTaX3cL0QWAhEBSUnioxkZldVNAyuij+4OV1I=; fh=ld3UXb1S5Y4IkunPfuj6e9Ppmc+fy6ncC+eQtrVLfK8=; b=Ul5RORISKxIGuGPRiykyPwWwk2KkNLcqepvv6sYRinIk5M8OFUUJNNxyHUKAli2Bs1 wwmL67UOIwfQgeakYpaV1MnhUKyVC1E5M2nWBiULTUn1JUBAWP6qklN7DStaaIajQlUq 3OnGReDae89ZoVcqbiNB2FgEW6PbWB2qet+zBZPS74QBjNUlVH9eXXiUQRpxmeaVvsSJ YSR8yt2YZ0RlsxxKMT1I+XQzsbHNP/XOHiY+CKDssSfnHZuWtbEf2XA2dOVOmocfuuN4 SU6aNuXzJcoxqWvBu8mk9SkrdNljfIWlgZ8h+2quFiJV9ihhgQR2v7mwZBoLBc4N85xU k1Vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id mg9-20020a17090b370900b00278f79e4fabsi1140227pjb.93.2023.10.11.04.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 04:06:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 0575F810D661; Wed, 11 Oct 2023 04:06:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346717AbjJKLF5 (ORCPT + 99 others); Wed, 11 Oct 2023 07:05:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234802AbjJKLF2 (ORCPT ); Wed, 11 Oct 2023 07:05:28 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CC7EB9; Wed, 11 Oct 2023 04:05:26 -0700 (PDT) Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ex01.ufhost.com (Postfix) with ESMTP id 8F70424E370; Wed, 11 Oct 2023 19:05:23 +0800 (CST) 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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 79E3924DEED; Wed, 11 Oct 2023 19:05:23 +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; Wed, 11 Oct 2023 19:05:23 +0800 Received: from ubuntu.localdomain (183.27.96.95) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 11 Oct 2023 19:05:22 +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 v8 08/22] PCI: microchip: Change the argument of plda_pcie_setup_iomems() Date: Wed, 11 Oct 2023 19:05:00 +0800 Message-ID: <20231011110514.107528-9-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231011110514.107528-1-minda.chen@starfivetech.com> References: <20231011110514.107528-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.96.95] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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, 11 Oct 2023 04:06:41 -0700 (PDT) X-Spam-Level: ** If other vendor do not select PCI_HOST_COMMON, The driver data is not struct pci_host_bridge. So move calling platform_get_drvdata() to mc_platform_init(). Signed-off-by: Minda Chen Reviewed-by: Conor Dooley --- drivers/pci/controller/plda/pcie-microchip-host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c index 4877d130ee4c..31ca8d44ee2a 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -876,11 +876,10 @@ static void plda_pcie_setup_window(void __iomem *bridge_base_addr, u32 index, writel(0, bridge_base_addr + ATR0_PCIE_WIN0_SRC_ADDR); } -static int plda_pcie_setup_iomems(struct platform_device *pdev, +static int plda_pcie_setup_iomems(struct pci_host_bridge *bridge, struct plda_pcie_rp *port) { void __iomem *bridge_base_addr = port->bridge_addr; - struct pci_host_bridge *bridge = platform_get_drvdata(pdev); struct resource_entry *entry; u64 pci_addr; u32 index = 1; @@ -1018,6 +1017,7 @@ static int mc_platform_init(struct pci_config_window *cfg) { struct device *dev = cfg->parent; struct platform_device *pdev = to_platform_device(dev); + struct pci_host_bridge *bridge = platform_get_drvdata(pdev); void __iomem *bridge_base_addr = port->axi_base_addr + MC_PCIE_BRIDGE_ADDR; int ret; @@ -1031,7 +1031,7 @@ static int mc_platform_init(struct pci_config_window *cfg) mc_pcie_enable_msi(port, cfg->win); /* Configure non-config space outbound ranges */ - ret = plda_pcie_setup_iomems(pdev, &port->plda); + ret = plda_pcie_setup_iomems(bridge, &port->plda); if (ret) return ret; -- 2.17.1