From patchwork Sun Oct 11 20:22:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11831213 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 686F01744 for ; Sun, 11 Oct 2020 20:24:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3787B20657 for ; Sun, 11 Oct 2020 20:24:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SF5BS/Pm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="huxRfQy1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3787B20657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=6DEJGfrrAOOSB4jxBs7fSQrumgvSVIQgCw+X4n5Tl/g=; b=SF5BS/PmU+pe3VgCp4t1mHaOa ksUSuquos0rhMfQrFgx6TtR5mg+rsIRiz9TComgguB00ww4cLvDWxzOh7SY1Nm+5g7WtN03bKqJV0 Ahp2Va1RGMlmvk+3VmZ3kYTfkW6JRnNoKSSK8rBHbqRuEPSHiaTJ+6Kcq4YOpFFMm38g8WEf3w0ju hD9FPDoEeYLsmY7gIxjTkWtRsEHhNBDBZnhr1puQAosg8NKVyt35VwrUtvpCrpXu6tJrc6c8QS38u xeGI6hBsoV4jHry+zgVaTkwxQsxMX69AI3dqHNEGZQ2GxeRBWoIMym3IOmSMTf0ptwySHuzyiDnEe ML8BMU9HA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRhrx-0002t5-QH; Sun, 11 Oct 2020 20:23:01 +0000 Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRhrm-0002pY-RR for linux-arm-kernel@lists.infradead.org; Sun, 11 Oct 2020 20:22:51 +0000 Received: by mail-qv1-xf41.google.com with SMTP id s1so1329953qvm.13 for ; Sun, 11 Oct 2020 13:22:50 -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 :mime-version:content-transfer-encoding; bh=Qc7Gl1pDl54reD6hY+CiR+N1U9m+7coVho5OHQ+G7Yo=; b=huxRfQy1nVMvnp7b6tJdyCptvLU/nlZoB4Y54X8r9LvWMldLOYTlBfEwzRu6sYIxis vW7fgNZmOgEoK4/sZtcJjcOkDV+45rgPmtghqzSdv1YnF0SzkrwRAxpxRE0WszBpUIuJ pk3TMt0Il8Crua4I5YrahTiUZlcXOzQE2iZBaEPsfR42vu3O+4qIFXTx9TkQsg8w2PHY C32A/UXRIsmtwXtMxCFDkp2Vaj5MymUL0TRyK/G2dCCyMaPdurQM+C+9Ehi2DzPftZuu D7Mzl41zNAKomwG+5V6QQsJmODTNlZE3snaP7iYDVTQSUhv/nL0vWFdIdNwt98SmpIBX y4hA== 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:mime-version:content-transfer-encoding; bh=Qc7Gl1pDl54reD6hY+CiR+N1U9m+7coVho5OHQ+G7Yo=; b=f+kYn5w+OCC4KftCakwaah7/ddfBdUa0RvMuvLuUcxz2N6jj+ZD1aockFpe7hLCAYb BhFtJKrDDcNWaPYBEF6xSFwrP1wKa7/eenlKv16LHJ7IDD7F1mKMBYQ3gsIBqTp29+sn eWujXhkLT1CsX3ZdNwnSG2Pis9Vc2v/gEinVlWUfX/zzyLDS4NvhtTxH9BvrRhnDpyZB Ca00OsE+CP/td3ioHK51Gu0UzSTq3kXbYOmOYdPY5Nc4s45ojS9sGVyKK6mSahlg/IJI llyJIIIeLr8ib0no7G2qiorarSaBloiGU3P9ySIIrhb18G1GBA8qwgzSLlYcNRsAknzU J6Ig== X-Gm-Message-State: AOAM5307QWjFT+9+OBsQ1s9rjNtS6YfHPJpQAwY9UgFGgfEJ6Uh1p5/M L05p8FaASLYoxXQJjqeVpOQ= X-Google-Smtp-Source: ABdhPJwt/1LkDKNRn2qBy0MTm6ZGT2I7f49RSR1PoNRrozMbVyyczsSoLMl4C5nqm3BaMjH3bC2K/Q== X-Received: by 2002:a0c:cc0d:: with SMTP id r13mr16175026qvk.6.1602447769387; Sun, 11 Oct 2020 13:22:49 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:48 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 06/14] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Sun, 11 Oct 2020 22:22:16 +0200 Message-Id: <20201011202224.47544-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201011_162250_938830_82943D5B X-CRM114-Status: GOOD ( 14.94 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f41 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [peron.clem[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The FIFO TX reg is volatile and sun8i i2s register mapping is different from sun4i. Even if in this case it's doesn't create an issue, Avoid setting some regs that are undefined in sun8i. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index d5eba58ff207..3fc0bd818539 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1154,12 +1154,19 @@ static bool sun8i_i2s_rd_reg(struct device *dev, unsigned int reg) static bool sun8i_i2s_volatile_reg(struct device *dev, unsigned int reg) { - if (reg == SUN8I_I2S_INT_STA_REG) + switch (reg) { + case SUN4I_I2S_FIFO_CTRL_REG: + case SUN4I_I2S_FIFO_RX_REG: + case SUN4I_I2S_FIFO_STA_REG: + case SUN4I_I2S_RX_CNT_REG: + case SUN4I_I2S_TX_CNT_REG: + case SUN8I_I2S_FIFO_TX_REG: + case SUN8I_I2S_INT_STA_REG: return true; - if (reg == SUN8I_I2S_FIFO_TX_REG) - return false; - return sun4i_i2s_volatile_reg(dev, reg); + default: + return false; + } } static const struct reg_default sun4i_i2s_reg_defaults[] = {