Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3686404pxu; Sun, 11 Oct 2020 20:23:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr9tOKuRLhfKDxU1DTEOsJiJ/ucUsCqJjLi7KdzyRs0Fr+VQ5ozI2kWEH3tyWWJs+Q28gw X-Received: by 2002:aa7:c347:: with SMTP id j7mr12378346edr.353.1602472983394; Sun, 11 Oct 2020 20:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602472983; cv=none; d=google.com; s=arc-20160816; b=yhwdGnHHrkU1/y7REmu/I4oPHmCAHBzzyrtKUySksfDkqHAuaK1VoffTkcAB3B16BQ w/DI4rJJzkXFyLak3K2uJkqTax6A7HdVr/I8V0a75ywy8t5pEPQjjeDFds9mXhfwRnk7 ZycggdEFzNfL/Xpq9QKDk4Ulhznvt1BETCgdbKXff0w/6YhJMydETBgZgGth1tcALc81 iEqIvQjk1XXJeMUOo8Nc+TYZoP5tHFjqgeMCva0A1gHZ+CGVnPsrqj+3pR52N2R8z62A 1cnjE6HwGii12/3pGin36vgvaboPyqzMdx8I1LsTtFhFMmsMdczOjlKrCrjWnjlivf+m ArEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qc7Gl1pDl54reD6hY+CiR+N1U9m+7coVho5OHQ+G7Yo=; b=r70TP8LSBtsILMq0ll/0bDEJuciO0lGULOIDbmN5JtWdhDbnSqBYzSgXteG6cp2K4F ANyUJjk1kIceOXqD5erQFF4aPCuKZSd8jclephI1CpY4FuZIiPii3LcyJMG3EeDI2If8 Clv+0B0/WboK8BuFAPYXtW9KfzplfpbXyUB63uO4vIWQMLmZCtUUnyOVfBYXBsyroI/f s30HaD57Vhuo2wNmIEM5ciQSn9M9n6yvqCaAUZ077Q3baYt6M2UVgUmg0f9llxmVjA5l aAsLWuqDljwnsD1ie5uhqvV3AKj0s+JSHj7nCr6R51KGYSGHCpoHbvLfIYfMUziTFMBX gsYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=huxRfQy1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si10856744ejt.311.2020.10.11.20.22.17; Sun, 11 Oct 2020 20:23:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=huxRfQy1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729264AbgJKUWz (ORCPT + 99 others); Sun, 11 Oct 2020 16:22:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729239AbgJKUWu (ORCPT ); Sun, 11 Oct 2020 16:22:50 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CBEEC0613CE; Sun, 11 Oct 2020 13:22:50 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id b10so5261092qvf.0; 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=nOQZLIC2BCm0PSZYfCH2ewpc4wV5MSoZJUxAhfkgXM4LceL+qADc8e4R+YJRpI5s5c wZTZ5IUrbCxkw5/CisYjGvNvyV6Kl4BwOjaAFow7Xp59V/8rBd+dg+th6gmOa900snAW MJEkgSAbcgNsTJ9We2i9equK2oVcFXhWNsPGOYqxEgo3sBlg9LXX1IikVsHSJAeWkL3U TLx9hWYtwDWjT2Z946vNzpqF7oAsU7glXhIJlzsiauv2vRk6Fkxk09F0/+K//0/e4NtS Tx6JbH+uw5v2QATYBI38unVpwQBKaYTTQjd/Qop1DoNGRBZ162mtNgcYIqvzYlHuhUhb IM8A== X-Gm-Message-State: AOAM5334lHE29IoVOn2J/e8zkWo2ZWQ9dADG1Y7WQn3+Xelv5LCbHNNy CwjJkUhXXvHQKix1WCOUrGs= 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?q?Cl=C3=A9ment=20P=C3=A9ron?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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[] = { -- 2.25.1