From nobody Sat Apr 11 14:29:26 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68D77C678D4 for ; Tue, 7 Mar 2023 14:22:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjCGOWW (ORCPT ); Tue, 7 Mar 2023 09:22:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbjCGOVw (ORCPT ); Tue, 7 Mar 2023 09:21:52 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16BD88A47; Tue, 7 Mar 2023 06:17:31 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id C4DA110000B; Tue, 7 Mar 2023 14:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678198535; 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=Y4eCyez3rsGHNa1ju/xOVLqn68UTPKLtsV9g1+e7lV8=; b=UHIZFpu3lCBgJz7KKwZ7aQJ26GxIT+OSAWI8vPgBnPNulHrt8VJ4UIyOzBqWnx0f3BVIFp LYb4QZrf0hIN4+9ETpJUqTdN5Ancw9VyEdilqozSw09qvJdU3dAhKWiStt7S8KQxNKZ5kM ruGZj8f6MkD/sHKo7HZwEySUSwedo0mi+gCT37vHKu07UTYfp4SLRKWN6/mrmquZdN6tXN rcHK0uBqYHzYLbKP77ra4TPTTubUM7fa/XHTq5MLOu2QwtS2ai2fmLIeAIx7CdIq3lyKXI RLtPUykdE9fkbu4sDdAB5n9Bj4Qgt8TklE47MiQAwGVj7zk8fe+0m9eJ9nTq1A== From: Herve Codina To: Herve Codina , Li Yang , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Qiang Zhao , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: [PATCH 1/3] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Remove unneeded property Date: Tue, 7 Mar 2023 15:15:01 +0100 Message-Id: <20230307141503.159766-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307141503.159766-1-herve.codina@bootlin.com> References: <20230307141503.159766-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove the unneeded and unused #fsl,chan-cells property. Signed-off-by: Herve Codina --- .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-= qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qm= c.yaml index 4ebbc7d52981..ec888f48cac8 100644 --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml @@ -59,14 +59,6 @@ properties: '#size-cells': const: 0 =20 - '#fsl,chan-cells': - $ref: /schemas/types.yaml#/definitions/uint32 - const: 1 - description: - QMC consumers that use a phandle to QMC need to pass the channel num= ber - with this phandle. - For instance "fsl,qmc-chan =3D <&qmc 16>;". - patternProperties: '^channel@([0-9]|[1-5][0-9]|6[0-3])$': description: @@ -121,7 +113,6 @@ required: - fsl,tsa-serial - '#address-cells' - '#size-cells' - - '#fsl,chan-cells' =20 additionalProperties: false =20 @@ -140,7 +131,6 @@ examples: =20 #address-cells =3D <1>; #size-cells =3D <0>; - #fsl,chan-cells =3D <1>; =20 fsl,tsa-serial =3D <&tsa FSL_CPM_TSA_SCC4>; =20 --=20 2.39.2 From nobody Sat Apr 11 14:29:26 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71F62C678D5 for ; Tue, 7 Mar 2023 14:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231300AbjCGOWs (ORCPT ); Tue, 7 Mar 2023 09:22:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231261AbjCGOWQ (ORCPT ); Tue, 7 Mar 2023 09:22:16 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6020185B09; Tue, 7 Mar 2023 06:17:44 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 820AE100005; Tue, 7 Mar 2023 14:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678198541; 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=ET/UXHmrkXcf+pOcInV5MX9zXz5Mj7BURNrQo+ZfWCw=; b=XzLez+du8FeeI4DCR/KP8lwA8qxzFOA4ok+n/RuX3h+qB2lEPfiX2sGMOyIrkNIzk3GyaD KkZxE7y/5BdrSylfbnyfCc4muyAG7l0Kt8FIjz4M9C9YCULSHp6PomxvwaQIQ6BsedOdyu 6p5OVW4kQ8ze5QVdabdLqXTN1tx2cmTnd3IDz7HddXHQFINgv0Y6Dbw0oVUhwgyHd9kUu6 CURjWqBXzB58NDILtyDd9rCw/0K+M5BteW8VLd6KtkAjV7HGEhx6AQg58RvLiy+OhY6ShP DTPmMVRZQXxtVdq9tURvWFDA7xauDcqG9HJIA//oHchGEceqy+glbKnd2pZ+Pg== From: Herve Codina To: Herve Codina , Li Yang , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Qiang Zhao , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: [PATCH 2/3] dt-bindings: soc: fsl: cpm_qe: cpm1-tsa: Remove unneeded property Date: Tue, 7 Mar 2023 15:15:02 +0100 Message-Id: <20230307141503.159766-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307141503.159766-1-herve.codina@bootlin.com> References: <20230307141503.159766-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove the unneeded and unused #fsl,serial-cells property. Signed-off-by: Herve Codina --- .../bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.= yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml index 332e902bcc21..7e51c639a79a 100644 --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml @@ -38,14 +38,6 @@ properties: '#size-cells': const: 0 =20 - '#fsl,serial-cells': - $ref: /schemas/types.yaml#/definitions/uint32 - const: 1 - description: - TSA consumers that use a phandle to TSA need to pass the serial iden= tifier - with this phandle (defined in dt-bindings/soc/fsl,tsa.h). - For instance "fsl,tsa-serial =3D <&tsa FSL_CPM_TSA_SCC4>;". - patternProperties: '^tdm@[0-1]$': description: @@ -174,7 +166,6 @@ required: - reg-names - '#address-cells' - '#size-cells' - - '#fsl,serial-cells' =20 additionalProperties: false =20 @@ -190,7 +181,6 @@ examples: =20 #address-cells =3D <1>; #size-cells =3D <0>; - #fsl,serial-cells =3D <1>; =20 tdm@0 { /* TDMa */ --=20 2.39.2 From nobody Sat Apr 11 14:29:26 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6777BC678D5 for ; Tue, 7 Mar 2023 14:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbjCGOWz (ORCPT ); Tue, 7 Mar 2023 09:22:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbjCGOWR (ORCPT ); Tue, 7 Mar 2023 09:22:17 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C95E58E3CA; Tue, 7 Mar 2023 06:17:44 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 6D13110000C; Tue, 7 Mar 2023 14:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678198546; 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=tebCh8O5AMYYSpkVrb+eHWhJxKEZvKSu3HtDndY/Qyc=; b=LJYUoewXDQBs6tICfbNh9lgrLeF62H5WYhjteP5kSPSvsvKne24IBbid3CAfdmgWLAz+AL 4lKh9D2sJnyyVrtpxqyrg1/iyySC0EDpC84+GOgqfiOQpPl4Z6KcFYIGZSZODJEtVJ5xm6 /K1SwrCfns/bfGN0zg42AOThla9oZuqtHa0D9Drl/zEgYmAzkI4Sem6xgJte77NHt4Ylgu 5yb9Im7yOIY4wga+tj1QI1KS3RP8p1KZ8tyW4piC3OoSSTE5zZqBw4sBiww3Q4tHfPBuUi 7a3r4umW1aiqDPRFzDnqL2xlWE+bCwsAXgwMI+1H6e9jVD0Cnrn7SRth3+Bhxg== From: Herve Codina To: Herve Codina , Li Yang , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Qiang Zhao , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: [PATCH 3/3] soc: fsl: cpm1: qmc: Fix assigned timeslot masks Date: Tue, 7 Mar 2023 15:15:03 +0100 Message-Id: <20230307141503.159766-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307141503.159766-1-herve.codina@bootlin.com> References: <20230307141503.159766-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The assigned timeslot masks are 64bit values. In case of 64 timeslots the code uses (1 << 64) which is undefined on a 64bit value. On the PowerPC architecture, this lead to an incorrect result as (1 << 64) produces the same result as (1 << 0). Fix the masks values taking care of the 64 timeslots case. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index cfa7207353e0..b3c292c9a14e 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -754,6 +754,11 @@ static int qmc_check_chans(struct qmc *qmc) if (ret) return ret; =20 + if ((info.nb_tx_ts > 64) || (info.nb_rx_ts > 64)) { + dev_err(qmc->dev, "Number of TSA Tx/Rx TS assigned not supported\n"); + return -EINVAL; + } + /* * If more than 32 TS are assigned to this serial, one common table is * used for Tx and Rx and so masks must be equal for all channels. @@ -766,9 +771,8 @@ static int qmc_check_chans(struct qmc *qmc) is_one_table =3D true; } =20 - - tx_ts_assigned_mask =3D (((u64)1) << info.nb_tx_ts) - 1; - rx_ts_assigned_mask =3D (((u64)1) << info.nb_rx_ts) - 1; + tx_ts_assigned_mask =3D info.nb_tx_ts =3D=3D 64 ? U64_MAX : (((u64)1) << = info.nb_tx_ts) - 1; + rx_ts_assigned_mask =3D info.nb_rx_ts =3D=3D 64 ? U64_MAX : (((u64)1) << = info.nb_rx_ts) - 1; =20 list_for_each_entry(chan, &qmc->chan_head, list) { if (chan->tx_ts_mask > tx_ts_assigned_mask) { --=20 2.39.2