Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp628598rdb; Mon, 15 Jan 2024 08:19:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2EUR+BhfGpGt1bCS4uEfeG5zO+CzBwDCatyQi2Z9IQmr/d6v53eINr7pTwQBqU1z6iS6n X-Received: by 2002:a92:c24c:0:b0:360:6e4e:e834 with SMTP id k12-20020a92c24c000000b003606e4ee834mr8915533ilo.89.1705335543534; Mon, 15 Jan 2024 08:19:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705335543; cv=none; d=google.com; s=arc-20160816; b=LVahAI90vBLO7xgf/GrwlZszCt36dgfD81X9qdEb4gUNAvb+s3ym3mAID80yYGPWvz 5MaD2xwA+zSuCjJ6NjyO85I29gYpoohWI83a1okkC1j6/NpuCb0Zp8VGnxVlJIcbNUiL 6W7vEauTSjxexwqj0LNYqPCXQuJewzZmQwwPU2riHoySqgs55g1K4Z2RwAHJ4iy7td+w rQajZzi2qmyOIxXgjKzC/To340R+nO92WWiTXCVaNIbp0QXLd1BS9OKlwWDjeR01KiZf 72U4/tOTlP23p2boSeHhuuYnodPm7HaybqRJBmExtUR7JAraj0bF9unTLhY8Yk6l/jcW xjlw== ARC-Message-Signature: i=1; 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=aJphqhRe7sCCUllJmYP7giuhDMzxfp8od1YO/mqFDeI=; fh=ihwxVJW8DyodhmdJo1IfhLUDNDWeXh+49SpWXYbpL2Y=; b=h5Ay0t3i4oVJPXFXLnrSqAGK7jMvgwihlta1IDoVGvTTs2vA9AwXz9GYiv0Dkqh6lW fEzObSNuDctXqAQbRBQTRJP4ZxOqKb3QTVy4ryMCkBTgyAUVJ0X7Xh9ScwA96aZl0hNF kXeV1IqI96AhvZQqAiCMSHx4fFtrAT2hgwIcQD2Xcp5eVBsd3PtgDznlWGdzDT7hp/fb tPmgWdqQH+NY8zm/LJMTZ6PCiZHXkU1rFfAkT6AMGQY7rYPeKAT0uW6T6MMGiVx62Hcb KXGCqUBiw+dIJVKkpgYgjJxydqwo4YV44EgMz4ZAqEC80JkX8XhSNQNAXlv22rPJKJG6 g5Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LzfGo0f1; spf=pass (google.com: domain of linux-kernel+bounces-26242-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26242-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cl1-20020a056a02098100b005ce018f427csi9915476pgb.235.2024.01.15.08.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:19:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26242-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LzfGo0f1; spf=pass (google.com: domain of linux-kernel+bounces-26242-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26242-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 219D1282DD8 for ; Mon, 15 Jan 2024 16:19:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3CC319448; Mon, 15 Jan 2024 16:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="LzfGo0f1" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 974B4182A7; Mon, 15 Jan 2024 16:16:27 +0000 (UTC) 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 BE59BC000E; Mon, 15 Jan 2024 16:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1705335385; 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=aJphqhRe7sCCUllJmYP7giuhDMzxfp8od1YO/mqFDeI=; b=LzfGo0f1XBKbdnRbpJLHnWitIVtExxNPOBaV1ff3LkRjE2TzsQ48ipDbFQnIgVTCJsO9Ao lsfbWg30X2WpUT90y0L7230VJ7vsRawFw0ki+4ZYhpn4gkhMMG1eRpvN1Ksw3qz+zqMUo5 h8aNbW83LKhsFoIpmNIkMBP68vy9avMwwhU+Jemn/12ruKeoW3exVeRPMSTXf7GXFjDjVc pLgaq2fCqPqZ6BO8uVjcNQ9U7Dv5S7BK51oPx9kiEMlPoPu6LxGZFJscq8jU27CusWEYpk PfJDaIqQbsPQtwmwqidHFCPiL5sQjk7ZRMZzw7cxg6rgYajeIE7eFx8nh9IXHw== From: Thomas Richard Date: Mon, 15 Jan 2024 17:14:50 +0100 Subject: [PATCH 09/14] phy: cadence-torrent: move 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-v1-9-84e55da52400@bootlin.com> References: <20240102-j7200-pcie-s2r-v1-0-84e55da52400@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v1-0-84e55da52400@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 Move 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