Message ID | 20230912101306.225454-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 t13csp416156vqx; Tue, 12 Sep 2023 06:43:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOPg6rYaR1g/kkJqvQl9gRovcXeVNMCEGe7SHqGcqPcAD8FmkbLRMp7Y40aEUJCC4Qb78l X-Received: by 2002:a17:902:e811:b0:1bc:3908:14d with SMTP id u17-20020a170902e81100b001bc3908014dmr3136499plg.2.1694526203065; Tue, 12 Sep 2023 06:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694526203; cv=none; d=google.com; s=arc-20160816; b=YW9VUjT5X0N4+SUd42G5x5gHnZJh5JeQ9gWB2FccDeIXFNe6xu2SokLgVR1GGs/K0E P1HByTaSKCrrsSNcKPOAZTknseOickxhd1zsv5hFwroe8uQDlpkmgvFOruLZAVwonSs2 AiranFvAD9iUdCvwBuBRgYZinrqBvgcJ5CfGYwO7cbnKzzO4rk7WU5T7/JZFMVqOSIGG Frg5rqw8j5FU3k8qC2KEXHtr2L6fmy2DjVUcoRTbjc3S1EJu6htC5yq1HHgja7cSgyjp XUr3YC2o2Q9dYFxKc7ndCPH+t1TflNGQJP7IZV+39epga7fHc1JvaKt7UA4ckImfiT0S aGZw== 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=bUO5lIYnbr+eDpfI26c5vkBg+9WRJsf3/+oOueasock=; fh=5rCQDomVZxLXb7yR2oN4iSS3zxUnzGJP2HoQaRzhQu0=; b=pgUH3hQUl5QDv0McuGn8w2coJGzOi+tM/phED0V93pJoPmpW9lXfEHH6hs4W0do/J3 wsyY0GUWLccNhsCQ6HYCi239qGwLlMKXOat9pI5l2uHgaOlrE/fZsnWXqiNgTlpRee4Q RQq5SkbW11RlTFOqkUugLEZmtSXEdh0t7uYNXYMIFjprMfGCuuphHTifUkLguRVEAyPZ NltXnHnH8RiPFGqDN24hzk6gB+cvluhE4Mukm2pk+cZCSarMQzXYQLo7Mc4VFKguJlO6 3PKy4iUd3fUx7STMmt1M3RiuDdewVZ9IW9ZIHhvXok95dXzu6W3ivfoUlFgVVW8X2S2g xS4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UsZDXKTm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h191-20020a6383c8000000b00565403cf948si3377560pge.495.2023.09.12.06.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:43:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UsZDXKTm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 8C6D882663F6; Tue, 12 Sep 2023 03:13:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233704AbjILKNT (ORCPT <rfc822;pwkd43@gmail.com> + 37 others); Tue, 12 Sep 2023 06:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233728AbjILKNS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 12 Sep 2023 06:13:18 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9945510EB; Tue, 12 Sep 2023 03:13:13 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id E336C40011; Tue, 12 Sep 2023 10:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1694513592; 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=bUO5lIYnbr+eDpfI26c5vkBg+9WRJsf3/+oOueasock=; b=UsZDXKTmjsuAyXhimsLcGHYWSkApHpebNAuxAeBeoc6YbDoiDuLUt8y+iF1XFBvjUd4l05 ujGjrzFVJxFlA3H6p2NQFRooQqaxwZ8PW2ezuuLGCvasDgyEGk0cC/vS9Y24cfOvE54EZM tiGVoyZiIPm9CPXBeF4ViMQZzmlJG7O7+AFpjcS8PqcriMkJNDYzZWSBez583DSwnZ9QSa spXt6c8ddogS24swgswz0kPEvX+Vnm6hqs/CYL9hvqovBr1U8IZ0cwdhea6Unv7Zh29mtf /MJxKhxYW+fhBNjlZey4Wtygme2ILnZzK+d/KuAsPEe3uSpnprkz12dvnM11FA== 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 12/31] soc: fsl: cpm1: qmc: Introduce available timeslots masks Date: Tue, 12 Sep 2023 12:13:06 +0200 Message-ID: <20230912101306.225454-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 (groat.vger.email [0.0.0.0]); Tue, 12 Sep 2023 03:13:24 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776839507776052204 X-GMAIL-MSGID: 1776839507776052204 |
Series |
Add support for QMC HDLC, framer infrastructure and PEF2256 framer
|
|
Commit Message
Herve Codina
Sept. 12, 2023, 10:13 a.m. UTC
Available timeslots masks define timeslots available for the related channel. These timeslots are defined by the QMC binding. Timeslots used are initialized to available timeslots but can be a subset of available timeslots. This prepares the dynamic timeslots management (ie. changing timeslots at runtime). 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index 5da15a25600e..653d458b84b6 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -177,7 +177,9 @@ struct qmc_chan { struct qmc *qmc; void __iomem *s_param; enum qmc_mode mode; + u64 tx_ts_mask_avail; u64 tx_ts_mask; + u64 rx_ts_mask_avail; u64 rx_ts_mask; bool is_reverse_data; @@ -875,7 +877,8 @@ static int qmc_of_parse_chans(struct qmc *qmc, struct device_node *np) of_node_put(chan_np); return ret; } - chan->tx_ts_mask = ts_mask; + chan->tx_ts_mask_avail = ts_mask; + chan->tx_ts_mask = chan->tx_ts_mask_avail; ret = of_property_read_u64(chan_np, "fsl,rx-ts-mask", &ts_mask); if (ret) { @@ -884,7 +887,8 @@ static int qmc_of_parse_chans(struct qmc *qmc, struct device_node *np) of_node_put(chan_np); return ret; } - chan->rx_ts_mask = ts_mask; + chan->rx_ts_mask_avail = ts_mask; + chan->rx_ts_mask = chan->rx_ts_mask_avail; mode = "transparent"; ret = of_property_read_string(chan_np, "fsl,operational-mode", &mode);