From patchwork Thu Jan 11 06:43:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10157313 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 2FBD1601A1 for ; Thu, 11 Jan 2018 06:46:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 214EC286AE for ; Thu, 11 Jan 2018 06:46:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15700286B5; Thu, 11 Jan 2018 06:46:31 +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 500E0286AE for ; Thu, 11 Jan 2018 06:46:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D23BC26787C; Thu, 11 Jan 2018 07:44:24 +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 7B9C6267832; Thu, 11 Jan 2018 07:44:15 +0100 (CET) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by alsa0.perex.cz (Postfix) with ESMTP id 94D4F267861 for ; Thu, 11 Jan 2018 07:44:13 +0100 (CET) Received: by mail-pf0-f196.google.com with SMTP id d23so874101pfe.9 for ; Wed, 10 Jan 2018 22:44:13 -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=bZtPr6IGfFKV8QA2hbyBIfngB1Vxaoa0vPtevAFQpcw=; b=McAh2GndNRUG1WSs/8x3zG02Lq5tHyuJTg4/mpqo+AObKd4McIEbYlDGmfhK5h5n0r hoz7Lyy2jcsQcpbe/aoaYTui/ZPx1W2xnP6Ry878L2g8Zvg/Qoujtbla5DCOut3vAnxX vdbxcV82bQ2FbIlJ4pN0o9y0nEKAjk1sX1WcJMMcEXyuUKQxT6+pEwR4ms3oI9lHHvU0 U77KQsrXfcXBnnMN4bKxxRi7bw60kg9iOmpy2LFjBQ0qKvlV18ksBjBZeStejcSMVleF OEnxMMilFU122s2iFCpOY4SmcsQ+tu7dtz9DUnjtiEPH73dQuW0Z8h/3Vz0ll7mWM99R K9nw== 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=bZtPr6IGfFKV8QA2hbyBIfngB1Vxaoa0vPtevAFQpcw=; b=EdFqH3eAd/h3jOoMWcUq4tPAAmNfRvTSD+32C0KX0i67vxbZf2h/qUCrDateiv4uF4 QbdAhSXndsiq9MbQ8nyq0mQu7ilN2+0fDJuRUXtHOL9LTjQoF6FLEm7uN2cyQRa7Sngg PixXEX/BeKSytVqHQ6BUUNmV4es9vtBw+cMutGWtGhM20Z42OhW74W2Oi+0PW9yKTVfK aE22DMU68/GIBRLdxX5376DazHq2eamNJwfx1JzZsaFPQANVFyFrGZqD72uJX2OOprMm +h/QgLuVp6pBg8WkHDnztoR5oH5wzh/pwKjy2JR570H14bViBcquNNt3SPwh8GlG+5qN uISQ== X-Gm-Message-State: AKGB3mI+k8SaWyysNTHKjMFQqV4uqNgl6e2lnXdNYbKBuam6cXdQG+6B peu+Vg96pGU8of/P9oKyKco= X-Google-Smtp-Source: ACJfBotxVjE7m0ASJfX0fhd6lQRF6Z0BQTe2ECV82fSU21x4WhDAwvE/AeSYvjtCFY7wCCEFy5pbIQ== X-Received: by 10.84.248.145 with SMTP id q17mr16728872pll.184.1515653052547; Wed, 10 Jan 2018 22:44:12 -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 b69sm27959666pfk.128.2018.01.10.22.44.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jan 2018 22:44:12 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Date: Wed, 10 Jan 2018 22:43:07 -0800 Message-Id: <1515652995-15996-9-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515652995-15996-1-git-send-email-nicoleotsuka@gmail.com> References: <1515652995-15996-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 v2 08/16] 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 b449b8b..4399a22 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -575,18 +575,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; @@ -595,9 +593,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)