From patchwork Mon Aug 17 15:15:30 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: 247816 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp2749209ilo; Mon, 17 Aug 2020 08:53:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHlfyatee5+0GSceS/x9JCeJCyOFdfMBM2WOd3NzYy+0KTbztVpLDKTKndUJkMbZ3gBfrB X-Received: by 2002:aa7:d1c6:: with SMTP id g6mr15995301edp.232.1597679636328; Mon, 17 Aug 2020 08:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597679636; cv=none; d=google.com; s=arc-20160816; b=kgUl5tt91GLl5dHV52gVQ9jdUhVxRe5RZSNQ8F+9J3FVxPGkwvqBMaIxdW+QFrMw87 w7lEJ6NxQ+akNctIZkQl16U8nmJ57qRFlntPJeTylP1SyW38khTw5A/1n1694bVXuP1N aS6YGHHgLbm805sgZkzhecWXhBH+DW1JRzyzlhn2TGgfR3t+E/a4i33yHhhOzP3dFW6g jpPSQziOsUlTd+Qu5AX1APHMnBUl0RJV5GgI6900VHe0uueWenYVSj6EDJpmPLQD4Rvl CgHrwIt9urNSI/Kz9BXWQoHL9vAAnA7VIZjGbNWMX3yOK2yC7SofD4+gjh1178z1uTII I/NA== 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=cYRLpEWiHGmqG5AaaGaVqL+wYvnJTcRM3D2oFCgkwYA=; b=eF/TLnFrlacQMYkemH3iQd1fJdfeJriHslnRxrgG/drq4XaZoz7iMrk/OYhDm7xK4r e6deBV63442WKu3PIZgmuxayZxawovbYkABFFvU13cnLL6JMCGE2dHCLfIOfEG9PI8Qj QDl+WnK8LcLkIs0K1NNJ4Te4UTcnza/TgV59s0VloPtRtsg3aesF2f9Wda+MRvllLLcR CjBkThig7NhOblYwUuTZesvQDhVWzW2DNyngZWJHW1OaV1fuL4QgNKFuhhSbXWLU4FrC HyXFg87Hj3LcHti+Nh6PQqLSIuiRnAmkD71MpwW35mzqzUJfQ+evXnzIK4eN+dG6Sy8O TXtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bTGmw3dj; 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 by18si11069104ejb.185.2020.08.17.08.53.56; Mon, 17 Aug 2020 08:53:56 -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=bTGmw3dj; 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 S2387951AbgHQPxw (ORCPT + 15 others); Mon, 17 Aug 2020 11:53:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:40946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387948AbgHQPxv (ORCPT ); Mon, 17 Aug 2020 11:53:51 -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 2730320657; Mon, 17 Aug 2020 15:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679630; bh=zWkn7msTWdqSd4W9q862mQxFYapma4IhXp8NLDsgtio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bTGmw3djEwZBokoMt0g/xdenTABfPwnSvjalQ585VvcSpzuoY2B+WRsedAJWUtiiD 5Yiak66mY0yC8cQl4xD+pBNErZOjmyeGw6ykLBtgPoG4vazUSYJWS+P7L0zruGpfSs PMCiFJ2BdgJcBtZ0flCCgdL1vO5Zlz9j2L5kBM3c= 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.7 280/393] ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK Date: Mon, 17 Aug 2020 17:15:30 +0200 Message-Id: <20200817143833.201619932@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@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 9d436b0c5718a..7031869a023a1 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)