From patchwork Mon Aug 17 15:16:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 247835 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp2852600ilo; Mon, 17 Aug 2020 11:12:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/oAn7wZMKlYgq6bAlf9sKo8Z/fVguiDS4l2Ya5Ek7eKp51dm9UZedM8BnJMe7ye9Psvpl X-Received: by 2002:a17:906:a109:: with SMTP id t9mr17379724ejy.134.1597687930767; Mon, 17 Aug 2020 11:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597687930; cv=none; d=google.com; s=arc-20160816; b=U3ZXrNyGsDPsuWblBbdKIg0kG5FQaNdNbTztjf//V/wpNyYT3DV4HGFtgsjVGb/3I5 VKPA544lxyYCA1Pgl51wClgh7jpIFvB50yLp433Zx/Q+Ln5N6shnu4BgIoFv6qQCSs41 b2nxtB6MNUybyt/wk+Bc+dmTY78XatRUoxivCVFCE+ZsLtpQZRRZJVJLDm/4Nu0dJhwH Su2O1sPOPVP3tpdQ5S7h1eQGRzjIPZmBr0VjEYHslYlw0aJxdkc4dNxuW+44Jcx38X5w EqMSTBSKxZXTuWG8H11uVRReiVeHStZysvLIbhFxdKfOcmm+bJxfhFYpZQMX/1paRXnt Rxzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DXq0r7KIXfV4BW6FWpg5BVkoM/FzLBhg2BWxpmD6Nns=; b=IWf6gMJGPbTlOP1Cdyo/9lz0s284VluweAXQLoO6ZJ++qbIt4xukJ93OxWt2mVF4Gg 6B9a5Gmp6GK7vl3H+D7p/F5703qf5ka4sLo/WV80vIAJtxHLP3lf634xVgJ01onpzfwC zvO6usoPGVl6DspsAFEca7c18ZqB7ZXZHQSiqGasaliBtibkASyCleQJPWtUTaQ2grc8 l6wWoSUgTFJAmfzBexIDUgpujCpicImSdaA8bzvD98Qb1UmULz8ZPjXXCwwU69fNSKQp mKbcE1qfOV6g+UVqHqlvBfZXMw7pvi8yFGf/DDvkU6nZnavhJPj2SbbWSi0TfMub2vx1 HKjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LmHbrVPg; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si11640605ejb.563.2020.08.17.11.12.10; Mon, 17 Aug 2020 11:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LmHbrVPg; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390440AbgHQSLL (ORCPT + 15 others); Mon, 17 Aug 2020 14:11:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:55774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388414AbgHQQHb (ORCPT ); Mon, 17 Aug 2020 12:07:31 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 082E320748; Mon, 17 Aug 2020 16:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680450; bh=DT8BU4KJptWK8m2+MJqZTxLZ1LjVZbHbqPAU9CaDBJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmHbrVPgBsW8DjryTY4AHgNoo4OlfHxNAVHLJFFLUYWVX08b9uEKsZT4MQ9pc1wBX 2z89wn1KmDr1nE7fKhJ5Koqs8hwWcprEwrOFqhC9ZsY0PC/hFe73ILGrqrNpsUNm+7 nxnBNSUTQTNsndnKKBGMChn5UVQ9B5lpE6I8nwSY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Fabio Estevam , Mark Brown , Sasha Levin Subject: [PATCH 5.4 190/270] ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK Date: Mon, 17 Aug 2020 17:16:31 +0200 Message-Id: <20200817143805.266473605@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shengjiu Wang [ Upstream commit 5aef1ff2397d021f93d874b57dff032fdfac73de ] The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the fifo_depth. Fixes: a860fac42097 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq") Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_sai.c | 5 +++-- sound/soc/fsl/fsl_sai.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 41b83ecaf0082..914b75c23d1bf 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -680,10 +680,11 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai) regmap_write(sai->regmap, FSL_SAI_RCSR(ofs), 0); regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs), - FSL_SAI_CR1_RFW_MASK, + FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth), sai->soc_data->fifo_depth - FSL_SAI_MAXBURST_TX); regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs), - FSL_SAI_CR1_RFW_MASK, FSL_SAI_MAXBURST_RX - 1); + FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth), + FSL_SAI_MAXBURST_RX - 1); snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx, &sai->dma_params_rx); diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h index 76b15deea80c7..6aba7d28f5f34 100644 --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h @@ -94,7 +94,7 @@ #define FSL_SAI_CSR_FRDE BIT(0) /* SAI Transmit and Receive Configuration 1 Register */ -#define FSL_SAI_CR1_RFW_MASK 0x1f +#define FSL_SAI_CR1_RFW_MASK(x) ((x) - 1) /* SAI Transmit and Receive Configuration 2 Register */ #define FSL_SAI_CR2_SYNC BIT(30)