Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2616239pxb; Sun, 17 Oct 2021 20:36:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNWLNGOdZTZTKFYzd6wqeO/sImWpn2wwtK6Q8gYWVcd6nZ9Gj4E7n0xwHer66N+dG4TQnu X-Received: by 2002:a17:902:758b:b0:13f:974a:959f with SMTP id j11-20020a170902758b00b0013f974a959fmr14850246pll.40.1634528214258; Sun, 17 Oct 2021 20:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528214; cv=none; d=google.com; s=arc-20160816; b=vhpU8Kqw4/jbvm81FQwFtbCQdyZEiJ2Iek0Rs6VV8zurp7tFCOO8RRVoSSFZFA06UJ Bqlx/bxTFXFMzheLYP6LYNMZPi99RWDyS8R10aPerAZcTehWnEVNRXgGGvnZHGWTaXks 4KUkvUiWBi234ZDPtBrw6IOVysxtpFW01FGclZ3P1FWt+J0fSZxr4lEsGE8QrFjSXHJU gHm1kHHBMClNvl8dej5yz4MfqLlAmSp8haRbAa7PArJwViGzjq4lEG4roW1yW/jLNPoV YN2cqTl+FFiB+O5E13Mv+9xmj+RS0XndWegJqbXECrezI6na3ABGU4G/b/mvo3XodBPw A4vg== 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; bh=9woCmWMpPvv/KSrTTT9kdPlJ2jqdfpbiGHxopKdbYgU=; b=YM3Ir4A+nlgNOqFLpaQFDTm2kiEJ6TzgffhE9fnywKNjhwAZOCOnF59ZCDDffXhQlL svtTSI8wLq4LLpBLtysadcf0FSnmZx+ZbiSyT4dourw4AK5/tLuiZhVFBk0YcbIViHX7 YSJXmVTkqZipP+F+FZ0GqA+axidbvfxclzMzMavz5X+opPICOPU07J8wkr8ptAXm1+gg HJH3QRhJxheG7FNZPRyUGD5t62mKUlNZWAEXZfIZwuvlx338RzBzYKIjS+re2+V6emDK u1xtvYJ6S80F2dLbUWt6XxoDs2X9VbNgT+gOQCy/7OHtEzQqiSiAJ2zuUkLYoXykxd61 mf9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c24si20986820pgj.440.2021.10.17.20.36.41; Sun, 17 Oct 2021 20:36:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238742AbhJPPwq (ORCPT + 98 others); Sat, 16 Oct 2021 11:52:46 -0400 Received: from gloria.sntech.de ([185.11.138.130]:45836 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231824AbhJPPwp (ORCPT ); Sat, 16 Oct 2021 11:52:45 -0400 Received: from p508fce7c.dip0.t-ipconnect.de ([80.143.206.124] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mblx1-0007WI-5i; Sat, 16 Oct 2021 17:50:23 +0200 From: Heiko Stuebner To: Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Philipp Zabel , Nicolas Frattaroli Cc: linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] ASoC: rockchip: i2s-tdm: Strip out direct CRU use Date: Sat, 16 Oct 2021 17:50:22 +0200 Message-ID: <1782571.1Dz21PRzoM@phil> In-Reply-To: <20211016105354.116513-2-frattaroli.nicolas@gmail.com> References: <20211016105354.116513-1-frattaroli.nicolas@gmail.com> <20211016105354.116513-2-frattaroli.nicolas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Samstag, 16. Oktober 2021, 12:53:50 CEST schrieb Nicolas Frattaroli: > In cases where both rx and tx lrck are synced to the same source, > the resets for rx and tx need to be triggered simultaneously, > according to the downstream driver. > > As there is no reset API to atomically bulk (de)assert two resets > at once, what the driver did was implement half a reset controller > specific to Rockchip, which tried to write the registers for the > resets within one write ideally or several writes within an irqsave > section. > > This of course violates abstractions quite badly. The driver should > not write to the CRU's registers directly. > > In practice, for the cases I tested the driver with, which is audio > playback, replacing the synchronised asserts with just individual > ones does not seem to make any difference. > > If it turns out that this breaks something in the future, it should > be fixed through the specification and implementation of an atomic > bulk reset API, not with a CRU hack. > > Signed-off-by: Nicolas Frattaroli Reviewed-by: Heiko Stuebner