From patchwork Wed Aug 9 13:27:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 133286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2855687vqr; Wed, 9 Aug 2023 08:00:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUqylnxV1gjfmkntdkPqnuzt6TXxn8QbdoZdFXZXlVbzlD0UFbkVS3BRxCarw4OwLGxET7 X-Received: by 2002:a05:651c:88:b0:2b9:45ad:88b1 with SMTP id 8-20020a05651c008800b002b945ad88b1mr2130408ljq.2.1691593204960; Wed, 09 Aug 2023 08:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691593204; cv=none; d=google.com; s=arc-20160816; b=UuKjOIhylB7pZ1aP6gzlrkfpnH4lanNUmIWQZ39vs0HrJNGugL4UQL4fwruBURXfFI yqw5QkuE3VjUxdFLo7lxb4Z/lHNIeV+EFxr2M4NRSus7LLYWFnHKwYLKUVUzBJaWhh2R 3B9bERswakVQW4LyqlUZCnX1G2TJ1jSMsKSkiMBSYA4qEiaYfDPSJgFWFhbCUbPFw9QQ 8CGJAt2s/7ZJPP+B6as3S/ag6DYL69Ii8qY+A+G9uZe5LNeaElmjjkVmwndkhaIPGZm6 ECSy4vqPChVSV0sNAr1oWl6c4sRtW9SAm/tZXa14n/O2xCi/34zlj/ke7glu239gNllF 78zQ== 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=b76iZMmvIvCMEyBgEerfkaYKot2Yt0wNBegRQvGpUdk=; fh=OtJVFpZ5Y8/ND7g8QcUIbRSFhG4LznwcYYtG4zWKevM=; b=CmymSnD78TAH0tRcaam8CxVmZzmoTQGdHxHkVYfZ+CteBlIOahr6L9Mp9Ua9QiHiGj Uob82P/ZUYSSRT36dBeJOZ3uXl3noT21Nl0osm/oGH8oElQZQiynY2iFrnG7HejpTmRV tSAGOuLn6LD930dhajHqgN9oCaFJqK2NPey//DZ2+8knm4kGKNeUHcC6aIZ3HmKdGiJc 8qZjYsyqx3N/52u+TMB4LF/AtOidC5kMiQ5sYOJycnEkKcdvr4kcDuOjE6OEVsiemrNj 0DD7GOZmOu5bb3J6thDRncTFBOLXXeo+rWhRbRID7PYmZ8NPByVfmRIUx+qaowMo5e5v ZjQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=XqYquN0B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020a1709064a9500b0099351214a94si1064065eju.648.2023.08.09.07.59.35; Wed, 09 Aug 2023 08:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=XqYquN0B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231508AbjHIN3F (ORCPT + 99 others); Wed, 9 Aug 2023 09:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233051AbjHIN2j (ORCPT ); Wed, 9 Aug 2023 09:28:39 -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 0F4E9270C; Wed, 9 Aug 2023 06:28:26 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id BC34940011; Wed, 9 Aug 2023 13:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691587705; 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=b76iZMmvIvCMEyBgEerfkaYKot2Yt0wNBegRQvGpUdk=; b=XqYquN0BCr88Qn8XrGMbfKGESOT/2/r19xycnvvW1yS2bVGito7H2iBOtdg8LZ/pS+xpMn LQPlqnlDhvmw4Va5ZbpaP3xlKSqhJn9inpPlWoiwx+uLIG4E4JQ5t8HGnnmlo5px7wukO/ wJZSLFh+PNwzNBcEtZ9FuU2K1e5o3aI/vWA4mChdAbJAcOqFs0bfJ/Z6V4pLMSKxmYBO/K U6fUN51w89vVulJwEWqpCwTnMM0qPj5qlPQE5gpuBj4pIjbdD+YH0B/FHCGt7m0Wrq8Kld 1OyCealv/vkDquZGzOTbk6lqBBt9JKaZN8Mes7zR1EBFc+4Bu7cyGMZPwQeLKA== From: Herve Codina To: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Christophe Leroy , Randy Dunlap 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, Thomas Petazzoni Subject: [PATCH v3 09/28] soc: fsl: cpm1: qmc: Introduce available timeslots masks Date: Wed, 9 Aug 2023 15:27:36 +0200 Message-ID: <20230809132757.2470544-10-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809132757.2470544-1-herve.codina@bootlin.com> References: <20230809132757.2470544-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773764036642700310 X-GMAIL-MSGID: 1773764036642700310 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 Reviewed-by: Christophe Leroy --- 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 459e0bbd723d..1bc2af58e829 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);