From patchwork Mon Jan 15 23:16:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10165473 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 8CBD7602C2 for ; Mon, 15 Jan 2018 23:20:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 741522834A for ; Mon, 15 Jan 2018 23:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6F1E283C8; Mon, 15 Jan 2018 23:20:23 +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 2D48127FB7 for ; Mon, 15 Jan 2018 23:20:14 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 097F626768D; Tue, 16 Jan 2018 00:17:46 +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 31BD1267630; Tue, 16 Jan 2018 00:17:37 +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 607F3267639 for ; Tue, 16 Jan 2018 00:17:32 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id e76so8735908pfk.1 for ; Mon, 15 Jan 2018 15:17:32 -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=OvPft+Hz0AukkcxyFQIuYsTJes+tLJgVKFWCvv3aCIXqxme6BvOymqXaUMzMVcZF9h foxGnVLP2c/QEipLfQHYMqU6qYgZEYnWoaDSU6p21mKgU6Ym+xYR8tsX4mMsrsLsM8d2 YPigqeisviW18ud1SpVzmA2FWR9Xae943bGPJ5aDJ4oYHzxHVTB0heIbbIXS3wm/vxP8 94xGKXX6PVPX0K7dEUgVnnhlnljoJrbGN0X6dtNIPGJ0/E3BXnUjRJlocWgIZ22eMXp1 04MmWk9qwHt89bDZW8V1UImsBsBn3tX3cSNbQFBMU0gMUdcjNvs/1PoBfEjyGpnAFZQz ladA== 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=VFgs1GovgCG2HT3kG83KNZi9sn3nyYuwN2kzlFBAPnkx7EdN5fKw1vSXy7A7Fe7vEk T0n+htZW/md768BT9ZkGr7LXVXxC2ogzOwZ2H76iMcxvGcJ7WlpozcKZaazkPvK91Fng kW1ovS3PnK4va94bP/PBTp8SKfVowAVDvYwTBeAhnfn8O6u3ygsgrRBLdUtk/GdeljDP PqluMB++kFpoJVfOI2W+2rgO/0OrpEghsHnCcY/vIqfR4mMJP9XmIzKN1GT6bAIZOerV sB/H/3j1k6wB1nfUX84mzh9wbbJD7Kkjw00yS/XLag0yqaCSRm2ArjARdhoBEEE7zmjy J3Lg== X-Gm-Message-State: AKwxytdCXdC4VLkqTZctIfwXrMTnxV1C2nX70Fxzl2LXZ9AOf/WOQfbr 8G3bAzEhKcNFaiZazsVyyCs= X-Google-Smtp-Source: ACJfBotgSWvDm2xTWCpxj/WCxOvSYszwprZBbqK7/MeFcSRXGccX+LiMQ7qjp2GIsTaDEaY73i1rpQ== X-Received: by 10.99.126.73 with SMTP id o9mr10975894pgn.429.1516058251706; Mon, 15 Jan 2018 15:17:31 -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 b6sm776442pfe.85.2018.01.15.15.17.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jan 2018 15:17:31 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Date: Mon, 15 Jan 2018 15:16:24 -0800 Message-Id: <1516058192-65519-10-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516058192-65519-1-git-send-email-nicoleotsuka@gmail.com> References: <1516058192-65519-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 v4 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)