Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp198582pxk; Thu, 24 Sep 2020 03:29:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGwN61KjXGRbiEWcTZgi487x/cSRiOjQdVM6fbdUjyJ002vDkPi+ET1lc/jj4mheH2ishz X-Received: by 2002:a17:906:441:: with SMTP id e1mr259758eja.396.1600943352784; Thu, 24 Sep 2020 03:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600943352; cv=none; d=google.com; s=arc-20160816; b=CvqxaD/8EDom9ME+mTuL85qfCkGIVZXaP61XjJucJHzZyQEmOO1fV2GTt3Mc7BahZH 5HY7tPY7/mgFmSGKwpl+bZDYVfQq5X4TIJ1snQJjoA3AB5ryLTxlxYgpTFaI/qPSg6aR PgKrXYgncogihSNY3rsDgKLGMp5FRq0gjym0zV05m1QP4GGR2xnkQz3qkRZd6sH+j78N MzP/6y7YYv4+dVL/yXJ+vkY7S84176nsMPJZM2oAPr8Urwn4rZ7o01ZVuVY7T0MAbFAq KCV8gUL794tENNMeDZCGy3SUz/lgIKKFWv34Kf/xi1UyZlT5R9049x/7ZrzJzD+MJaDO rPGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from; bh=uRxjFZC8sG1MiiDB274pcQKBNIbA+IZ1HrLDGAIObTs=; b=S0vrsAIqNFIUl5B8bUBxmLZxBPmT5HVjNXQ0dOmCCMW4JAkAeira4lwlAWK6LLHf78 Df2AYUCMyXY0DLqRlm4G1du40hzzKZ5diQhSC0xbQ//XylyX9+Zc1dSG5KHIFo4a3gDK 2Md9njbQ+nKJrXH3naxQzz8MmjTFRfhjku8U27mdQz+C8opH6zEWNjaB8mHos9EsdVhd th1cwr/z2wOzrms2/YF+zCO2eeyNz71XIiH724y1qmN6kRRb/I/TELZ6xqJPfRBziYWP f9DVf5aT8dl9qX6YHdfVjiRXe15Em6wYyLF5F2uRSzt1Dlj3xkBB2Q64ODKMi/+0Ryu2 SF1A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l27si1641261eja.9.2020.09.24.03.28.49; Thu, 24 Sep 2020 03:29:12 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727466AbgIXKZp (ORCPT + 99 others); Thu, 24 Sep 2020 06:25:45 -0400 Received: from inva021.nxp.com ([92.121.34.21]:38346 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbgIXKZp (ORCPT ); Thu, 24 Sep 2020 06:25:45 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8308920024A; Thu, 24 Sep 2020 12:25:43 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C1C312002AC; Thu, 24 Sep 2020 12:25:38 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 43915402BE; Thu, 24 Sep 2020 12:25:32 +0200 (CEST) From: Xiaoliang Yang To: xiaoliang.yang_1@nxp.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, allan.nielsen@microchip.com, joergen.andreasen@microchip.com, UNGLinuxDriver@microchip.com, alexandru.marginean@nxp.com, po.liu@nxp.com, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, leoyang.li@nxp.com Subject: [PATCH v2 net] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 Date: Thu, 24 Sep 2020 18:17:20 +0800 Message-Id: <20200924101720.31886-1-xiaoliang.yang_1@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org INIT_IPS and GATE_STATE fields have a wrong offset in SG_CONFIG_REG_3. 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) #define ANA_SG_GCL_GS_CONFIG_RSZ 0x4 -- 2.17.1