From patchwork Mon Feb 12 22:03:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 872455 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgLTY5xcgz9sRW for ; Tue, 13 Feb 2018 09:49:53 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ARLy0LUN"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zgLTY3v6gzDqHc for ; Tue, 13 Feb 2018 09:49:53 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ARLy0LUN"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c01::242; helo=mail-pl0-x242.google.com; envelope-from=nicoleotsuka@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ARLy0LUN"; dkim-atps=neutral Received: from mail-pl0-x242.google.com (mail-pl0-x242.google.com [IPv6:2607:f8b0:400e:c01::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zgKRS4BK5zF0q8 for ; Tue, 13 Feb 2018 09:03:00 +1100 (AEDT) Received: by mail-pl0-x242.google.com with SMTP id m19so721057pls.5 for ; Mon, 12 Feb 2018 14:03:00 -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=eT2adfbY7D5RUdVkhIZZgNwlQ5sRlUzEB8IzTdA0P2U=; b=ARLy0LUNS5CeDi/CzxFW8E8lAlQLBy4hv9jBbGOmQcYXJJH96KIumoeA7/bJfvLoWq 20wphVhCFTUqxnpYWNHrk85/N/fdnxxsDLtzWMfF6ob9NaLpErFsmBJi6NPQ6qHRYteY HZmHPPdSz3BoUnAWif6U+Dla/3vviHk2RJvTXpcXzN0QtIXquMY7V8HiF2iN+WQXqZa6 PiaEOyUardj2icx//b3K+jl16foOwtqitXXnxlfUMr09X6O9p2JBvz47mEzDjmm3GbM8 BzADixuWtJRF8p4R8jOz27erYvCqY4EDhXyXxNQBVZBqWdrudn+5SS8y8FcTls7CMu7/ g/3Q== 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=eT2adfbY7D5RUdVkhIZZgNwlQ5sRlUzEB8IzTdA0P2U=; b=nCrmfH2a6T+XzQ6MMNVd8xZXuESsVhM0l3/JLc4FNuW5nBUKimn6Dl5n0XPeW0e8Q2 MrGjsEnagZoSIhGtPzFfokBOzhumt2H4p/kmKWhz8QbjMrychw5WUi/epQ4lYN/YQk3M j3H0NVpyeVgkl9aFOUOc+kkVL1cTlttNawuSvbMsIvYfSC8uTvaqWAdzHh6PiIMMGNeg OibqaPp8zsg5hpv2pxMRCg97SPb+zSnJ1eB3MA/E4G6bpW/5GB/mT8Y+ylW1NQAr5TIW y5HXL+JnhwMciKJIkkaDk/RBWeaGtIUIu+E8Dau4eNVQfcYhxBeuyuD+J5BhwB8N7yMj oRxA== X-Gm-Message-State: APf1xPBRTR6clrZ4cW0jA1rc1Bij+iJ4cPDUIE2LjkFKorhhm6WAZrZU qsYQQoE9V4KgjLlHcEljCJw= X-Google-Smtp-Source: AH8x2263Q8inz54GIcG8i+nypWlgggUgiNneyVCM96q3SeyLlecT4Gk1ALA3VoBPOa+qVn+Hma0e0A== X-Received: by 2002:a17:902:8498:: with SMTP id c24-v6mr11876686plo.450.1518472978831; Mon, 12 Feb 2018 14:02:58 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Feb 2018 14:02:58 -0800 (PST) From: Nicolin Chen To: broonie@kernel.org, timur@tabi.org Subject: [PATCH v6 17/17] ASoC: fsl_ssi: Use ssi->streams instead of reading register Date: Mon, 12 Feb 2018 14:03:25 -0800 Message-Id: <1518473005-14090-18-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> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Since ssi->streams is being updated along with SCR register and its SSIEN bit, it's simpler to use it instead. 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 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 5bc67ad..0823b08 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -803,11 +803,6 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, unsigned int sample_size = params_width(hw_params); u32 wl = SSI_SxCCR_WL(sample_size); int ret; - u32 scr; - int enabled; - - regmap_read(regs, REG_SSI_SCR, &scr); - enabled = scr & SSI_SCR_SSIEN; /* * SSI is properly configured if it is enabled and running in @@ -815,7 +810,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, * that should set separate configurations for STCCR and SRCCR * despite running in the synchronous mode. */ - if (enabled && ssi->synchronous) + if (ssi->streams && ssi->synchronous) return 0; if (fsl_ssi_is_i2s_master(ssi)) {