From patchwork Sat Apr 28 20:51:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 10371709 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 2D2346038F for ; Mon, 30 Apr 2018 12:40:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D07328AEB for ; Mon, 30 Apr 2018 12:40:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1183028AF1; Mon, 30 Apr 2018 12:40:46 +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=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham 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 4498D28AEB for ; Mon, 30 Apr 2018 12:40:45 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E8936267641; Mon, 30 Apr 2018 14:40:10 +0200 (CEST) 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 0CDB726735E; Sat, 28 Apr 2018 22:52:40 +0200 (CEST) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by alsa0.perex.cz (Postfix) with ESMTP id 473BF267235 for ; Sat, 28 Apr 2018 22:52:38 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id j193-v6so7362105lfg.6 for ; Sat, 28 Apr 2018 13:52:38 -0700 (PDT) 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=DqCPLqtgFkjbguwrDhgL7oWASHodY7AbKJ9UWpEQve8=; b=dre/YF4pNU//Dc0edTKgky0vN2yaScbyDnBKmaqoT307LHFiBTtq+UuVGCzROMeFMD qvQeqcxLgRVlTtwksk7Ld4CA2BIRNo+cAsybzglgVsW3j2xGJ5PnT3LeFyRh3KX+wwaQ uTzIfXQ8MXnvUkuelDctFuIvj1kB++IWsuijP24jeZYh1qhYfxBRZs31lCdYe+ZL6ZcF dIlbeCgxSHE168cBm781QMcNu7rH9G4Keml745VYAtVjab62HMuSZC6Ho4SHXTGPxufY 2iszABerh6xiLUqrACRgof1YpSTR9I1lh2uRmNpz6M4j8mCO869/PfO3eI9XLLiXaNBU Uk/Q== 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=DqCPLqtgFkjbguwrDhgL7oWASHodY7AbKJ9UWpEQve8=; b=bDEg/QQ75JE10zE+E1uiSIFWtUZy121Wv91DPxdbZO5i9piF8q0LAxmHMjY63d4uGV RrPKbIAvxuyRAB7ZGWYwH4g+QpJVh2+hBJ9aXLGgpeNDTIZgZ6TgsrMOY9Ht5kdQ9woT iniBNlUVVIcvWI30pxpbkn9NWW/SwO3XY2rvx337r5RZyVWtJwYoYgUw1202Lc+m6a1Y GsQerjZj7nlaFATBqGm1jXeVWU+xc5oZZn8tyklmVNL0BNx0cS31Nr/ACR8bbb52eNYo VMd6NkfXZRj83uEc47C5Ja/2XcEPlka+B01aBnwgmfLYZufhgbjtPtQnJULhB+ASzns8 j9vw== X-Gm-Message-State: ALQs6tCM5GMYCtYU9iAKRiA/EPIvqJmRd6j+UxH2oUuIAk7V2Afu34D0 pWbA745yDzSUoZF0cu+EXsQdRAwQ X-Google-Smtp-Source: AB8JxZrWp3uQlPkwWUWRNOkemgLQ0X4wbjAnsNlNOKSiLxNEMHEa2TkqyL691PwN+MZOJQ2weXLOFw== X-Received: by 2002:a19:fc04:: with SMTP id a4-v6mr4367810lfi.136.1524948757762; Sat, 28 Apr 2018 13:52:37 -0700 (PDT) Received: from giga1.localdomain ([195.245.44.8]) by smtp.gmail.com with ESMTPSA id t24-v6sm852578ljg.65.2018.04.28.13.52.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Apr 2018 13:52:36 -0700 (PDT) From: Alexander Sverdlin To: alsa-devel@alsa-project.org Date: Sat, 28 Apr 2018 22:51:40 +0200 Message-Id: <20180428205142.31921-4-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180428205142.31921-1-alexander.sverdlin@gmail.com> References: <20180428205142.31921-1-alexander.sverdlin@gmail.com> X-Mailman-Approved-At: Mon, 30 Apr 2018 14:39:59 +0200 Cc: Ryan Mallon , Takashi Iwai , Liam Girdwood , Hartley Sweeten , Mark Brown , Alexander Sverdlin , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 3/5] ASoC: cirrus: i2s: Stop enabling I2S2 and I2S3 FIFOs 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 The driver never supported more than 2 channels because of ep93xx_i2s_dma_data[] supporting only 1 DMA channel in each direction. Stop enabling two unused I2S controller FIFOs, this will simplify future interrupt support. Signed-off-by: Alexander Sverdlin --- sound/soc/cirrus/ep93xx-i2s.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 0dc3852c4621..42cc6d22baac 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -98,7 +98,6 @@ static inline unsigned ep93xx_i2s_read_reg(struct ep93xx_i2s_info *info, static void ep93xx_i2s_enable(struct ep93xx_i2s_info *info, int stream) { unsigned base_reg; - int i; if ((ep93xx_i2s_read_reg(info, EP93XX_I2S_TX0EN) & 0x1) == 0 && (ep93xx_i2s_read_reg(info, EP93XX_I2S_RX0EN) & 0x1) == 0) { @@ -111,27 +110,24 @@ static void ep93xx_i2s_enable(struct ep93xx_i2s_info *info, int stream) ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 1); } - /* Enable fifos */ + /* Enable fifo */ if (stream == SNDRV_PCM_STREAM_PLAYBACK) base_reg = EP93XX_I2S_TX0EN; else base_reg = EP93XX_I2S_RX0EN; - for (i = 0; i < 3; i++) - ep93xx_i2s_write_reg(info, base_reg + (i * 4), 1); + ep93xx_i2s_write_reg(info, base_reg, 1); } static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream) { unsigned base_reg; - int i; - /* Disable fifos */ + /* Disable fifo */ if (stream == SNDRV_PCM_STREAM_PLAYBACK) base_reg = EP93XX_I2S_TX0EN; else base_reg = EP93XX_I2S_RX0EN; - for (i = 0; i < 3; i++) - ep93xx_i2s_write_reg(info, base_reg + (i * 4), 0); + ep93xx_i2s_write_reg(info, base_reg, 0); if ((ep93xx_i2s_read_reg(info, EP93XX_I2S_TX0EN) & 0x1) == 0 && (ep93xx_i2s_read_reg(info, EP93XX_I2S_RX0EN) & 0x1) == 0) {