Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2106788rbb; Tue, 27 Feb 2024 10:46:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVG0eu7JNlQM/9jR9vKxVx5NywroUvFhVh3YY7AKMriKZwGv4w87EAR9ebWF10AIAt+zBxfoVXosE3mVmdSXWEo7VsAC/Q3hd4o6SI1Dw== X-Google-Smtp-Source: AGHT+IFeSo7lc1glP0mIWZf3zLtt2/sBMDUOuDRwcch7SaIEwo3ydQNjW/rpAVV2quQXBtkvn2Do X-Received: by 2002:a17:906:2c0d:b0:a43:93b:dda1 with SMTP id e13-20020a1709062c0d00b00a43093bdda1mr5444265ejh.56.1709059586265; Tue, 27 Feb 2024 10:46:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709059586; cv=pass; d=google.com; s=arc-20160816; b=zCseoi6ev+qgbNv/Cj258JnU9W3d/s8Z4k2ocBreynsD/NgjhCdWm1a6KKIKe7A8ia VGt1FEdwtZKAAT0jmp5x4FAE2SRpwH2KjwP7itTquF1Zi+d0AHMqev/zCS5JW/Mv/YsT Crg2o5u/ZJ25V0xJql64tv2WNLmCb4syyYdWjJyUW/XYrQs90UKbs+gdVBwhWXM5waCv MPR6gDCR/E2it7mc4yos1LVYs8ETZDvPRLJRWPOHQhw1FVysBNXhIx8RdnZW5tCjrUqT S0eKbVSiMBlO/EtiQAHYQgBkoWohfZcUHSZn9m9R57Ug5N4d0naNUiGcb6zmUIo/HrNf e2Ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ij4CQGNgDIwyFGI+QSDhuNH/glFVWYAyh+qT7nJHK4g=; fh=YWVB2S2DkBjCz6gp71g/LHA8emnxKM1JVGzmPeb4gC0=; b=IX7lodX70JteXEdOFwFQVkO4bmU11omCAqRU1J35iw250Ky0pbgZmMFjcW7sB6Cumk qysZMDgeeC3t5mDB2TuqsFTQVm6p7YO7drNXUyDjptSLdo/7W9UijNODceH9ibMe7uYX hmvJukbJ/cEmLR4g2fLxmALJ7Epjc/tiAWV0ExvOXyBso66fCL9Hu0XBS/3VnQ0KukTY 3qikb3CHmi5szqB0SM5Pr3XqeFNPi+tZdBymABE/qGjxPlosTToRW+moroUdWSqxvuxE t9fkpAHNZ9f5Btz7W0sYrAJZilX+v3VeOLFkNz/eeGqpxI0a+gKnIGoZVODndS7CCGZI KnEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=bOGEpQ2j; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-83855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o26-20020a17090611da00b00a439ab2bbb9si928802eja.284.2024.02.27.10.46.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:46:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=bOGEpQ2j; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-83855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D888D1F25112 for ; Tue, 27 Feb 2024 18:46:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 620284F891; Tue, 27 Feb 2024 18:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="bOGEpQ2j" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 73BFE199AB; Tue, 27 Feb 2024 18:46:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059573; cv=none; b=atAEz+ofhYvQmt2sIGYP82GC1KbZH48VYXTR8m5lBQwOdqWDf6u5zR2zmz0szQemZlN8CvOFwwDGzgjpmJFKtWnfp8kN34PfZvT9lZ/G6VqM+iRFJk/2K4JbrZl1E8etyiZImI5sAkbpPm97FfGF8Uqqx6wga9egTX1aMckq/AI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059573; c=relaxed/simple; bh=oBC8oewI5RJBOPEM4QXOFwZ7+y3ncKl/QjRjP524klg=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=MtC9DDuQ6znY8UeVKFZ0/F5OAnLbldLiH72Z1Qf0EELnSfXi/SG48HlrVE3Ch6kWCO0x257V0vwZqBBpwpxnhryVuTRia2MDgCC2TQG9qOKk3KubD7L/mGTfW9yIXQC0Ame6HODidPKlZCnG4Ojhatx07J2SxkFgffbpuzIcYYs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=bOGEpQ2j; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41RExOxW022713; Tue, 27 Feb 2024 18:45:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=ij4CQGNgDIwyFGI+QSDhuNH/glFVWYAyh+qT7nJHK4g=; b=bO GEpQ2jLpmbsjN+Gg6JqEhFhz5N5l2O69ti2P2UlCplO8nFAgZnunEp7azIPfh844 pfHqFEvV2AZPs2cmw9cQqFDxhW9PRDZJjhucNW72+Cekk0qBALdFcgIz7SxD5sF4 pmaixUqaT+45ACmLVgpc1qX/GURA7hDrBMrgdOUqUmMMcoG0j0Q40vw2rUDdBb5J inZqFQWsDMqPS6zP++e4FWk861YX1HJpkczsU3Za2T282JT47tD9bGM/eGrXKG7A mbO9aqfzKMfXh5H58/oWMF9EK1fiEPvNDWuoxji2F9U2rHYRKMZ03wV+CA1stlZ5 /kE8fzkx32NsrEcFBYYg== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3whd7b1b3u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 18:45:46 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41RIjk95027971 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 18:45:46 GMT Received: from [10.46.19.239] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 27 Feb 2024 10:45:42 -0800 Message-ID: <17c06c23-49b3-4db9-a021-82904eae6a7d@quicinc.com> Date: Tue, 27 Feb 2024 10:45:41 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Content-Language: en-US To: Sarosh Hasan , Vinod Koul , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Jose Abreu , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney , Rob Herring CC: , Sneh Shah , Suraj Jaiswal References: <20240226094226.14276-1-quic_sarohasa@quicinc.com> From: "Abhishek Chauhan (ABC)" In-Reply-To: <20240226094226.14276-1-quic_sarohasa@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: kWK47h9DpFMyS7UTOUICurYLrPe2mflX X-Proofpoint-ORIG-GUID: kWK47h9DpFMyS7UTOUICurYLrPe2mflX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-27_05,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 adultscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402270145 On 2/26/2024 1:42 AM, Sarosh Hasan wrote: > Updating link clock rate for different speeds is only needed when > using RGMII, as that mode requires changing clock speed when the link > speed changes. Let's restrict updating the link clock speed in > ethqos_update_link_clk() to just RGMII. Other modes such as SGMII > only need to enable the link clock (which is already done in probe). > > Signed-off-by: Sarosh Hasan Reviewed-by: Abhishek Chauhan > --- > v2 changelog: > - Addressed Konrad Dybcio comment on optimizing the patch > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 31631e3f89d0..c182294a6515 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -169,6 +169,9 @@ static void rgmii_dump(void *priv) > static void > ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed) > { > + if (!phy_interface_mode_is_rgmii(ethqos->phy_mode)) > + return; > + > switch (speed) { > case SPEED_1000: > ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ;