Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3207844lqo; Wed, 15 May 2024 03:04:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWi/VsxoJ8D6KQ7nQGGpIYZJIGp/9mpIBIdqapA8hIwO38uV+aioP3jQi5uDB2RKmw8BpyhjmQhH8yBSzR03b1b0HXOwA3cd+Jw8MTdxg== X-Google-Smtp-Source: AGHT+IEFNsRgARJo7ZHHZ2B97KFcR14lmIMsoji6GiLtkTiwx9M2GbamThDAM+SE9BVrUdMqqfae X-Received: by 2002:a05:6a00:10c4:b0:6f4:714d:fb43 with SMTP id d2e1a72fcca58-6f4e0391160mr15121807b3a.29.1715767480649; Wed, 15 May 2024 03:04:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715767480; cv=pass; d=google.com; s=arc-20160816; b=eAAR90YaRHILiI5xAOz5GsXhJ+Lxq0nHEeT/ehoFHQyUkIaypHTdxCdF4efL7ZNdEu 5553WbQi0in7qVFaPOSfRLk5MwPDhAhE+zGlLO/I10m65zQNIaGD918xYS7j+ENnWeSj ZkV9k/I1aYivG4yzPWTSorbq53GPH2XKfhGZv2qM5mcnYhz/Knb9UZwR/GjHQQ4YT1qw qqNcKtBULuPwAg0gk9tTDARbLnJ7+WnFyCiLvfcEZJrt4guCYH97Twi9BLTwoQYUAGFw tHw/9ulfVTFHdAy6IhywKHGcj8lKpn+wVsA7BzGntkdoNeslnPGL61Bqt16I8mQod05U d1pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=EQ53IDpfy/dBPYCwYJ4Ymr6E23RYTC0CIbeHa3tWtTg=; fh=+6o6d2KGt2ZTSidIuE8uz1q8yt3pK0TjTqozrmclSIs=; b=azOFwcaX/tASL7DG1H2TR8bpCdjgNSXA1uRGEkDXIk5wZkL1tgr700+jB1+p7TsO+C RVkWdRzyY+saHBB4sEnY1zZ1ZHR+Swj/yCOHR26rtAPWQn/mvlElwEmvElt8oFeSrpUp 7r8vmiIYlpS66PouXT2TaFHquV9RTfMFef07Gcx/pVNFxSq5GGxjektMlf5ZUhV7FbYi 4DrQ1rKc2+0/qnLZu/dcu6Yy3yEEcVBEmH3yhs+VDMCuUjo5M6J3eBeQGmLsYjikcqd8 yE3KZsdieONWJvlkPoOwYAKy4Jr26HLHSGBnuYNrhxMWlhHE6HMyEgPoVqEH8jUAS2OS n7jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aScPtvKM; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-179743-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6341180e345si12953993a12.560.2024.05.15.03.04.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 03:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179743-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aScPtvKM; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-179743-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4F31628617B for ; Wed, 15 May 2024 10:03:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6B955EE78; Wed, 15 May 2024 10:01:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="aScPtvKM" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 080F874C1B; Wed, 15 May 2024 10:01:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715767302; cv=none; b=aAW/6oF/eW6hSgXKmVNt1F3yz6ImSmM2HT1f9LazxVfSDKWG0SgrhMNMxgHIrjKLz6TgUBwQ6ln+L+dzeJ2A2KzA+KsuhXYtecC6eni9KuAlcNb0a1JNO/69eaCsepjGnVD8vbiI/SaBaeq9q20L40D8vzqeKOKaWXj91mkSYvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715767302; c=relaxed/simple; bh=apSBWBKkMJNnStRx/8dtwDw22jEGIZT4fi1c5kvCSMI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T02e8JP0cnMbp3S3QMJyjD0/FcGpakm1mdwF42xgGdowuwDOtdXtTdec45KdA2pI9pANDvn/Eme35EGUpvS+mRe+NMP8/ovq6SG//2bnTaB8ZmVHZ898eYCgpsbihEjG2+nKKWkYbQGAhqPWzVK5jMysV782hNC7QZEHtrIAldY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=aScPtvKM; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 9F66D1BF207; Wed, 15 May 2024 10:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715767297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQ53IDpfy/dBPYCwYJ4Ymr6E23RYTC0CIbeHa3tWtTg=; b=aScPtvKMZl7SFBlD31Pe5+2z7cEk21UKtdOaCkmVE4rJM58B5Bocd8z+vZGWm+IF8TudJQ n5q6L2mH6z4RQLDB7bNydrK7rKFJGznfR2gpuADiLlWwqTN6i6ToqNzmRcZKiIRRDHG89N i2NZ4xoKuNyfoUJWTFomyQdVLsKHbfgAJcds9+SR9NGPV4TjxomQi4pRMADYWfiuDd7gj3 GsZHTshEcxTFMyoaNLKn+PLfm+brMdj2lh3PecgheQY9swSxYg2hT6AIoa2aCxt433vt4p 7TpJ4Zy9RXNpihAZlrnKZ1UrCeZ711/YNZba0VLXzL37iMZrB8aySrGCIfdOXA== From: Thomas Richard Date: Wed, 15 May 2024 12:01:08 +0200 Subject: [PATCH v6 07/12] PCI: cadence: Set cdns_pcie_host_init() global Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240102-j7200-pcie-s2r-v6-7-4656ef6e6d66@bootlin.com> References: <20240102-j7200-pcie-s2r-v6-0-4656ef6e6d66@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v6-0-4656ef6e6d66@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Andi Shyti , Peter Rosin , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Siddharth Vadapalli Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com During the resume sequence of the host, cdns_pcie_host_init() needs to be called, so set it global. The dev function parameter is removed, as it isn't used. Reviewed-by: Siddharth Vadapalli Signed-off-by: Thomas Richard --- drivers/pci/controller/cadence/pcie-cadence-host.c | 5 ++--- drivers/pci/controller/cadence/pcie-cadence.h | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c index 93d9922730af..8af95e9da7ce 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-host.c +++ b/drivers/pci/controller/cadence/pcie-cadence-host.c @@ -485,8 +485,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc) return cdns_pcie_host_map_dma_ranges(rc); } -static int cdns_pcie_host_init(struct device *dev, - struct cdns_pcie_rc *rc) +int cdns_pcie_host_init(struct cdns_pcie_rc *rc) { int err; @@ -564,7 +563,7 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) for (bar = RP_BAR0; bar <= RP_NO_BAR; bar++) rc->avail_ib_bar[bar] = true; - ret = cdns_pcie_host_init(dev, rc); + ret = cdns_pcie_host_init(rc); if (ret) return ret; diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h index 1d37d5f9f811..bb215aeebf20 100644 --- a/drivers/pci/controller/cadence/pcie-cadence.h +++ b/drivers/pci/controller/cadence/pcie-cadence.h @@ -522,6 +522,7 @@ static inline bool cdns_pcie_link_up(struct cdns_pcie *pcie) #ifdef CONFIG_PCIE_CADENCE_HOST int cdns_pcie_host_link_setup(struct cdns_pcie_rc *rc); +int cdns_pcie_host_init(struct cdns_pcie_rc *rc); int cdns_pcie_host_setup(struct cdns_pcie_rc *rc); void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int devfn, int where); @@ -531,6 +532,11 @@ static inline int cdns_pcie_host_link_setup(struct cdns_pcie_rc *rc) return 0; } +static inline int cdns_pcie_host_init(struct cdns_pcie_rc *rc) +{ + return 0; +} + static inline int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) { return 0; -- 2.39.2