Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp239490ybi; Fri, 24 May 2019 03:07:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6Zn+d4w+HkvPFjA6Jpu0sfR54JTnDZippNngOqwIf7rpGV6N06JiWE4MZtw1OOVLwS+is X-Received: by 2002:a17:90a:8d14:: with SMTP id c20mr7935216pjo.134.1558692467491; Fri, 24 May 2019 03:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558692467; cv=none; d=google.com; s=arc-20160816; b=YHczm2FQaDxCG9W5a0u4pgEXFcie8gRzmTs08zt6YN/S1zwj1HALula93rBRNS+TN9 YPD3BbYccCcppLM8/AmNkozAG3hSrvM7gUofzbhcPS/S89IQLfDMxUuTqgMrGxt8sa4B tu3eEFX6g0g39FCohd7PFm27yw2JFBcxVA7ZrgvWLRPN8GDj5p+59OoXMbQKbz0LyuQt +BFBfh1GoaFCqsjygyZEnULDx3ujmyCJwDQNwsDAMtABqEg2yiHC+k/5P3QyDllApmUi jsboCB21iPcYoSsWmmTyQobnVJMoleNYZiB2P61AgPb7lzECCckY7QWtKOIjvrFIYpIS wWeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FafMAUdO5g/zNuiXRFIiRorGJseD1yO69zH15KHLM/U=; b=vlWXoWC3RUsAOY667/b/V4+7wO8bFO/cIc8YizoMF0e76LpvR5DHcJnUDnpFhqCKZY /bH69sXE2tfTebRDdELeb7/jFt3bsymKnZ4UD5bIsY2ZN0HzE5SuDTEn8ofajYxImKM/ wA3ovqg0QeVJ6cQQzqUa1odKoC3nBA7GkCV9BnnwzcN8TXC033+leEW88CLcMdibpB/8 pE5+q2oalnHXBsV56YgBBSbVVDMfX+R0F0VLi5xbsF7VVMugzhKUXnwfS5L2rNR6UWIl ISFKm3ET9BTAl7iz+l2nudVH/osFV6nqGRQdvOgelSoLCPkRRh7ydMV8M/AjPWQcPFpa kWaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si3055232pjq.90.2019.05.24.03.07.31; Fri, 24 May 2019 03:07:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390465AbfEXKGL (ORCPT + 99 others); Fri, 24 May 2019 06:06:11 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:50655 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390437AbfEXKGI (ORCPT ); Fri, 24 May 2019 06:06:08 -0400 X-Originating-IP: 90.88.147.134 Received: from mc-bl-xps13.lan (aaubervilliers-681-1-27-134.w90-88.abo.wanadoo.fr [90.88.147.134]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 3639F40003; Fri, 24 May 2019 10:06:04 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Antoine Tenart , thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, mw@semihalf.com, Russell King , linux-arm-kernel@lists.infradead.org, Alan Winkowski Subject: [PATCH net-next 2/5] net: mvpp2: cls: Bypass C2 internals FIFOs at init Date: Fri, 24 May 2019 12:05:51 +0200 Message-Id: <20190524100554.8606-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190524100554.8606-1-maxime.chevallier@bootlin.com> References: <20190524100554.8606-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The C2 TCAM has internal FIFOs that are only useful for the built-in self-tests. Disable these FIFOS at init, as recommended in the functionnal specs. Suggested-by: Alan Winkowski Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 2 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h index d5df813e08c4..bb466af9434b 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h @@ -148,6 +148,8 @@ #define MVPP22_CLS_C2_ATTR2 0x1b6c #define MVPP22_CLS_C2_ATTR2_RSS_EN BIT(30) #define MVPP22_CLS_C2_ATTR3 0x1b70 +#define MVPP22_CLS_C2_TCAM_CTRL 0x1b90 +#define MVPP22_CLS_C2_TCAM_BYPASS_FIFO BIT(0) /* Descriptor Manager Top Registers */ #define MVPP2_RXQ_NUM_REG 0x2040 diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c index 9ce73297276e..d549e9a29d9a 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c @@ -923,6 +923,12 @@ void mvpp2_cls_init(struct mvpp2 *priv) mvpp2_cls_c2_write(priv, &c2); } + /* Disable the FIFO stages in C2 engine, which are only used in BIST + * mode + */ + mvpp2_write(priv, MVPP22_CLS_C2_TCAM_CTRL, + MVPP22_CLS_C2_TCAM_BYPASS_FIFO); + mvpp2_cls_port_init_flows(priv); } -- 2.20.1