From patchwork Thu Sep 28 07:06:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 145868 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3173155vqu; Thu, 28 Sep 2023 02:09:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZ1ITubb5otxOhK+JRhpXP5SnSipm3/HNRzZu8chmAdesbC854zvZraXKmSVRSOs1SxMlK X-Received: by 2002:a05:6870:96ab:b0:1db:3679:198a with SMTP id o43-20020a05687096ab00b001db3679198amr666406oaq.24.1695892197489; Thu, 28 Sep 2023 02:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695892197; cv=none; d=google.com; s=arc-20160816; b=e4XHoEBMx7c2KgEueK2nriibOZKeZSGxEdOOnzAZ8/RudymEMvuUx+xKRTbaBXaQou jhZWgXSKGu8Q7Yi/RIiEP35pUYd20YBK2SEniHYW9Pf1dEfj55rW1BRNdPDsQcnz5teo HFFz4tyM1LxfOmDb7vjfsoZr0ilrlNux0Ds0yQ1YQZw+iOFk6xeU3kwQJZeFtY5onCXv k1b5fZrCkZ2uN5EK1UCRbR281g+Z1SjmRP5yMwzRNPLvEx0M8wVD2ZAcwI4ACiIxXU5W hGCXA0mYP3sJic/CBjClubLH2yLdos+D+m/y09t+KFJioClHStmXARf78qbALIPJhcTP koSA== 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=H6LM5oBsAhqZ2AuRWwGids6eXtTepJ+ChJ2w8L/EWt8=; fh=8Kc64rxAF0/ep7JtUzveSO6N9QMBWtHyiJ9nqNn2Uww=; b=bDmcDqGtAEQ9LSZTLd0oeN30ogF7MqMPTsOMF6XyZYDfbhDG7/TkptqBfDM/ek/Bkk brYyiobBGus9DnFo/Zxihe8vcXCh69jCeP5a4nACNX8QM5tFhkjDybWNQrUsTlfhSfcZ elXlBvG5J+BL0W4XDJwIsc+yzmD3yKwiYVvIzIPz9RN4QFY2beD2hy4JNWUPk2Ym57fM IRS8VNMyOnnZhlCepOx+qEX1KNvUlw4gZgES0FZNnaa0bPnTdMh80YUVtuGL7UZ0DZ6E qcavyrSBsa0I4JfAFDx039KUvwZhZkW731e/Omzdf5XetzgG6W3aCvjULMMvn5eaS0EU y9Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=NuiQm0cS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k20-20020a637b54000000b0056959099f46si7453503pgn.856.2023.09.28.02.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 02:09:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=NuiQm0cS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 2CFA381552EA; Thu, 28 Sep 2023 00:21:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbjI1HVG (ORCPT + 20 others); Thu, 28 Sep 2023 03:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbjI1HUs (ORCPT ); Thu, 28 Sep 2023 03:20:48 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35E711BC2; Thu, 28 Sep 2023 00:07:49 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 284E320008; Thu, 28 Sep 2023 07:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695884868; 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=H6LM5oBsAhqZ2AuRWwGids6eXtTepJ+ChJ2w8L/EWt8=; b=NuiQm0cSj8K3gtQGIKK/9hek3VTHRDsc0CiUDVEA0xdyTvJsbTaYH3Lxrb1Mdj175hR8gE JrvFByqWX3Jer3WHWoFZ2K5TE9Fz22AEt49KRPB1gLjZDXs5hBkf/3Fe5slr9a4ufFB9Z7 C1mB6CrExg5OKiUoZIgkihcvxeqEbJWZFZx+nn+RdWAEiTVmCoW8ZZnpLXTjiveGnNzIzC EFbIIQ9AavzcRn8AZLovcdrn+sWSqUUraA5bfIZz22FJomJcJiDib3cs3r8CVZlAShTERc azrXOTWtlrTa0Cy6/XPTlTAw5s8RBmvgLSiydRmYOYUZweSjQ8PoXXGIVI9j/Q== From: Herve Codina To: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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, Simon Horman , Christophe JAILLET , Thomas Petazzoni Subject: [PATCH v7 12/30] soc: fsl: cpm1: qmc: Introduce available timeslots masks Date: Thu, 28 Sep 2023 09:06:30 +0200 Message-ID: <20230928070652.330429-13-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928070652.330429-1-herve.codina@bootlin.com> References: <20230928070652.330429-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 00:21:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778271856849539508 X-GMAIL-MSGID: 1778271856849539508 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 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);