Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp995938rdb; Fri, 1 Dec 2023 04:35:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJ8IOzg8Oo4o+5f/6CELDx4JSVntXFJ09MnJOpgF73NF5qvyCT17EAjsqeA7I407WCcMgb X-Received: by 2002:a05:6a00:2d83:b0:6cd:e320:b0d5 with SMTP id fb3-20020a056a002d8300b006cde320b0d5mr6800267pfb.12.1701434123426; Fri, 01 Dec 2023 04:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701434123; cv=none; d=google.com; s=arc-20160816; b=YO//BKVqpzDs2oJ7Z2FDfqwV0t5PTpnF0VdHQsYZrbc4KDiNZKekSQmUVNFxxzfkCO LCN19zq15u/xIVXzWV2pyzYSQzkjMV9hZxRUBW+chH02d3AidpU0MG+xnWm/3dl31jLq cP7sWN4Pjr1N/KlIoLIbSIwQFOwLpz1abiCCaa3iljFeiDmLzcrNw4F7NGiumILck7Wr b2N6QoxMjC/lQcqLjwSecL+RnwdwSEw/rEu0ZYqATSHlp1rCHVaXqaX4Et7LS8yurJSt XH+mozOQENDc/d5uMG9sfa5+PmI3obqgVNR+Hkc5En6qwAyZEovLF/PAunHzn7uYlNof SEIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YAJ12ZP/6sikIFKSSmQlShHQawFcbI6eeUcRDaDj6EQ=; fh=oUQXlm9N18NE8BciMxTG8yakJePvyLDL7KOQwgHv8WI=; b=SbnT5aJ9YjeKxLdtSHx6HJU07C5ibY6+7BypzlmZgLqTk/pPNBoudYab8OCE7kbhHk uCNkotQLY2zeFn5w75oLvhH5TSGL5bXRU9qYEhM9m4ZJ5fSOKxKioJEr3qqBFvi2/tpF Q5MViH9k2e2Rknf9ZTnHdt+LyHX2eZR267gJ8tjgppAEBHJkWPkbkjtkKNFdaPsLXKbC 8Jbr5oD6YPxd6GHLZ/9VcErV/5QlllzbYlbKqylRHP5X/au3GsUO7GWj0HrLurwFxBRe dACO+YbGEL82xIciij77HCrMYhEHFoFAM3JIKwSf8T+ijlxl4DbiCNyO9aooHPE726Sz gMZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="PYFM/DuK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id fh9-20020a056a00390900b006cd8f0ed07csi3307311pfb.191.2023.12.01.04.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 04:35:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="PYFM/DuK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 05ACB80FE532; Fri, 1 Dec 2023 04:35:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378831AbjLAMfF (ORCPT + 99 others); Fri, 1 Dec 2023 07:35:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378862AbjLAMfC (ORCPT ); Fri, 1 Dec 2023 07:35:02 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75B3D1728; Fri, 1 Dec 2023 04:35:07 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2c9c30c7eafso25883291fa.0; Fri, 01 Dec 2023 04:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701434106; x=1702038906; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YAJ12ZP/6sikIFKSSmQlShHQawFcbI6eeUcRDaDj6EQ=; b=PYFM/DuKm0NGrhD23v+U3Uk4EpSo/F7LSCjilX4k8ZJDwaFSjGeVLOXW2JwtO5N5jk IdCyiPtcOki98odsR/tZmdkDNhkOtA4j2Z1B+7maDm6f9fe/KCR4hZxmROgdrSiuXpBz 9rtC9Tyyl1qiI6pYDP2yz5PYqx+vzAhHCjCXnOxriimgfyc1e1pCtFnhor8v9e3ua/7w GB0ZAa9cMIizwgvQeR4Bt/hy1r7E3IEXEW/SV/k2PB5ieNBy7ByVc8qcfcpZAyshvwZp YXcIwA5p2B9tVu1xs7wlW6Ch8Co/nsI86T7G4s213OM2XSyfDIwzy1UcyhnzVw7JCpWf C9TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701434106; x=1702038906; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YAJ12ZP/6sikIFKSSmQlShHQawFcbI6eeUcRDaDj6EQ=; b=TP2QdNGZswOK9xCXcatwvw2uMPshYc0/DYZ2wzCWPTWbPyHsrkhW/RRfT/EwVUGpUI 54+mCQFmCarrMnTh+nf2MQ/igFaMYJdwXEKhsU3oaUyMiIGabTEHGG2o45DsynHRG6+K g8947ZFW2dU1peyXV1AiGJwFjqFxg3verygshwKd5lkRrEk/pb1RH7+6IUfgdPm2oa1S Wdc0ix15zL3kmN0JhDrV5kHS6lBMryeDxlTbWsMsAA4fjCvn6G5bifJwuY64msDlgx6b eyoBtPnJ742L+fxmynzsoCBEek1X1DANjkmGSsEwgadWVNl7YGtQOeJzpH5XZIFwN3FI E5lg== X-Gm-Message-State: AOJu0Ywyjr0gnz5Ga6eDXWB7LFxGA+K8juhqBT/CBqTAA9oqwDCvBJNq kWk/CjBusfPiQcdhGwlkTzs= X-Received: by 2002:a2e:8895:0:b0:2c9:d874:6efc with SMTP id k21-20020a2e8895000000b002c9d8746efcmr818380lji.89.1701434105454; Fri, 01 Dec 2023 04:35:05 -0800 (PST) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id i21-20020a2e8655000000b002c9b873270asm408702ljj.123.2023.12.01.04.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 04:35:05 -0800 (PST) Date: Fri, 1 Dec 2023 15:35:02 +0300 From: Serge Semin To: Sneh Shah Cc: Vinod Koul , Bhupesh Sharma , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@quicinc.com, Andrew Halaney Subject: Re: [PATCH v2] net: stmmac: update Rx clk divider for 10M SGMII Message-ID: References: <20231201100548.12994-1-quic_snehshah@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231201100548.12994-1-quic_snehshah@quicinc.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 01 Dec 2023 04:35:19 -0800 (PST) On Fri, Dec 01, 2023 at 03:35:48PM +0530, Sneh Shah wrote: > SGMII 10MBPS mode needs RX clock divider to avoid drops in Rx. > Update configure SGMII function with rx clk divider programming. > [PATCH v2] net: stmmac: update Rx clk divider for 10M SGMII It would be better to add "dwmac-qcom-ethqos" prefix to the subject since the patch concerns the Qualcomm Eth MAC only. -Serge(y) > > Fixes: 463120c31c58 ("net: stmmac: dwmac-qcom-ethqos: add support for SGMII") > Signed-off-by: Sneh Shah > --- > v2 changelog: > - Use FIELD_PREP to prepare bifield values in place of GENMASK > - Add fixes tag > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index d3bf42d0fceb..df6ff8bcdb5c 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -34,6 +34,7 @@ > #define RGMII_CONFIG_LOOPBACK_EN BIT(2) > #define RGMII_CONFIG_PROG_SWAP BIT(1) > #define RGMII_CONFIG_DDR_MODE BIT(0) > +#define RGMII_CONFIG_SGMII_CLK_DVDR GENMASK(18, 10) > > /* SDCC_HC_REG_DLL_CONFIG fields */ > #define SDCC_DLL_CONFIG_DLL_RST BIT(30) > @@ -617,6 +618,9 @@ static int ethqos_configure_sgmii(struct qcom_ethqos *ethqos) > case SPEED_10: > val |= ETHQOS_MAC_CTRL_PORT_SEL; > val &= ~ETHQOS_MAC_CTRL_SPEED_MODE; > + rgmii_updatel(ethqos, RGMII_CONFIG_SGMII_CLK_DVDR, > + FIELD_PREP(RGMII_CONFIG_SGMII_CLK_DVDR, 0x31), > + RGMII_IO_MACRO_CONFIG); > break; > } > > -- > 2.17.1 > >