Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp173561yba; Wed, 3 Apr 2019 06:43:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwd5ueaX+nPAV++mwxbGBj1odPvq4htRYQWnjR/afDlEfqhxdy332Fm4LJnzROmtSDswSUu X-Received: by 2002:a62:75c5:: with SMTP id q188mr37117559pfc.76.1554298999428; Wed, 03 Apr 2019 06:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554298999; cv=none; d=google.com; s=arc-20160816; b=G9gUM/nZ0Hhn9uPU2ut/uamhtgCtt23EmAYQxm6pUu5p+VXDMy7DLisfl60Wk0/1zV 769/IO6aCz0+lapwik/iKRYel+7kbyEUTy2eMqSlSERQ6BDHOh0jRY9/ylnP9eLTeep4 pIDFezAxwUv/rqyjxp4vrc0DQMJrjPFQRBZIVn1Ckp9+xda2mVvpBlo4lK/8JOhyd8nF pcnWWzzsVP/vadRxH0uHlAtjwLy3Sz8btb1E6p2oT6k+BNArxUTvUGUwBxpPO9l6Bigb 1/pDoQKsiq/fDQB52p+mx35YYJhvGWONXY3+nv80uk9eW/7LJMGcAzJxILyUileN4f9O 9TGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=PIz+mawvhzFTfB4b26MQlLUMgpmb6axq6CvlpWYyOMg=; b=CRkiHt2JxiMHTZKE5GqcdYLlyqem5xMYpNyKqfyCw8q7gXqQJ2hQ3yk1VXtcUxv0qV GpmpzGFct1+bXYEXSWCSzfb0qIqlDkpymtgEfUclionzB4L8e3Tws6DkCOKba2OxwDjs 4G3ZwveVruRwSbN8QngPyca0rps7UCWKAKDiHPsBl4ypjmX0UtBP36XSvC2TGh5M2Uoj T0ma6Y0fESvLbBLgnJEBpz+Y7NpAySuWrHs2U8FCPAtbQYJWup2nZNgJXJmhWnuANXmW nhvKVgHhDbec5GzRbSJZAjqnqTOyQVWesJO1tvSE7gqG2VI+RI1em7DtELAA31m43t+P GinQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l63si14602084pfl.127.2019.04.03.06.43.04; Wed, 03 Apr 2019 06:43:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbfDCNmK (ORCPT + 99 others); Wed, 3 Apr 2019 09:42:10 -0400 Received: from regular1.263xmail.com ([211.150.70.196]:53640 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbfDCNmH (ORCPT ); Wed, 3 Apr 2019 09:42:07 -0400 Received: from sugar.zhang?rock-chips.com (unknown [192.168.167.12]) by regular1.263xmail.com (Postfix) with ESMTP id DD3C872E; Wed, 3 Apr 2019 21:42:00 +0800 (CST) X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P16332T140353604671232S1554298910639057_; Wed, 03 Apr 2019 21:41:55 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <85396c55356a271af3d3755537b4e0d8> X-RL-SENDER: sugar.zhang@rock-chips.com X-SENDER: zxg@rock-chips.com X-LOGIN-NAME: sugar.zhang@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Sugar Zhang To: heiko@sntech.de, broonie@kernel.org Cc: linux-rockchip@lists.infradead.org, Sugar Zhang , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 04/12] ASoC: rockchip: pdm: optimize clear logic Date: Wed, 3 Apr 2019 21:40:48 +0800 Message-Id: <1554298856-59028-5-git-send-email-sugar.zhang@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com> References: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to reset controller every time, do this once in pdm_probe. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 8c1be59..abbb6d7 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -183,9 +183,6 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream, val); regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, PDM_DMA_RDL_MSK, PDM_DMA_RDL(16)); - regmap_update_bits(pdm->regmap, PDM_SYSCONFIG, - PDM_RX_MASK | PDM_RX_CLR_MASK, - PDM_RX_STOP | PDM_RX_CLR_WR); } return 0; @@ -355,6 +352,7 @@ static bool rockchip_pdm_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { case PDM_SYSCONFIG: + case PDM_FIFO_CTRL: case PDM_INT_CLR: case PDM_INT_ST: return true; @@ -438,6 +436,7 @@ static int rockchip_pdm_probe(struct platform_device *pdev) goto err_suspend; } + rockchip_pdm_rxctrl(pdm, 0); ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); if (ret) { dev_err(&pdev->dev, "could not register pcm: %d\n", ret); -- 2.7.4