Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp101161pxk; Thu, 24 Sep 2020 00:09:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4bOW18DW1Tfv4YYdHwZqMC/3NQLX+pE4MZvp3X+ZHW87R+VMvPudyHP7qo6tExnB+4bBN X-Received: by 2002:a17:906:fb97:: with SMTP id lr23mr3230252ejb.257.1600931384875; Thu, 24 Sep 2020 00:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600931384; cv=none; d=google.com; s=arc-20160816; b=QHBVlgoJhEHDPWUbPRZtyuMamNhD6TcRE22wX8Ayfu/igrfmZIRtgFowjC6R/9nIyQ NcSgUaEU0kGGJWHqxeWYkwcOY5CKBalYgVPum0RaM1ADtAuAUF9UCTZ29jl1PeOeKCSd g4S9cL4Rb6jN1Nxm3kG5E/9rXICUYg1BlvY0ciU7LCNFIq2ZE801j2xNaQeZ8owqgZAP YF6gHHsz74WY0Pv3fngI3U1HrVIbUcTWKljYLOCech7yWMg5Zw9BqI15pypoOZu5Z8pw RfuvSwVlmJ45mdFyK7GYzc6DQUgG9S5EyDyjEWhlRfC9oJTa5/SZH42ZS+b2rF5hIGeY hPxg== 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; bh=cSpZp8Okixk45OaAKIBIPeTjbSJS0vFJ8TXe7liyp3k=; b=wffZn6yh4YWiIc0t43vz/we8jVoApuZw7wW6laO1aZF9W38pCjw/X6Ae2xupij6qCn 34J0lFms1Yro8zDHaNlw6bDaSOpAXX6wtt95lSj3OHyzURpJbwaEpWWS3MtGsZmCre4i izmJH1RI9DbRUb1MYKHwOskk25+Vp49rzMXC1skOC635EWH88HlNR0DGH2/wEnlql/b/ wOjAoGDXwcuGmM46CnlBqKI1j4waGIHZmB+nGrJIPs7QcHlwjuWdciW17bmpLnA6Fvlo 3UErWe6zI+9zeAeEluD38+7+OZ3uRBJ3ir1JnaFgYl5rE5FtCdGjgU/JyqKNilJXDJFl hxFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba30si1646173edb.44.2020.09.24.00.09.21; Thu, 24 Sep 2020 00:09:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbgIXHIU (ORCPT + 99 others); Thu, 24 Sep 2020 03:08:20 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:49373 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726929AbgIXHIU (ORCPT ); Thu, 24 Sep 2020 03:08:20 -0400 X-Originating-IP: 90.65.88.165 Received: from localhost (lfbn-lyo-1-1908-165.w90-65.abo.wanadoo.fr [90.65.88.165]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 2B210FF805; Thu, 24 Sep 2020 07:08:17 +0000 (UTC) Date: Thu, 24 Sep 2020 09:08:16 +0200 From: Alexandre Belloni To: Xiaoliang Yang Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, allan.nielsen@microchip.com, joergen.andreasen@microchip.com, UNGLinuxDriver@microchip.com, fido_max@inbox.ru, alexandru.marginean@nxp.com, po.liu@nxp.com, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, leoyang.li@nxp.com Subject: Re: [net] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 Message-ID: <20200924070816.GS9675@piout.net> References: <20200924021113.9964-1-xiaoliang.yang_1@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924021113.9964-1-xiaoliang.yang_1@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 24/09/2020 10:11:13+0800, Xiaoliang Yang wrote: > INIT_IPS and GATE_ENABLE fields have a wrong offset in SG_CONFIG_REG_3. You are changing GATE_STATE, not GATE_ENABLE > This register is used by stream gate control of PSFP, and it has not > been used before, because PSFP is not implemented in ocelot driver. > > Signed-off-by: Xiaoliang Yang > --- > include/soc/mscc/ocelot_ana.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/soc/mscc/ocelot_ana.h b/include/soc/mscc/ocelot_ana.h > index 841c6ec22b64..1669481d9779 100644 > --- a/include/soc/mscc/ocelot_ana.h > +++ b/include/soc/mscc/ocelot_ana.h > @@ -252,10 +252,10 @@ > #define ANA_SG_CONFIG_REG_3_LIST_LENGTH_M GENMASK(18, 16) > #define ANA_SG_CONFIG_REG_3_LIST_LENGTH_X(x) (((x) & GENMASK(18, 16)) >> 16) > #define ANA_SG_CONFIG_REG_3_GATE_ENABLE BIT(20) > -#define ANA_SG_CONFIG_REG_3_INIT_IPS(x) (((x) << 24) & GENMASK(27, 24)) > -#define ANA_SG_CONFIG_REG_3_INIT_IPS_M GENMASK(27, 24) > -#define ANA_SG_CONFIG_REG_3_INIT_IPS_X(x) (((x) & GENMASK(27, 24)) >> 24) > -#define ANA_SG_CONFIG_REG_3_INIT_GATE_STATE BIT(28) > +#define ANA_SG_CONFIG_REG_3_INIT_IPS(x) (((x) << 21) & GENMASK(24, 21)) > +#define ANA_SG_CONFIG_REG_3_INIT_IPS_M GENMASK(24, 21) > +#define ANA_SG_CONFIG_REG_3_INIT_IPS_X(x) (((x) & GENMASK(24, 21)) >> 21) > +#define ANA_SG_CONFIG_REG_3_INIT_GATE_STATE BIT(25) > VSC7514 doesn't have the stream gate registers ans this was generated automatically from the cml file for felix. Did that change? Seeing that bits in this register are not packed, I would believe your change is correct. > #define ANA_SG_GCL_GS_CONFIG_RSZ 0x4 > > -- > 2.17.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com