From patchwork Mon Feb 12 22:03:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10214599 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 ECDD060467 for ; Mon, 12 Feb 2018 22:04:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C94DC26538 for ; Mon, 12 Feb 2018 22:04:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDA45289C9; Mon, 12 Feb 2018 22:04:48 +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 0EBCD26538 for ; Mon, 12 Feb 2018 22:04:48 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D7837267679; Mon, 12 Feb 2018 23:02:57 +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 D200E267666; Mon, 12 Feb 2018 23:02:55 +0100 (CET) Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by alsa0.perex.cz (Postfix) with ESMTP id 9066A267634 for ; Mon, 12 Feb 2018 23:02:50 +0100 (CET) Received: by mail-pg0-f66.google.com with SMTP id j9so7340932pgv.3 for ; Mon, 12 Feb 2018 14:02:50 -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=fYxeeVfyAYg6oSi108P4Bojk8MG3tMBusWI79LytsLA=; b=hY1c7QEq8JcpVFla3ikGwvAgdjDXR/8lekQekvAh/3IiK/+gt0aFMWEetmaEX2sxiR NF2Woiqx9sQHX2hxD+C8u54I2llnZeHsjKqe6jXRA2R2zzR02iZHpFkaUTFMXxoo9h+2 c2P6U9YW59Vr65ZI5a9ei9U1SnsGLO+vWDfkjrwPQPqfFT13pbBcWecOJW4czEWbbu1G nyPCQ4Neuyu27QWUgdUULqkA6Ck0AbO0lEaAPJVeAQr4iDvDMDgokhfeU901bKRbDLs9 3S0vFPybWpDTVv8v+Jm8FXeoEROn0X28NWa+7Bo1nBEJByUIzTjA9c+A9vq9eC4XMBw7 chEg== 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=fYxeeVfyAYg6oSi108P4Bojk8MG3tMBusWI79LytsLA=; b=OOvCGMTmtee1+h/CywCLtCyAUOCTpsiE7vysxtmlLbxv7K2hQ+u/+x9VxjrJ95M5rT sChYgosscUePvWigyU5pwpKHbvojEua2hdLnv7DXLDbuG35E2S4j7FTcMljubn3e15Eo um0X8co9IkpBCsu4OJVzUopBm5BYQCXKfYTZprwHpLQUYkNLIaUqKjs2Tn+zgSgp7qGm 2uzyA8haygVtvr853GVCH/gye5PA3E3cRWWgpTmtAEQyWhh6ixbRiduHwoikSW+xFS7b 0FcJdNBiRPkCxqqT0O7RbPvu62Cyp7FyGuEE6WNriG36g6E40frbEwxkfetCox1LvQDJ KGXA== X-Gm-Message-State: APf1xPAqRHLkIHh02X7PaDc6azPrmQ63r9JCuIuVl2pYZbS3TqcoZOAl BhzFsaWm7YtlIdkoTLVZ2Gw= X-Google-Smtp-Source: AH8x226lqelqRdhqTQwOewnTF9FOdqFzWU4/FCm8dAJrESID83T2RYT8zvC3kk9L1tieor1GWI6GbQ== X-Received: by 10.101.102.73 with SMTP id z9mr10216453pgv.448.1518472969446; Mon, 12 Feb 2018 14:02:49 -0800 (PST) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id c8sm13386159pgn.72.2018.02.12.14.02.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Feb 2018 14:02:48 -0800 (PST) From: Nicolin Chen To: broonie@kernel.org, timur@tabi.org Date: Mon, 12 Feb 2018 14:03:17 -0800 Message-Id: <1518473005-14090-10-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1518473005-14090-1-git-send-email-nicoleotsuka@gmail.com> References: <1518473005-14090-1-git-send-email-nicoleotsuka@gmail.com> Cc: mail@maciej.szmigiero.name, kernel@pengutronix.de, lgirdwood@gmail.com, alsa-devel@alsa-project.org, caleb@crome.org, linux-kernel@vger.kernel.org, arnaud.mouiche@invoxia.com, lukma@denx.de, fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH v6 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 Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- 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 fc5768d..156f5132 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)