From patchwork Sat Oct 3 14:19:42 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: 11815293 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 856936CB for ; Sat, 3 Oct 2020 14:25:02 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 913FE20659 for ; Sat, 3 Oct 2020 14:25:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Od/Ewo6d"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="La5vwbHb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 913FE20659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CA5651AA2; Sat, 3 Oct 2020 16:24:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CA5651AA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601735099; bh=kEYm2IuEqleaXxqG4EG/QCxSPR+pF5kVYM4Bi75MLzI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Od/Ewo6d+LyIP8nNcmWQJsayIjk+WdXYydasyk0g6b/LApgH6CKSHeh3WMFDx+iPT /S49ASHXbNUZx7ZDMZWAHA3WCNn5qb08JUtNd+IGEi4dSd31k6oErLiq9fWpbjyE8m AxqHxSh+iVINaebk4D6wGn+XMIPV8OjjKzlSLA8s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 78FC4F80306; Sat, 3 Oct 2020 16:20:20 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30FA5F80303; Sat, 3 Oct 2020 16:20:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C0413F802E7 for ; Sat, 3 Oct 2020 16:20:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0413F802E7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="La5vwbHb" Received: by mail-wr1-x442.google.com with SMTP id h7so1232446wre.4 for ; Sat, 03 Oct 2020 07:20:11 -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=GG2/Dd/Pfj/stdMqywLnjL8coxrUAoJ9mpk4ojfM8Fo=; b=La5vwbHbR1jnuvX12uTDXOVFTg8mLqrERM77iYNSjm1KNsRBosLxvWRu0yvxuJfMEJ oTsZwReZD2qO+v6/quG0T2tQZmS6pdJWwBlnypjIAU3upGKteJHeCCCgvo7KKkKVSrqq 4/IUGA5cCxNkXiZ2ma58E5VilDg+IjTfRom4NzUYx0WVar9xknPKMDaGg4mbkYLsp1PZ Q42NrBqaSxt/eGWeeA9ySF8Fk2+xGKCMmgx+L/ba3Du0jkHx4S3apzU3jDydVaKz4wd+ nJzuo/0DzG+s6gNa2txaGf4x/EJhSyCWAPhOTvEbd/A2L93VThZQQ5P0oki0G8F40xEr 9ktw== 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=GG2/Dd/Pfj/stdMqywLnjL8coxrUAoJ9mpk4ojfM8Fo=; b=KV2uhzI4yKniiAFFNoLFR/ey/qMCVFqbPq9FTQ53zVjk1z1+7gUM/e20g1bDJiquAH 7IvZHiN0m0EBCGzwoHbmYqBvr3qcdsqLEbzIQqzXfJtRF0H26TxmCJfW8SheEFdmPl8O bPHtQWUGTqLGA5NAtG78oduWMS/3DW2xQL4ORS5WOM27MOF09eHm4bnWORHr5oDHnaOK SDsqlDSjE485ppRE+Zirfh088YXV6dgMSGkNXmYXxoGAYrwFry0yCK1hPMK03R9YoGSM KGh8BUCVOd6cGldQ1JDWVQcjfE89huzZMNJmmb+L/tFLnSR0FbM0cGW/GUwV1aciNvY7 ZGOg== X-Gm-Message-State: AOAM533GzHQodMviro9Y+yPOeZuKvwYTQ2zlgsMYBcUJpLJWkH+EMzLo o7SLHKJyu0BQ5IMPXSiraVs= X-Google-Smtp-Source: ABdhPJxGRE4IDwwLwXLF61O5XwpP4zJXdg3TDS4HcNO71kQwZRKme1VQ72oK2Ri92ijto3Kb6RNZVg== X-Received: by 2002:adf:e407:: with SMTP id g7mr2338694wrm.349.1601734807424; Sat, 03 Oct 2020 07:20:07 -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 d18sm5417473wrm.10.2020.10.03.07.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 07:20:06 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v6 06/14] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Sat, 3 Oct 2020 16:19:42 +0200 Message-Id: <20201003141950.455829-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201003141950.455829-1-peron.clem@gmail.com> References: <20201003141950.455829-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 ba7514849b73..92671eb94db9 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[] = {