Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp858579pxk; Wed, 23 Sep 2020 19:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOhCaQw4DnPX9pk2JxyspAzgqBJeIoX4JbKtXXXb/DSmqdwFBeNzS6tsVmOOMtgig5cRmC X-Received: by 2002:a50:bf47:: with SMTP id g7mr2354329edk.26.1600914062685; Wed, 23 Sep 2020 19:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600914062; cv=none; d=google.com; s=arc-20160816; b=Hd90RH36b5cu6svbUi74A0Y6s+kzEzuQ29+8C7QQo5bw8390V8UsLQwsrDGNdTYhn4 cCxBuMTLeCk9N28nKRLhA7ONBXaW8SQvZe5ZOD47bt0n9eYAOOM9ZKPxt0hyB/2S/9yH E7GJfrQGHqaCAMxUrAo8JK1SbCXu8SugOehcIwwJ0vRnxoRJpmFAKgwXmNi+hmV7FX1N ikrs82zw1xGhZT7mj0hS851egDHCFzrRIFWWqMTrOD2FPcV0QtVtvz73ugmWCKSeK0Fn d9W83unV4WbzbwG6GARAdd9sbYPmvFhPTTXVSnq38qrDU1BnkYLp+KYuIWWuW1gx67Hu sMNw== 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=MGHbNkgfe8+xHV5j9g+aS/vZ1RM33uiWYxYAf0S1mxs=; b=jlY7qWvI9kyOCI3Yhej7KJHP3rFxNQp+BHLd+ujSbqXyrTm2vTSDu7iIiZ1kmCGR0I P78meOmvJcym8UwRCmLlA5xhmyq5N8hZta6vcKNaA5s0TyQVck0mhyj132a4yPkL0+Oj /AwsvKVz0y1sSQ6aoWLsBiO9BLFPBtkLmKxYGh850mGMa1bB5fjiEW25FWtyPWwUfaa4 GgjICHSi/BLDEETiM+MnYlGr3XJgPZVrPWM6PoluX4z6SNvIFa5zmm8FdDmhUj9X1Hzd s+XRVvCo8cLCJWeB8BB6dBe2vTVpX7gwcDHMOK63XPB8nu4NgUwL5tz7saHcrt39Zoe+ apFg== 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 u22si1154899edy.599.2020.09.23.19.20.39; Wed, 23 Sep 2020 19:21:02 -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 S1726634AbgIXCTj (ORCPT + 99 others); Wed, 23 Sep 2020 22:19:39 -0400 Received: from inva021.nxp.com ([92.121.34.21]:50516 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgIXCTi (ORCPT ); Wed, 23 Sep 2020 22:19:38 -0400 X-Greylist: delayed 142090 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 Sep 2020 22:19:38 EDT Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 37260200FF3; Thu, 24 Sep 2020 04:19:37 +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 C052C200B30; Thu, 24 Sep 2020 04:19:31 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B64E9402BE; Thu, 24 Sep 2020 04:19:24 +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, alexandre.belloni@bootlin.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: [net] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 Date: Thu, 24 Sep 2020 10:11:13 +0800 Message-Id: <20200924021113.9964-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_ENABLE 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