Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2655367rdh; Mon, 30 Oct 2023 04:04:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnEzBki2fleNBzRcucR4ur1eUxoLlsLRKvPNsM98ZcqeCMNpylh6kLFjOH1R2xfLjT0nZr X-Received: by 2002:a05:6a21:33a7:b0:17a:fe0a:c66c with SMTP id yy39-20020a056a2133a700b0017afe0ac66cmr15955757pzb.2.1698663857437; Mon, 30 Oct 2023 04:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698663857; cv=none; d=google.com; s=arc-20160816; b=ElAv/d31jgzOijfMg9X4z3AxonmSp+KSiY/F8TMAcRM8Bm3Lss+N8/2aunNiHC4j4r E07zXSPn6qDwCCoobVbdpCAJsCfprIBWwKghJ9WoyN+KJr780yt2SZtG3BM9eXzqbcGJ foXLXh/OuRgB838bMAwOeOHnmhx82ODOqhZLRVCaPC1u3h68guf4W7v1ulFNjDa29QLv xQXuR422OlYbMs/0yIFJrQcFNe6xee4DIqBp6hLqEgjRuF7f/qHlN+Ixrc1EJDvYK2wk LJwyuvbZvrOVKXSkp+0LzAzSAS3cjPsSUZK4KmAoYmSjfJOSGCNS1eeithCNc2pFBYbM MMWw== 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=dP22ExIhwcZf4zvM/nB/XRRRBv2PXkjeYmhWWHNWxWc=; fh=lO8yq3AtIlPnFCDTSpqyMqihns/M+srZScAYTCdS2yA=; b=o+91cyV7ZAdN5gCSgqhps42IdcGWjCVN81lqkxF5HqCCN8aGuNtCnnpdcZ04zR5nAH ZpFp9N3ePnUpjfmjuo6OTGdu8cI7OwlwDHZw788zZ/WkkAFcLPT9HACdOS9rlx3Z1g29 DhDkG4O6MYmzbNbZHFrw4vnz2vZIoagDqBvkEurPgFRw3XJrOzjtNCKQOInN6ab16fUl 1g9VZaPV9oXwFiDg9XPfU6wlPebN4bmRSNp3twdZJ+Gvaq90+nc6FpeKwV1PDzkcxUCT TBTCmd2/qjGqIWpfa8EMEBYGpz8U+/EJAvZxpGonXKlX4dXZzWLPooGtDzS8EkJOBq1N +T0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lhWg30Z+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g128-20020a636b86000000b0055c7eb53d7fsi4665275pgc.584.2023.10.30.04.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 04:04:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lhWg30Z+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id D1ADB80A999D; Mon, 30 Oct 2023 04:04:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbjJ3LD4 (ORCPT + 99 others); Mon, 30 Oct 2023 07:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232617AbjJ3LDy (ORCPT ); Mon, 30 Oct 2023 07:03:54 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E75A6C5; Mon, 30 Oct 2023 04:03:51 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c6b5841f61so17483831fa.0; Mon, 30 Oct 2023 04:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698663830; x=1699268630; 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=dP22ExIhwcZf4zvM/nB/XRRRBv2PXkjeYmhWWHNWxWc=; b=lhWg30Z+YhvkrOEec4aTKBM6Gvju6qyYF5i6/+xkXgM3xlJ4HVbl5gQPOOe5mqRuI1 ew/EtNb0kbHObrQLPBiwVb0091NzMcBNL6r61sI01r6s0DwNVYKPeagljCX93hz7RgS0 hOvjxR9dptABQE5ul8h4YCxiD1AitsjzA5QWL7sCsv1xXgO1giIzM0lIuEPaRFbASbv8 g9jXNeXEgMlp7VPo+5UiQFy5NPGuoLCSFK4CCDzZwdaQezcQiVwbEuqn7ST2Tw4fPGh4 UbkVx/iDaZH5LtrhuwEvyHzmadHQxR+W3RJ+D1CNC2gq60iJGkLZpD5bfQCOasALo0SU mZAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698663830; x=1699268630; 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=dP22ExIhwcZf4zvM/nB/XRRRBv2PXkjeYmhWWHNWxWc=; b=M1vPfBCkCr/CQxH/pI/enRTMlLQwhak0Hccvz8cR6nL1cavSKsUcT51F1no+Y5LWzL J4IH73Wu4m3NUPUXYyC8JmnG+BAN6AjVTWj8gWBzrliXzMWtjg/Gi7t8e7GAaxup02Xq YgkLUCuI0EjGJ+h55y3OOhvgU/2Rx0v5pbs1rICKRYBXA4mZHpsnD0JbDhGu6NMWNpXV KeRaiaASolFxSnkVSZNSJN2GuBkNzQuCowmU+MBvXYq8vln3jGljpHHwQAnvPDWwa3HQ peftlsSwyVtPDY3QlzsUn6nGG3w/jMUstBRYTDDHfudO0HYIYL9r5JtsZExZlYz8JFht opRw== X-Gm-Message-State: AOJu0YzgnmGr8ZbSfIVi7eoeDJ9xs4bp0y0WH3NUNKPk9vToBKwmR3ST yOTgru1+CtqFa2LthHUEMgE= X-Received: by 2002:a2e:a309:0:b0:2c4:e5d4:d246 with SMTP id l9-20020a2ea309000000b002c4e5d4d246mr4581245lje.7.1698663829773; Mon, 30 Oct 2023 04:03:49 -0700 (PDT) Received: from mobilestation (srv1.baikalchip.ru. [87.245.175.227]) by smtp.gmail.com with ESMTPSA id a27-20020a2eb17b000000b002bcc303bbffsm1181498ljm.104.2023.10.30.04.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 04:03:49 -0700 (PDT) Date: Mon, 30 Oct 2023 14:03:47 +0300 From: Serge Semin To: Furong Xu <0x1207@gmail.com> Cc: "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto , Simon Horman , Jacob Keller , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, rock.xu@nio.com Subject: Re: [PATCH net] net: stmmac: xgmac: Fix support for multiple Flexible PPS outputs Message-ID: References: <20231027025603.1035668-1-0x1207@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231027025603.1035668-1-0x1207@gmail.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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 30 Oct 2023 04:04:15 -0700 (PDT) On Fri, Oct 27, 2023 at 10:56:03AM +0800, Furong Xu wrote: > From XGMAC Core 3.20 and later, each Flexible PPS has individual PPSEN bit > to select Fixed mode or Flexible mode. The PPSEN must be set, or it stays > in Fixed PPS mode by default. > XGMAC Core prior 3.20, corresponding PPSEN bits are read-only reserved, > always set PPSEN do not make things worse ;) > > Fixes: 95eaf3cd0a90 ("net: stmmac: dwxgmac: Add Flexible PPS support") > Signed-off-by: Furong Xu <0x1207@gmail.com> Please don't forget to add the already got tags shall you need more patch revisions. Reviewed-by: Serge Semin -Serge(y) > --- > drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 2 +- > drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h > index 7a8f47e7b728..a4e8b498dea9 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h > @@ -259,7 +259,7 @@ > ((val) << XGMAC_PPS_MINIDX(x)) > #define XGMAC_PPSCMD_START 0x2 > #define XGMAC_PPSCMD_STOP 0x5 > -#define XGMAC_PPSEN0 BIT(4) > +#define XGMAC_PPSENx(x) BIT(4 + (x) * 8) > #define XGMAC_PPSx_TARGET_TIME_SEC(x) (0x00000d80 + (x) * 0x10) > #define XGMAC_PPSx_TARGET_TIME_NSEC(x) (0x00000d84 + (x) * 0x10) > #define XGMAC_TRGTBUSY0 BIT(31) > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > index f352be269deb..53bb8f16c481 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > @@ -1178,7 +1178,7 @@ static int dwxgmac2_flex_pps_config(void __iomem *ioaddr, int index, > > val |= XGMAC_PPSCMDx(index, XGMAC_PPSCMD_START); > val |= XGMAC_TRGTMODSELx(index, XGMAC_PPSCMD_START); > - val |= XGMAC_PPSEN0; > + val |= XGMAC_PPSENx(index); > > writel(cfg->start.tv_sec, ioaddr + XGMAC_PPSx_TARGET_TIME_SEC(index)); > > -- > 2.34.1 > >