Message ID | 20230912101400.225653-1-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp740335vqx; Tue, 12 Sep 2023 16:25:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGQZ1wYMQ3LhXcapHLGE4SMn5djNiZhIOJcwCmKsh+hibSXpqGrpHx8+QO62M9TOY9o85E X-Received: by 2002:a05:6a00:179f:b0:68f:dcc1:4bef with SMTP id s31-20020a056a00179f00b0068fdcc14befmr1402512pfg.7.1694561125137; Tue, 12 Sep 2023 16:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694561125; cv=none; d=google.com; s=arc-20160816; b=xOhnIHefn+y8e47VUg+3HDydFBLGIC9EekIavYZHe/RFUMPDpy4VwHauf2dvVMTELp zZjHZmbEL3y/5F4HIGoxWumeIB4WqZ6dNAnFQ/NZcDWV0k14rYuQHRiFQKnnVrdrznJy b8EDiB+IQ3Z5c164yzOm/pRSQi8lwfqNH4Yf3TgNcqIThsIO3Q7tQK7Zpkg7cV5Z5PGv HctTxxDJaNEQhy08hgkbFpvfaJkPJxP+niMjzSZvHgSXjMS/2twIYD8cA0C0Dd2epS5+ boUh35p6vPO+76bQaQRv91nlP6+7KHMHASf8PGAa8UvdjWHKR4jMklcXJqAmpMdSPHH3 +AGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=opH6J+ETePvG/sd1eC5uQEUbCi9+ya8D2CeSkH2d/Rs=; fh=5rCQDomVZxLXb7yR2oN4iSS3zxUnzGJP2HoQaRzhQu0=; b=COAuKRnPtmUhfrHHBuZXMXgZaxqhOBfc//adMA9FCVxMp0IjBBsn9iJujbvduQMIh0 ztPiDReyd2erjCLaOGtfGoRVw/Ili7G3HZyd4BVVTpj7tl2aSBRI0IKNc0mcez3qMDMX +BNoGnOpNP/21fT8A5oKRCd73ST3W5OEOTaAMFbs8GrSxouJFX1CI34J0QFYksVtI+YX plt0szUjuzcasuMkfgNGMa0T77JBtvjxlVVJJ0Svb48R1lipGf41ovdPeijaDrlhF9By 5WrceMxhnBb3XJ45av3GlUzokONnkCUHW48F2jzk/zuP9LpFlRfVPbAwxpwt8DEDDj4L DS3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GLYOgsZO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f17-20020a056a00229100b0068a3e169b99si8963123pfe.260.2023.09.12.16.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 16:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GLYOgsZO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id ECAC1853A0D7; Tue, 12 Sep 2023 03:14:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234213AbjILKOe (ORCPT <rfc822;pwkd43@gmail.com> + 37 others); Tue, 12 Sep 2023 06:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234056AbjILKOS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 12 Sep 2023 06:14:18 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8D62704; Tue, 12 Sep 2023 03:14:06 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id B38A7C000A; Tue, 12 Sep 2023 10:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1694513644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=opH6J+ETePvG/sd1eC5uQEUbCi9+ya8D2CeSkH2d/Rs=; b=GLYOgsZOWYtXIAJVbqPQZAjtkSYX2szh7IvmB5bS1O3KnHfJ7ptrh/guC80ukUFC6WHf1S Jfl09VeevWrMSxKTsOo0RRoG6sg9lcVwhViTSIEW68SGSfaCZVodDWkQHccSrtHClYVAhO W1OtSf9TMslRfgceo0VhShd6MlUgK1NdiCZi4cqqWWf/dlI5qLnsXOEVXVeCUjkqpHscde eupX3yO73ULkOl9pW8FF+k5tZzkabRfNdNlPhnVa+BWMHH5dfQ90Z/rvlLYWV1yUSJxZWG F2Iu+yXoEONLP6AyI5Pdnscwg0FtENxWxDfoMN71R+w0dvmR6wCEdGgupDTK7g== From: Herve Codina <herve.codina@bootlin.com> To: Herve Codina <herve.codina@bootlin.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Shengjiu Wang <shengjiu.wang@gmail.com>, Xiubo Li <Xiubo.Lee@gmail.com>, Fabio Estevam <festevam@gmail.com>, Nicolin Chen <nicoleotsuka@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Randy Dunlap <rdunlap@infradead.org> Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Simon Horman <horms@kernel.org>, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Thomas Petazzoni <thomas.petazzoni@bootlin.com> Subject: [PATCH v5 19/31] soc: fsl: cpm1: qmc: Introduce is_tsa_64rxtx flag Date: Tue, 12 Sep 2023 12:14:00 +0200 Message-ID: <20230912101400.225653-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912081527.208499-1-herve.codina@bootlin.com> References: <20230912081527.208499-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 03:14:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776876126326292378 X-GMAIL-MSGID: 1776876126326292378 |
Series |
Add support for QMC HDLC, framer infrastructure and PEF2256 framer
|
|
Commit Message
Herve Codina
Sept. 12, 2023, 10:14 a.m. UTC
In order to support runtime timeslot route changes, some operations will be different according the routing table used (common Rx and Tx table or one table for Rx and one for Tx). The is_tsa_64rxtx flag is introduced to avoid extra computation to determine the table format each time we need it. It is set once at initialization. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- drivers/soc/fsl/qe/qmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index eeceb81bf107..19acfcded9bc 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -216,6 +216,7 @@ struct qmc { u16 __iomem *int_curr; dma_addr_t int_dma_addr; size_t int_size; + bool is_tsa_64rxtx; struct list_head chan_head; struct qmc_chan *chans[64]; }; @@ -696,7 +697,7 @@ static int qmc_chan_setup_tsa(struct qmc_chan *chan, bool enable) * Setup one common 64 entries table or two 32 entries (one for Tx * and one for Tx) according to assigned TS numbers. */ - if (info.nb_tx_ts > 32 || info.nb_rx_ts > 32) + if (chan->qmc->is_tsa_64rxtx) return qmc_chan_setup_tsa_64rxtx(chan, &info, enable); ret = qmc_chan_setup_tsa_32rx(chan, &info, enable); @@ -1053,6 +1054,7 @@ static int qmc_init_tsa_64rxtx(struct qmc *qmc, const struct tsa_serial_info *in * Everything was previously checked, Tx and Rx related stuffs are * identical -> Used Rx related stuff to build the table */ + qmc->is_tsa_64rxtx = true; /* Invalidate all entries */ for (i = 0; i < 64; i++) @@ -1081,6 +1083,7 @@ static int qmc_init_tsa_32rx_32tx(struct qmc *qmc, const struct tsa_serial_info * Use a Tx 32 entries table and a Rx 32 entries table. * Everything was previously checked. */ + qmc->is_tsa_64rxtx = false; /* Invalidate all entries */ for (i = 0; i < 32; i++) {