Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1339222pxx; Fri, 30 Oct 2020 07:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFhuAl+zDViswftJiPRqW+6H+hfhOtFSSjrcmn7ip5UwIFpj99LwEB94QxUqX9Ji51+eCH X-Received: by 2002:aa7:cacb:: with SMTP id l11mr2715769edt.332.1604069564289; Fri, 30 Oct 2020 07:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604069564; cv=none; d=google.com; s=arc-20160816; b=Fnk2NoKbIlIRu4KYm/9jNjf4BXkeCXbJjIRbjM14wea4g3RyDA6WdMDEIdcyg23MMi uyTz1hRA7bn1CvS6s/B59j+Hgq65TzJQFbM9Mc5d8kd6K8xIj6Z2IoaP92aNUrRIqvBG jnuIu4O3Px8er67i2wQfS711Q38EEU2PqXxJkRZtXtRWdIekeE0Hv7y6V/KmvdFSXs71 8rO/hQ/go9dCTpC1Tgp5vR0gh+AVX+23EnOExt2IfDw06msnM7ifIwwVm1aPV9vq6BMJ 4tiadnd8Tr5Z7e0zrDiCW1Rs1LYORIccUU72DXLn6Um/UuVLLeZKegFBoG7XsKoxqVGf HKqA== 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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=LSal2BTnmzRVEV+y2T1wFAdVyvYeMgloPq2vUrFdU2L6K5JupwNBp0YzYTbwN8HGmr Lr6t4G1k7qLfZ30YaYwrP35kqYQcDxv1ZwN2JxJVLfkWyHlJqL4uQwBBgVWF8R5GfSBL gxVA/lEqpsoBxYvDno1PthsliZ+xhpx/nCyboC+cu5+SEZ+z9Y1eCNUVqaF2cnVhIWSA /eBFoEUqAKqgZNYxVRJzDwodb/Rq9BVNU6+iLIJSGYX8q5al+0JlzOw1VtXErf6Z2G+n SsP54eSroQDfP0VhF2axIe2OBlL2p5xiUwrkr0Ctj/4xn/uBBlygxusehYIwd+T8jr8I noUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="JDTfsx/6"; 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 s6si4336382edy.491.2020.10.30.07.52.21; Fri, 30 Oct 2020 07:52:44 -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="JDTfsx/6"; 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 S1727061AbgJ3OsS (ORCPT + 99 others); Fri, 30 Oct 2020 10:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbgJ3OrT (ORCPT ); Fri, 30 Oct 2020 10:47:19 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D67C0613D2; Fri, 30 Oct 2020 07:47:17 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id d9so889657oib.3; Fri, 30 Oct 2020 07:47:17 -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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=JDTfsx/667GOIoeFYPL8+ATV+JIP+HyQlZpIUdUyROlnl1laFM3ZrgazcxvxZ7z95C clBppZn1oOmwlHvERhmWPK9avsBm33h3wus6BFLujMt1WqDwO0UcENp8WkpCXHPJES6E gX3L6jK8L1QXL2AY8gagEA5kxWf26n0Hye3RM50qOy/LoyV7RoQ055PVTT6kqU+Arf14 E3gQ1UfR5p4ZS+kK+WdnAaxFXwri6m02swS5DPntXxrbWWZXIuoVQRJAjTFz05OozT7h +U5qggs/lDF8JmRVaO34plp1RY4RThzD4g4vt1mjvTnwEywxeQfGCjOrog15NPa7D7jD GbjA== 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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=te+HOLreht/w0ROmZ1pKXN5cy/tWWWE8C3zjRiWtOG/dvjilrOXWJFnTfdlxKrZNam t5VpKVxgaKB7LJimYYEmvkJF8FJYU+uRmppjvfz9NqvKgWDaKj4OGNC0ZF39OwWRkOXd xsUQBzmf6YSCdsR5Fkvdvh725g72L/CI3i/xXBapk3jwxeskW7YQPer5cdT6smWKKRvE xsdKHcMB/vC79VUj/xabhFGgxP3WhaEwu4Y2twHfkyMuca21ZKpAUl8W44l9QBI7ILot 3rcaK69H4IE52uH8ObQiMsfgVzea/+B60607279uFLnsXe8Ex/qubsurwaXkR1GOzSey APLw== X-Gm-Message-State: AOAM531prvRCoFbgPSKFVoUgyIEZM89Pc/IzKfI9r4PACaDaYYT341+1 pr2f/C3wq+htlgPimjeD7Rc= X-Received: by 2002:aca:ec92:: with SMTP id k140mr1933772oih.173.1604069237021; Fri, 30 Oct 2020 07:47:17 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:16 -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 v10 07/15] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Fri, 30 Oct 2020 15:46:40 +0100 Message-Id: <20201030144648.397824-8-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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 786731191d90..003610c0badf 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1162,12 +1162,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