Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1920177lqg; Mon, 4 Mar 2024 07:41:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU18VJsnmDRumGWTbdVu2C2LQnPSo0k5Ja4qyKorjDDkJNZ8osh+Nvb+l0S6HnJ+hxB5SHfiLl+K0yS84faU+kZ2pIib+bVTPQfT7QNKA== X-Google-Smtp-Source: AGHT+IF/uxhVUgyYrzmF1xsbo8U+E5VMDfvP7zEEcEH0LJriB5QAMMD7v8xiMWWPQ4GmFa18cmJ6 X-Received: by 2002:a50:cc06:0:b0:567:504e:e7b0 with SMTP id m6-20020a50cc06000000b00567504ee7b0mr2047732edi.3.1709566871447; Mon, 04 Mar 2024 07:41:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709566871; cv=pass; d=google.com; s=arc-20160816; b=gKYJjQ5d8X4BqB6QdHx/XdYS89huHocIJ8Dz3072AvccMMRpR3rNMX3bcsVfAzVo+M 646mfSswXW2aRSZ+NiwDc2jRvGjZ1R8REWKb5FzML7XhHRD4TQLfhqqeKxWUoN8ET+UA 8um9yWdrfMUpAExCOgHNARrUGVhCwMVRKeSbNCz9RkQW1FPqaVa80up0lZRumwhcWC8z 0qRdcI1OFZualStlWJWpts2QQt/YVOD0u8T1WQRaTIY3L+SSBmHRQA84I/Fe+5Yg01B8 lQ8dSIkGzneHzui35QLYMHEwfZTJtgKaNxO2OMyDZe37Ht9qaeMPmSdRRxEvcBpgueiX U4tQ== 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=y+hiKLN8/2fVVMMZXP4L41OHcU7ks/UCHNFnX3+9Yuc=; fh=16AwIsfnaBgs0S7h9TVOhyQqQjjaKNV4ZtY0tk57H5k=; b=BK+qklOd6CQNO+phLJva+pNt/IjoSHix6nh8uZNNotJJuRXE1LPzClS/azJH+yPWS4 DmLrfXO9PTLjVt5fnxpgZbW2K3NcT4O+TvxeWGx6sqedpkJlBmSSeBdFoAIsrG/liJPm IwlTQVLLN96DPjoSgDk3gUwgt8lRhSVif6RftwYOf26I/ft+5iBNRNtvZnTQgnVny0n3 ARmODqYxErZoQZiJ8CWwhTeKfqeH1pH7qlRyALzWR9f242k72/TXBFTGyZjk8ZQiEcNC SkCYzAmOTHSc2lDOPmDvztrAPNc0xZGT7scXJyrrJuV4SfmmN2AY4dQgmPOC+JKUbhfb PLoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ASbWpFj+; 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-90854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s12-20020a056402520c00b0056382b02f44si4252645edd.37.2024.03.04.07.41.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 07:41:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ASbWpFj+; 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-90854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90854-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3154D1F21D74 for ; Mon, 4 Mar 2024 15:41:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCE9459153; Mon, 4 Mar 2024 15:36:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ASbWpFj+" 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 8969057880; Mon, 4 Mar 2024 15:36: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=1709566601; cv=none; b=IfEmYEDSzUuq+biEGZL4NHM65YzU57XH3p41RhO6GJPdi7JWnJ//0gi2UwIvxS/b0t40orPT7Sp4BLPptfp8JYXCoME2czwjKqX+eLURcFhl++K7bDFUYugrFAl8l1sPAFs0WKWIjZkEe9n5b9XMUkPZSkyyAVKgq8oZIeFvbsk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709566601; c=relaxed/simple; bh=IGmleIBWOi9EUoe685aNDMmUQj5xf6Jx9AU6KShFt1k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W+i0BVRKLE5f72AKdYIcBGw4HueReRh+I1A63iumP9yHm+JUDNReQvIBo8qJwKxuwJF9NR5elWufwJzc29GsAetxtSbRzrQSZyB2dTvrHKQMSWHZ3WhZlWbIN9N6sufN6wzduVGb21GfK084NwZOv1hTJSI45hyzExDOavZkG5Q= 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=ASbWpFj+; 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 702B01BF203; Mon, 4 Mar 2024 15:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709566597; 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=y+hiKLN8/2fVVMMZXP4L41OHcU7ks/UCHNFnX3+9Yuc=; b=ASbWpFj+u2PW8ZQrhB+nBN1B8wyRqLNMxhD64t4BpJTyFlLS3M3TyzwlKpkLsFg9W5nLD8 61uCJVaS7gSm+rimhenARcbtUFUKzJJBsmmWCW7XMK2+3TilRUIn5mztsjAbpsgatVM8uP ZzLyTkUbf96rYbdmtwSLwly0GzhnF71YMJTNuMtQoPQS76b2F4gnaRBM7B6qnboiuQxs/h L5ZNvZ37EVviF9A47oec5lvONX+5YNq4wfmQ84Uw/JLLAwUz+MjGuawIacL5Nvl/4s1htr HORDqb0080Xr7pYKoH/L+eVwh8xLaPcask2iNeCUTDQ9CaaTWGYtnbsKIMo1+g== From: Thomas Richard Date: Mon, 04 Mar 2024 16:35:58 +0100 Subject: [PATCH v4 15/18] 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-v4-15-6f1f53390c85@bootlin.com> References: <20240102-j7200-pcie-s2r-v4-0-6f1f53390c85@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v4-0-6f1f53390c85@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard , Siddharth Vadapalli 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 9ca2ffca0bf9..a2e04261237d 100644 --- a/drivers/pci/controller/cadence/pcie-cadence.h +++ b/drivers/pci/controller/cadence/pcie-cadence.h @@ -516,6 +516,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); @@ -525,6 +526,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