Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp644465rdb; Fri, 26 Jan 2024 06:41:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeWSu2gSOYUOVeoi1m59YGyChHARK5i9FGWS73vQ4iHxqP+5U24nPqRK1rfkNarGMKtIcB X-Received: by 2002:a17:90a:53a7:b0:290:6dfc:a7e5 with SMTP id y36-20020a17090a53a700b002906dfca7e5mr847724pjh.17.1706280070904; Fri, 26 Jan 2024 06:41:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706280070; cv=pass; d=google.com; s=arc-20160816; b=UTbxFlGDwojEZ22jDwmEJ4uuE8Si9411/m45R2ZajYMAB+khSHGOry8hBfWYqhIskI y+S6ufLCf5d9J+GNKLW3+5UQp0ZNh3hjMjUfx1tDBqB1ZZDBIhW2SsZOymPnb3qFuNq7 2kJV/rPM5JLcFfBRcWLQhAkFLBoxdS3E77OxhXBdfbKMOEnWSAFa2prU4cTXApSyi0Cx zl9W5sJPQqnND9B0NTrI9PODd3TNKiilXbdupCEU270fggQqGvmHRIV2SKbVmf7Ffxbm 1NPJlqHeYxvzZujWCycsGiBwW1FfAKNMBkCLna8IRuZKI0/ElXksHEtsUsXzZPvFxPvH mdhg== 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=gnJ23VCimbUGdQ0UqYdvjkkS5bTWXmYZASCtO+19bbI=; fh=ihwxVJW8DyodhmdJo1IfhLUDNDWeXh+49SpWXYbpL2Y=; b=xfr4XFREWYNYa1+kx7Pa2bu0KbbhBCpirXs3pF4oMaXnp1TrulXPYumJo2/uXst7NA FVXoBFanvBdYBXQVoY9XpWDQYZM2ytAzW8xsPecKROOlZVa6Mj08JUfPEKf4J3GZZbCI IcsS1xrHmTZgNDtksaC6tBEaTtD/NDIFgiMZtQXRu6KqqesMYRQguxro8qBn0tkX9B50 ylTICYLbYxI1EMdYpBfsWlayNyCFFZmhogFkY1UR2U8Qc3ZxAT0gsdCCKcGgUfkLESpj +L0gqHqAOsLIftTNLwmtqDqGit4FhlooPb4Dc0gKdptDDRILm2DQw7teZ0oMII049oaW uM4A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=omPugX1E; 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-40209-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40209-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 x4-20020a17090ad68400b002905aac028dsi3209285pju.185.2024.01.26.06.41.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 06:41:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40209-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=omPugX1E; 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-40209-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40209-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 92122281C0D for ; Fri, 26 Jan 2024 14:41:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70069208CA; Fri, 26 Jan 2024 14:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="omPugX1E" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 2E81120314; Fri, 26 Jan 2024 14:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706279884; cv=none; b=ZqfsG/kZwUmp7tQv9iHpW/CNTQjAVEmW07GEUdtInmYPqnz1aHg+hnn45Sc6dX5H2wuPqNa2pgEE4DBdxtwIzySnZY8EBHawteQkw0jNCPFEcqzrxAd9IUtnibIxKXjYPRhz0jp/d83TCX/6EK7+HSmspV3fXHtriZv7+R/5bkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706279884; c=relaxed/simple; bh=3tJNeBNRRDvogTja5FlQNmbvsqReFD6C67+HmzDNtOU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RaWbC9YuMSVR9EZJZUZ20sCMRmidaxjBpzq3m+AyGrep7PjTAx3KX3tcoKejs6cNAIsl8UuUMZJfUcTAS+ORyibt50pbhJG8sBQLHSE/aucBLQIFgXPT1iuqfKWHwnQlbEbNE9ESP1HtQ3cP2L5PlTvbf33fZxknfCiXArMCHgE= 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=omPugX1E; arc=none smtp.client-ip=217.70.183.194 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 E7AEC40004; Fri, 26 Jan 2024 14:37:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1706279880; 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=gnJ23VCimbUGdQ0UqYdvjkkS5bTWXmYZASCtO+19bbI=; b=omPugX1EMe7mTs0frLWKo/wGBfGDaIEA1TfN/MRwstsklYAuD2hzuPBLSVCryf18B7O0PQ 9CTOOCCXUKgSqTAwtXU1lsu6N6ygaxt/rvbHk7degfPkvAhqnJ2hgxvS/NWZzqL7AMHwiC 8WBu6OC47A5RWIrHfPDW0p2NRhj+u2sq6uG1zXjMeTIGemppG31cP/2JWmO2J+w+jHqgIL FD/8Ks3A/lcndaGoZYZ4JRraL2PmemIHjiyOUHlY5OpY8SMYCqJsqxyYaubPA6lm2LMxrd fH59Ccb7zP2PGQVqu66GA0kLH99zn+lnM7Bd+Ok1XprhoVCtyVddRCKAFatGYg== From: Thomas Richard Date: Fri, 26 Jan 2024 15:36:52 +0100 Subject: [PATCH v2 10/15] phy: cadence-torrent: add already_configured to struct cdns_torrent_phy 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-v2-10-8e4f7d228ec2@bootlin.com> References: <20240102-j7200-pcie-s2r-v2-0-8e4f7d228ec2@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v2-0-8e4f7d228ec2@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 , Tom Joseph , 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 X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com Add already_configured to struct cdns_torrent_phy, so it can be used at differents stages. Signed-off-by: Thomas Richard --- 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 100b58965558..a1e9d06453e6 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -358,6 +358,7 @@ struct cdns_torrent_phy { enum cdns_torrent_ref_clk ref_clk_rate; struct cdns_torrent_inst phys[MAX_NUM_LANES]; int nsubnodes; + int already_configured; const struct cdns_torrent_data *init_data; struct regmap *regmap_common_cdb; struct regmap *regmap_phy_pcs_common_cdb; @@ -2741,7 +2742,6 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) struct device_node *child; int ret, subnodes, node = 0, i; u32 total_num_lanes = 0; - int already_configured; u8 init_dp_regmap = 0; u32 phy_type; @@ -2788,9 +2788,9 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) if (ret) goto clk_cleanup; - regmap_field_read(cdns_phy->phy_pma_cmn_ctrl_1, &already_configured); + regmap_field_read(cdns_phy->phy_pma_cmn_ctrl_1, &cdns_phy->already_configured); - if (!already_configured) { + if (!cdns_phy->already_configured) { ret = cdns_torrent_clk(cdns_phy); if (ret) goto clk_cleanup; @@ -2870,7 +2870,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) of_property_read_u32(child, "cdns,ssc-mode", &cdns_phy->phys[node].ssc_mode); - if (!already_configured) + if (!cdns_phy->already_configured) gphy = devm_phy_create(dev, child, &cdns_torrent_phy_ops); else gphy = devm_phy_create(dev, child, &noop_ops); @@ -2956,7 +2956,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) goto put_lnk_rst; } - if (cdns_phy->nsubnodes > 1 && !already_configured) { + if (cdns_phy->nsubnodes > 1 && !cdns_phy->already_configured) { ret = cdns_torrent_phy_configure_multilink(cdns_phy); if (ret) goto put_lnk_rst; -- 2.39.2