Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1598119rbb; Mon, 26 Feb 2024 15:05:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEoGcmYoD8AKf0hLTl/vYDf5LmQHvfnppZXpTfqvYpu1t9xpqbm4EpdVcd1Uuj9Brrl/V8uy5ddxhkn+bzkyXN+648Vbx3JT2dZ237dA== X-Google-Smtp-Source: AGHT+IGRMZJwRV8vlTIjH4c7VaDCSaWAkpxxHjdlLc4xYeJENpWEeALmzLZ0nb0oDjODk+5hooqy X-Received: by 2002:a05:6a20:c90e:b0:19e:c777:5c61 with SMTP id gx14-20020a056a20c90e00b0019ec7775c61mr685864pzb.22.1708988746372; Mon, 26 Feb 2024 15:05:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708988746; cv=pass; d=google.com; s=arc-20160816; b=pe8xjoutUUf3dzzHN3rKeAoKwih1H2pacvCDn6oInwHYPUAQh69M3PtQ2aGDXSSsX+ jUYlB04cP2fxGWmxLfP2LSYI0D55j9I+FNoEdh4/cV7fmbNv+ZK3j4WW9nNqAbvGp+H2 w/DGOU0lLDdTraOSsMqYhNMCI3VHLBLhTOrRz6tPPnebcrWaay0d+J/8VEM4WXEsvX3l 05vUDcemp32CGUigt95PWPWPag4S+FUuV4EaA0hi712xXp8gYJf8RM17fyG0msVUufES 2khEB2Ek6UuqMJu5a82zKgi6Kz62fEwDaZxL7K2jcwlC3OnninC53GIEI7BGNjochuw4 CzVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pYmdkgX1dVrE40bWWH7YizC1+wHj2Ilzj2iousZ5MvQ=; fh=qMK+F1mF9rOPyppuctQHGAe0zTaPLFEw/pkUMNNnLGE=; b=niypjLaqrSPDDYfl2I7WVyAdIRxiBHao2uGWQ/xWfOSku0uRy2bzWSZFjP4Nmt5FyY PMzY8wMl8Udlh+Xo4VREfuN092j2FaR5dBnypIGUdwrEhMTZsdeb9khlKwFDBTgUAqUH N66aRRzbpT7YyF5QwW4sLzOJi9UmxYg8WMjKKt9biL6D+IamnuJV5Wd27k5xp5RAd2/f 6BrvauWReeP4kSCaucU2FRRT2yAoWrKWUYPhMPPF+UPrfcJihH7ehD+jy3j4xP1kNFUU c5Ap/Nxbq1wKm6OlYYyamo3u1UEKrVJmLtnlJvPDzJX/eQsafvNZIR4I8wxsSJhLsAfM 8Kig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=biDX9XVZ; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-82431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h3-20020a056a00230300b006e0f90ac3b8si4471548pfh.141.2024.02.26.15.05.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 15:05:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82431-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=@lunn.ch header.s=20171124 header.b=biDX9XVZ; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-82431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 1A51B2861FB for ; Mon, 26 Feb 2024 23:05:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E506135A72; Mon, 26 Feb 2024 23:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="biDX9XVZ" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 5C0541350CF; Mon, 26 Feb 2024 23:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708988733; cv=none; b=BJXvR+hJGMTG3JVQgq3YZQl8wu6+blAkV7DqXdGf6dS3jAeRWq9uStCHzNQhaS+tRULNLjX6LcUb56aOvt6YTPQ0hkZnmQWJ8WxNpjJbG1NRakgfPFmuIY7k/vM20JwT3BsSd1hm/++g2C8c4K+iz/QZRpbHIPslYwLLAkkw5LQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708988733; c=relaxed/simple; bh=TWzun0oNIPfc6lqE3DTPBQ4RosQxCFz5BwOT4xEIKSs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uMoQgVUQ3eG48O6dhBw23K0PTlj9/PBaBgQlh+gvDohGBR/ixek/svdURsq7h6ETxb49siW81EoGOMjwRS/cqKDji0LsSoxrRt75Jx3OJe5NMAa+mIfK0UHZoGSqhDD9tcIWuCworOvS1Kdtnq2oEaQlWsRSyvYo/3uxOLqgViQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=biDX9XVZ; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=pYmdkgX1dVrE40bWWH7YizC1+wHj2Ilzj2iousZ5MvQ=; b=biDX9XVZoNS+cu+iILmQSUl1K+ Qg9ttG/A56qZt0e4lsHbOPZw1aHansTRFWg7u3iBfNdZv0inSyJh+RRvOrrYAm72UhuCMqRUD/KCG 5Ojfv0AiI7kvUVIbFYnMiYQiIeYZlZGzXUM38f9nmsFFD8fcu/6Cn2Xmyc4O66l8g7+w=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rek2P-008lo4-S6; Tue, 27 Feb 2024 00:05:33 +0100 Date: Tue, 27 Feb 2024 00:05:33 +0100 From: Andrew Lunn To: Konrad Dybcio Cc: Sarosh Hasan , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Jose Abreu , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Prasad Sodagudi , Andrew Halaney , Rob Herring , kernel@quicinc.com, Sneh Shah , Suraj Jaiswal Subject: Re: [PATCH net-next] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Message-ID: <89c54319-82d0-4cb3-b3be-ccdf6dcf2742@lunn.ch> References: <20240222125517.3356-1-quic_sarohasa@quicinc.com> <54b8c58a-6288-4ae6-9ed7-aa7b212e63da@linaro.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <54b8c58a-6288-4ae6-9ed7-aa7b212e63da@linaro.org> > > static void > > ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed) > > { > > - switch (speed) { > > - case SPEED_1000: > > - ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ; > > - break; > > + if (phy_interface_mode_is_rgmii(ethqos->phy_mode)) { > > + switch (speed) { > > + case SPEED_1000: > > + ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ; > > + break; > > - case SPEED_100: > > - ethqos->link_clk_rate = RGMII_ID_MODE_100_LOW_SVS_CLK_FREQ; > > - break; > > + case SPEED_100: > > + ethqos->link_clk_rate = RGMII_ID_MODE_100_LOW_SVS_CLK_FREQ; > > + break; > > - case SPEED_10: > > - ethqos->link_clk_rate = RGMII_ID_MODE_10_LOW_SVS_CLK_FREQ; > > - break; > > - } > > + case SPEED_10: > > + ethqos->link_clk_rate = RGMII_ID_MODE_10_LOW_SVS_CLK_FREQ; > > + break; > > + } > > - clk_set_rate(ethqos->link_clk, ethqos->link_clk_rate); > > + clk_set_rate(ethqos->link_clk, ethqos->link_clk_rate); > > + } > > } > > if (!phy_interface_mode_is_rgmii(ethqos->phy_mode)) > return 0; It is a void function, so no 0, but otherwise this does look less invasive. Andrew