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: 10370371 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 5D07760116 for ; Sat, 28 Apr 2018 20:53:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4867428FB6 for ; Sat, 28 Apr 2018 20:53:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B4A228FBA; Sat, 28 Apr 2018 20:53:44 +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.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A7E7B28FB6 for ; Sat, 28 Apr 2018 20:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=dk22CmqXSaKnky9M/HqE/7I6Ow/cM4wy03ABavZT3jk=; b=gu4ucRi5f/Xt5lhBsxeDhYD8Yl kxKp76I9VxuALcE5/FRAogyL+zH4cj9XzmjP2Bd20dwiQLglQjAPecFTiZcQyZQtCz07TuCl9Bkbt cuBrguM/7YGhxxYvoqSQbMZDPECwsz24cSArBrLMTCjOSz3olh8EGNUbxfz6WXoWvmrs0jI43202O TwJlvcvhqTvZU+D4Rc1qcARXSA9ambpsEUHKjeI5EWQg/ehmBaF6SLyjZyMFYIl7L37n/SF/M0K7d 4xuoGhAat3bJm7/vSHhpjXOzLECKqGHXrGT/b8hnb9FH9W/3G6k0nm6mhDzBnzMiXTJC+Ea13FYEm +LdapcgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fCWqb-0008Gi-NM; Sat, 28 Apr 2018 20:53:33 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fCWps-0007zK-Gm for linux-arm-kernel@lists.infradead.org; Sat, 28 Apr 2018 20:52:50 +0000 Received: by mail-lf0-x243.google.com with SMTP id h197-v6so7354549lfg.11 for ; Sat, 28 Apr 2018 13:52:39 -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=RkWGpbqZIDZOJRqvsnv/Sy+EHIAnhFP9OxWvYQd/eNMyRrUEIfHWGPj5uTd8M36I0O hUOJlJLiX2/hIaJG73JWuXgWm/KEyNC9EAK2Dmmq3JUEgeoPTZCc2Nfbkzq0x6AAiZEK NdRXXyyxVmB/lHTah4FatmR4YdzHw2JVptNMORdSKbwcH8fS2WGlqL1IndpIHKxr0hEN VZd2bUx9VzIDzcfxI8pyO6PeEGnlyurVz1jpVptoPmaVYkbm/f01aERrQWH89+Yelvjz ERQlyeqlR8Ka900PT+0HUgQ2HoQ4bR6ZsZdcGBX1Y1UU2pyzRH1ycvSHaGK9XMM6Bura Bq7A== X-Gm-Message-State: ALQs6tBqvt0pR3e02QpMGqeIl6+IQ3M04DGfQhSeQVBjXPYcgUE+SjaA 7k8dxyDoYyrDY7KAXrsofIw0Duyd 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 Subject: [PATCH 3/5] ASoC: cirrus: i2s: Stop enabling I2S2 and I2S3 FIFOs 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180428_135248_571064_BEE35E37 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryan Mallon , Takashi Iwai , Liam Girdwood , Hartley Sweeten , Mark Brown , Jaroslav Kysela , Alexander Sverdlin , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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) {