[v3,11/18] phy: cadence-torrent: register resets even if the phy is already configured
Message ID | 20240102-j7200-pcie-s2r-v3-11-5c2e4a3fac1f@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67159-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp472385dyb; Thu, 15 Feb 2024 07:22:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWWICKiu5cPLl35XNu6hozyjtgyxdE9ZDoahX9PBHCBwuAqbIpKASlD9TPi+jE1NjdVm083fVzAabiZAun8A4c0QQZHgw== X-Google-Smtp-Source: AGHT+IGokhiUTjVtxCd7RkAz+xAYiBY4a66y8krpzZRVkPzIW6HVlQwxtirD3gcAVQhMweyk7wVh X-Received: by 2002:a05:6358:7595:b0:17a:b892:e3c2 with SMTP id x21-20020a056358759500b0017ab892e3c2mr2745645rwf.2.1708010535567; Thu, 15 Feb 2024 07:22:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708010535; cv=pass; d=google.com; s=arc-20160816; b=Mw4gWx88yB+6ckx/ULOyTMue5cZv+TgFT19LqQku9C5kGD62QXgx40uhhJwo5FMR8b UvJypa1Y/7lG4YFmUbKSUTSLs0JCNLkwqT8v4g5Ng88Theubldc5pAxxt/TETWbVLGx4 ZuSSnfYrrR8LviXufknKU5fp+Jfh8DZXk76P6bRtR02c7/B4o4NAmxthhWpUqGBaGXgg BplXDuqoSimKoIm6sHW2LnRDUF8GDPUUzKLHgGJ0B5XzyXvKVQCp1RYS29aVl4qJgK4i CQnWf68VarU0uk+4r8P68ni87pPcppSvRA3ALNRp15SePCK6PbQu6SW/zEsmXhRdpkA8 bFjQ== 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=ZY4zwQDv37yWJBGtlc4HVZQiyWGnejxAqR+BxRsb2To=; fh=wHZQkXie84v2FP+2z7dUEuyvptHwnAyqgx34WxJkhrY=; b=YwWTLqfvUoDNVTm8G10FRFRSexkTbsf0bGLbBe+eWmUADh+Xx+iqzxDJIIduTkF2Px RQ6u8B1XtvMlwukMoPNyXdnvXbFdIsG3kHbflvS0V/fuLVqTZSj+CsXBODajN0FuAA8p GUq9dLmCxcKFsjJfVtJs9MuUFkyMG/mdzt10NspAhQX+wHMzOKRuiH/3vaMG55BpOHhp JXtz/fE3k0HdEtstL6N6QAFMZeweiifGrwV25Bz6eo1KPbzRBqK7pVe9640df91PCl3f fdW9BbUNgwgr9PYFbkh5uN3e1CjO2M3i54fUOnksL7nksqpPX/QHTqfxigh8yiCZ51iy 2tmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mMihYMdu; 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-67159-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67159-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q23-20020ac84517000000b0042dd7b524f2si329495qtn.39.2024.02.15.07.22.15 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:22:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67159-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mMihYMdu; 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-67159-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67159-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 599181C20C1F for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 15:22:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66B6D136678; Thu, 15 Feb 2024 15:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mMihYMdu" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 41BBF134CF3; Thu, 15 Feb 2024 15:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010295; cv=none; b=cGDdBfeBVdga0ym+GJyeodu8DXsFB1qpW+zpORzl9sDVHluFiGepQvdxx+BF+b4/k0hT3QuyEh8o0kX2wLukViwTjzWYw3lUej7jUS8dDviUh3uRphEalYIzffPStnc/hmCCF+LyZPNzWT8KTs2UpeGYRL81rDkOZzQ79Zy+vn4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010295; c=relaxed/simple; bh=58Rx/Fpi5lkN1ZhQHKIMYHT21sc+k4stqHUV7CqcV3I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UWtiWP88M9Iw7rq2lcHI9KbqsNXajHLY9j+j1FAZ9wFtIYnMU0mf6QLsbfVYpxbEc4qZGUpy+agioYbMltKVanp0xBddUSWwJUSyee7C+Weve9XB4SKKIYbooXOW5uqhqCou5AvaoAK/MdrzgwNPt4YvecBgC/9kvUf0OE2Zr34= 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=mMihYMdu; arc=none smtp.client-ip=217.70.183.193 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 A27E9240002; Thu, 15 Feb 2024 15:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708010291; 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=ZY4zwQDv37yWJBGtlc4HVZQiyWGnejxAqR+BxRsb2To=; b=mMihYMdu+xVGazYhvzrNJygS3F6vfTiAOpP4RpTyz32c1o8B3cQ5fZenBZXfPnzym+zTcN ZdXNIhWkJkFLRqQc0x4yi2dias50AwLN6FjMj31WkbL+ptbTqgf5utpG4QdpZn7yKvcd3U UnDx7pxNE58UaPoLK5k2LcTbuxgPoT26VDgXXVDMPYT3LSrukMxFpgEKshH0xQhk02BFRC rae/HNwQI/bodK+FwNUQ3jq8n6UCaTjqXypkupP/KDhWHQL2LqrhhBshxW1L+wTD2T2jSt LvwyG0kIL7rre5u0FFzE4j6/+x3Xu75Gwk1kMSOseS9MbGVPbHKnrdMxzihOuQ== From: Thomas Richard <thomas.richard@bootlin.com> Date: Thu, 15 Feb 2024 16:17:56 +0100 Subject: [PATCH v3 11/18] phy: cadence-torrent: register resets even if the phy is already configured Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240102-j7200-pcie-s2r-v3-11-5c2e4a3fac1f@bootlin.com> References: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Andy Shevchenko <andy@kernel.org>, Tony Lindgren <tony@atomide.com>, Haojian Zhuang <haojian.zhuang@linaro.org>, Vignesh R <vigneshr@ti.com>, Aaro Koskinen <aaro.koskinen@iki.fi>, Janusz Krzysztofik <jmkrzyszt@gmail.com>, Andi Shyti <andi.shyti@kernel.org>, Peter Rosin <peda@axentia.se>, Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com>, Rob Herring <robh@kernel.org>, Bjorn Helgaas <bhelgaas@google.com> 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 <thomas.richard@bootlin.com> X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790978855247163136 X-GMAIL-MSGID: 1790978855247163136 |
Series |
Add suspend to ram support for PCIe on J7200
|
|
Commit Message
Thomas Richard
Feb. 15, 2024, 3:17 p.m. UTC
Resets are needed during suspend and resume stages.
So they shall be registered during the probe even the phy is already
initialized.
The function cdns_torrent_reset is renamed cdns_torrent_of_get_reset() to
make it clear.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
drivers/phy/cadence/phy-cadence-torrent.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index 803a76acf2fd..bba10ca0bfdd 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -2660,7 +2660,7 @@ static int cdns_torrent_clk_register(struct cdns_torrent_phy *cdns_phy) return 0; } -static int cdns_torrent_reset(struct cdns_torrent_phy *cdns_phy) +static int cdns_torrent_of_get_reset(struct cdns_torrent_phy *cdns_phy) { struct device *dev = cdns_phy->dev; @@ -2779,6 +2779,10 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) if (ret) return ret; + ret = cdns_torrent_of_get_reset(cdns_phy); + if (ret) + goto clk_cleanup; + ret = cdns_torrent_of_get_clk(cdns_phy); if (ret) goto clk_cleanup; @@ -2786,10 +2790,6 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) regmap_field_read(cdns_phy->phy_pma_cmn_ctrl_1, &already_configured); if (!already_configured) { - ret = cdns_torrent_reset(cdns_phy); - if (ret) - goto clk_cleanup; - ret = cdns_torrent_clk(cdns_phy); if (ret) goto clk_cleanup;