From patchwork Mon Jan 15 04:21:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10163011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 11075601C0 for ; Mon, 15 Jan 2018 04:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 132AA28904 for ; Mon, 15 Jan 2018 04:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0802F289FD; Mon, 15 Jan 2018 04:24:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 424DA28904 for ; Mon, 15 Jan 2018 04:24:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AF01B2673A2; Mon, 15 Jan 2018 05:22:34 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A2A0C26738D; Mon, 15 Jan 2018 05:22:29 +0100 (CET) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by alsa0.perex.cz (Postfix) with ESMTP id 6E7A926735F for ; Mon, 15 Jan 2018 05:22:26 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id p1so7474214pfh.4 for ; Sun, 14 Jan 2018 20:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sR8B8z7IjNzHteHLGIt7SUVx/m1bx+Bf54+FDevnRDs=; b=aq0rWJF2ts8P96J5+32XRfGsefndcznRy85WnS3xDU7snNTPErvyNr5GiN7W2OnVS6 w1SG6nlJKluuvrXmmWcFYAW9lqdytlcn57/ubihJ/JcGaZbIULmx1ARsz+ClugiGcOQf 78WUs7PJggOsNMa2FVKzEtGIXNQeO2E6aCjLokMn2Y8q6aJph3S76uiBhmEzwQ2Kpcnq OCrCIca3wVo5x0njzfrlN6P9KXCzlObkSK7xEYEg1Q0amkfTa4JsBlCqXr1EUBdAHEZa Q7VgvMkWBJovrkIOaHQwH8nE99LCSzM5fm2reZa7Iima/KTfcinKefL1xSPzrXjxh4Tc N1iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sR8B8z7IjNzHteHLGIt7SUVx/m1bx+Bf54+FDevnRDs=; b=IuFz15cifptTJk4B+sFqRrqimZPzIeBsuNSJpfB+143DbEqz/ueTI54MUPoYO8foEH hIFI0xRWsbQSuuPBW7eOkMRbYJMdMBZ/7g6P314aMa+NDnQq0tUcCW8xo0NL4wgEyqz3 aSsTodu1e0dRpmsdVpAGilIIeR8Rms29MUIcOnVHhfd8SHG9LHmlBFNJPNEsINeEAD7l lQxNxlSTVC9Rl9Iji7zqL2q/XEnC99MAap5yG9Niy4ayrV+GA6ifqmAKYPcV5ZR2DVTv qLJfwcxj+4nx2+wDz+PSKd7iOsafDGrJI3+ACsMpwju8JMzdKkzTzaogPFo2gejxKOuF on0Q== X-Gm-Message-State: AKGB3mKsXwKpqOPrprvzHn+Hc6LKUkVfBezEvByI+sLUj9r5QCQU4XJ8 2sWrL+BWPCf7IQq5AkONt2pUGQ== X-Google-Smtp-Source: ACJfBouJgY+wrFrcNGthQ5bzHRiHrZ7AW4KcGwel01b1fPtM7gYOYEke6egT7FpmwhRcS0BcVUa4Hg== X-Received: by 10.99.140.65 with SMTP id q1mr26477064pgn.280.1515990144822; Sun, 14 Jan 2018 20:22:24 -0800 (PST) Received: from Asurada-CZ80.localdomain (c-73-231-2-134.hsd1.ca.comcast.net. [73.231.2.134]) by smtp.gmail.com with ESMTPSA id v7sm17011018pgs.83.2018.01.14.20.22.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Jan 2018 20:22:24 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Date: Sun, 14 Jan 2018 20:21:19 -0800 Message-Id: <1515990087-11598-10-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> References: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> Cc: alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, caleb@crome.org, lgirdwood@gmail.com, arnaud.mouiche@invoxia.com, lukma@denx.de, fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH v3 09/17] ASoC: fsl_ssi: Clean up fsl_ssi_setup_regvals() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch cleans fsl_ssi_setup_regvals() by following changes: 1) Moving DBG bits to the first lines. 2) Setting SSIE, RE/TE as default and cleaning it for AC97 Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- sound/soc/fsl/fsl_ssi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index b76a517..e5efee2 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -580,18 +580,16 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi) { struct fsl_ssi_regvals *vals = ssi->regvals; - vals[RX].sier = SSI_SIER_RFF0_EN; + vals[RX].sier = SSI_SIER_RFF0_EN | FSLSSI_SIER_DBG_RX_FLAGS; vals[RX].srcr = SSI_SRCR_RFEN0; - vals[RX].scr = 0; - vals[TX].sier = SSI_SIER_TFE0_EN; + vals[RX].scr = SSI_SCR_SSIEN | SSI_SCR_RE; + vals[TX].sier = SSI_SIER_TFE0_EN | FSLSSI_SIER_DBG_TX_FLAGS; vals[TX].stcr = SSI_STCR_TFEN0; - vals[TX].scr = 0; + vals[TX].scr = SSI_SCR_SSIEN | SSI_SCR_TE; /* AC97 has already enabled SSIEN, RE and TE, so ignore them */ - if (!fsl_ssi_is_ac97(ssi)) { - vals[RX].scr = SSI_SCR_SSIEN | SSI_SCR_RE; - vals[TX].scr = SSI_SCR_SSIEN | SSI_SCR_TE; - } + if (fsl_ssi_is_ac97(ssi)) + vals[RX].scr = vals[TX].scr = 0; if (ssi->use_dma) { vals[RX].sier |= SSI_SIER_RDMAE; @@ -600,9 +598,6 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi) vals[RX].sier |= SSI_SIER_RIE; vals[TX].sier |= SSI_SIER_TIE; } - - vals[RX].sier |= FSLSSI_SIER_DBG_RX_FLAGS; - vals[TX].sier |= FSLSSI_SIER_DBG_TX_FLAGS; } static void fsl_ssi_setup_ac97(struct fsl_ssi *ssi)