From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54A0DC433FE for ; Sat, 16 Oct 2021 15:51:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E0EF36101D for ; Sat, 16 Oct 2021 15:51:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E0EF36101D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8BLbTRJN1dbP4LefIQvNWp0arRakGque5UBGWvmTcR8=; b=pa0hW0ahdpAcsA B7kxlw7KBFAxHcLbrKi14GNsOD/vx9+UsiGCWD2OxbYlaPtcwAopiLLhiDntkqY/4M3kQt2xN8JrW M59yn7CPMDEeMuuge6Cfuxi9PSQ2fcEuxC5MAf4HYtVnf4o5ipQ9CJkCvq2TQTwnswBGvzD2Z5ZIS 77fw/d8lx25DlN4NDg6d7Hp++miWHSNACq7Kb3RInIBQF3TNWlSdRqtavcKrUoRaFrD48At8emW5W jt3DP5dqJmINqM8rNiJEUIYSP2T21icFFLtmfue1Dc1+HaOsnR+KXyR4X6DbZg85HYxxFdS6u0d4a lf4GK5uA0JiEDMJN84Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mblxH-00AuNH-TX; Sat, 16 Oct 2021 15:50:40 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mblxD-00AuMR-Lw; Sat, 16 Oct 2021 15:50:36 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211016_085035_752827_AF22258D X-CRM114-Status: GOOD ( 19.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel