Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2036938lqp; Tue, 16 Apr 2024 05:54:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVChde9/muPGTWGN4mK03RN5twJqgE+6xRnpjf3NUQTqP1n7mZz3TaP73MNw43MjT19uYg1xXO7yvF7N49UJde8Brz1oASnLG2cFA+N0A== X-Google-Smtp-Source: AGHT+IHRK3xxv7kUptF1F1khKwWwo6ewBRLkXJcWg3BM6RdpegsdQ+MksaanxohU6Wz7ODoNSM6j X-Received: by 2002:a05:6a21:998f:b0:1a7:75ee:6742 with SMTP id ve15-20020a056a21998f00b001a775ee6742mr14429039pzb.2.1713272058451; Tue, 16 Apr 2024 05:54:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713272058; cv=pass; d=google.com; s=arc-20160816; b=dl5dlwwO/nmq1X97K0/LQuvd1xmG49Jg2f9AxgZCKExq9HSuoTQBMB04ryHQ5w88ed wjDZmxQ4CLgEZZhM0uBjdOPecIwtS8OWFipYW2cEW5Vm079xfgPv4hio+MszF6dJD1jj iU/h3EGuNie4VYPHAMg/yhyXWosuCWN7JZwiAa8OkFov5Bt4t2k4GeVjOlL4A6VHu3E6 F1PevAvfyG/uFrvxOB70RdVWgSx8HEGUdeXif/bZxx7EB0PEDj8H6BMzWMLkuiiNjCQD clliTcsuvkN99pGD4V5x3lxnRch560JFgQdeNC3Z85XMjhiM6M3z9xSVfIQ5xv0n+nrm 6omA== 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=Hw3jxUBFhu/KlEI+Ltv83Drt/dGgFaXZtN+apO8lfUc=; fh=GkNdvG04Lunqqv1Jt68/BI66vXiv28hSSvpkD3jAO7w=; b=KIfyD+jW0fQAWXJLyAMXHtdmzkHfnC647ead8D2FrunpBgSE9UjNC3aIl0WT1vXY6a VzpWAXTsGU76iE7ntmfYAbjwA30ac0r6PYXdqXMcip415JXOVIEM+ILGJhPn52PBtqYk p0FjQnfNcShnNkMfc4+caJsP73kgDM2d7rFfpsEknxDbCc+h4YBghi2OVjD30Da5Khso j5GPwoek0VTqBomfBQKkrPtX6CJvU1EFQDuRBjGrHS4GyUB2uWqNtYRuZf2EYpHFcxJq Tz1eDqIfTkrIHBCceGDg865y93Xj/VKIgOVUY7ADERllflzg5ezblS6TSrx4RBrCJz2l aj5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="A1/F4t/v"; 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-146828-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146828-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 r10-20020a170903410a00b001e48565b415si9637686pld.373.2024.04.16.05.54.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 05:54:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146828-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="A1/F4t/v"; 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-146828-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146828-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 A0D01284A98 for ; Tue, 16 Apr 2024 12:54:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0761012D743; Tue, 16 Apr 2024 12:53:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="A1/F4t/v" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 A525512CD91 for ; Tue, 16 Apr 2024 12:53:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271995; cv=none; b=BQ99Qfox3LFVOhbx07A/BeVtSDQV6u6MMS6DDHGj5cx4L6nGa84OJLg7NpmeDgg3LfLBt22VMmlm5yWKjTv+vCAM/F/KAHD9DOXv2/V8RiiHOjljX4+SO5GOvC/jHlTy0+edwuuyw+e+SOod7NQ4VXpp+LKv7IQSNcYju7ak07E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271995; c=relaxed/simple; bh=f8C3Okw/s+xXWVTB5tLnmefazjTi4G3oMjAuSheWM1U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mlaNftUmfJ4BoZ1DmZKc/S9RX+6CqjxuW3WPvMYyHpiLc2Zj2TEjlU1CY0ZEnRLGxZa8GE7rAuqAiKxmmwoHU/qYZb0s/eXF1vNJgsOK/OC4EyKjIzJ3B6PGTJVRr0+CgxUSjxJycyq11r3c+Oj2VjarkOvQDELqyilTTq8MEC4= 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=A1/F4t/v; arc=none smtp.client-ip=217.70.183.200 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 5C59C2000B; Tue, 16 Apr 2024 12:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713271992; 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=Hw3jxUBFhu/KlEI+Ltv83Drt/dGgFaXZtN+apO8lfUc=; b=A1/F4t/v+kIbUoQdQJLmH3nvceEu5KWt9WdIGP2GzFrh+IyaqG+jBU6tA7T8bsoD+AHdUX oZUIUi5ggWNXCzhA6/tMjFcdru55BfK/+HgB1X/9WVykhP9umurMGF4T18TJNxcHrJLr/t JtM2AryoV+qEzjgRoHXbD5sYzZNVIHGwfamE2z366wNF1y+UZWYUFeem4UZrozzPz0RTlz aMfgmjnZhJYfFgxY1qUxVkfRG6S/xWRv4z4fMwPLqFlmYcUOnn22gZB4ncQRnRdnr1IUt1 t/RZuRK8X7xBI/jVZLjFeoYIsJyphsCKwsxF30hkBj0vR6hXsnOAY9h1/NG8LQ== From: Thomas Richard Date: Tue, 16 Apr 2024 14:52:35 +0200 Subject: [PATCH 6/8] 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: <20240412-j7200-phy-s2r-v1-6-f15815833974@bootlin.com> References: <20240412-j7200-phy-s2r-v1-0-f15815833974@bootlin.com> In-Reply-To: <20240412-j7200-phy-s2r-v1-0-f15815833974@bootlin.com> To: Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel Cc: linux-phy@lists.infradead.org, linux-kernel@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 7b3a409da185..0636d5d04817 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -360,6 +360,7 @@ struct cdns_torrent_phy { enum cdns_torrent_ref_clk ref_clk1_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; @@ -2808,7 +2809,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; @@ -2855,9 +2855,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; @@ -2937,7 +2937,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); @@ -3023,7 +3023,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