Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp148886pxu; Thu, 7 Jan 2021 00:45:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9vHuitx2xiXT/lRsFQ0OZN74MzW8W58TBFHr3xUMDAcM0a/CruNbWrpSZ6SoBTML6AmXP X-Received: by 2002:a50:d552:: with SMTP id f18mr894781edj.168.1610009143142; Thu, 07 Jan 2021 00:45:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610009143; cv=none; d=google.com; s=arc-20160816; b=o4EogbspOevi7zmjH+W9tGBACIDImOVJ0bYEu7bCKMeuDTmRQ0LJEq7pn9XPgnQ45m 1pGUu5VK8GdAmmmSsUxE+kWUw6BMsackmnJw+tvTh16PCpBVzxqeQ3eezUB/GdvMkOkH Zjz34/Hwqy8Lfp2Qmp+EGjE7TS/KZXD88cvlqDhLNzXJCPcIyBR/AhEBY/urHUoII2du kk+wuSXGqmmSeSum6emRZ7Tyhq72me0qlpnfVEGXRTWBHCtvh+Kt74H2+omW11sl9dXT XyHO6/jjHNurh4deQPRjVtoDEbloI7P0oZEBRFmNj0ei0DVGIs70XXsKor999ev1Ghev YXfg== 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:subject:cc:to:from:date :dkim-signature; bh=9Jc7igKwWS13vOI0znvIMO+RvJEhnF14CMBfjFaJWlY=; b=Q/+OsnmkALMyZwqATlnzww9EMBvoJtXKY2AqqCqBqNoP5Bnq2HxeygJTqI94gpG2sq jRXpWCcEtji1rz7Kgtg5zElS4EbtCF6OBTvE7HCND6pfKqPVmGu46SjvLDNI7ljmaSz+ Rq/NYtj32ud6I2IjB7rSm1yc97su5DfhbtAnnv44a9PjrmfcJrJwux6xCRVmZe3FGrM6 NxOxytiMUSNyBpXp0XJsPg/Kwclq+L5QZpkbd65w+xVilaU3gNJgiljD6tcvadPJ/nxt kf03ZRI4Sif+T9nslYj0PRCHxhYvnzURkTSKmmWHk612A+2zrTyrIqslRO2pmGLMNEHz PH9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=Kjzgp2iq; 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=NONE dis=NONE) header.from=posteo.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si160078ejs.350.2021.01.07.00.45.19; Thu, 07 Jan 2021 00:45:43 -0800 (PST) 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=@posteo.net header.s=2017 header.b=Kjzgp2iq; 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=NONE dis=NONE) header.from=posteo.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726763AbhAGIoO (ORCPT + 99 others); Thu, 7 Jan 2021 03:44:14 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40121 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbhAGIoO (ORCPT ); Thu, 7 Jan 2021 03:44:14 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 2CEDB16005C for ; Thu, 7 Jan 2021 09:43:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1610008997; bh=oHvWaW/9ILYAjQezTXmK7N8EHUTV5WutlcDCrTY4GHI=; h=Date:From:To:Cc:Subject:From; b=Kjzgp2iq1PTUt6khNJ49b1dNIYzpgyDtgN2lBRqUUeRiNK7x6fgrhjVzCFisd5MEJ Rfkvx45NAihChOkr7erHnVKtyJp5/GBUzJ4WtbXDpQRVxp2MWOJttTtciyP+3KH6VT Oa4bvhphEdCj/BkLDB9UQzso7QiVIz4bLqMLTD2eLEqCgPmL66xlgzOceE+5GID1Am mvQqp6W5gN4rbDeQ2Gf2HNppI+U53jVNTXFxYAEngUhD0zQvJ7At1cv322HRQPdz/G SRalDvPjp7myAJeWgCYMJhYemjaBqmZAvu+/0i8zaK54LTa4izl6yOmSq45/xB9tVW CMSym7e6aPbGg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DBKWR6HRyz6tmN; Thu, 7 Jan 2021 09:43:15 +0100 (CET) Date: Thu, 7 Jan 2021 09:43:14 +0100 From: Wilken Gottwalt To: Maxime Ripard Cc: linux-kernel@vger.kernel.org, Ohad Ben-Cohen , Bjorn Andersson , Baolin Wang , Rob Herring , Chen-Yu Tsai , Jernej Skrabec Subject: Re: [PATCH v5 2/2] hwspinlock: add sun6i hardware spinlock support Message-ID: <20210107094314.4cfd5756@monster.powergraphx.local> In-Reply-To: <20210106101542.zziwdyhq7arysrsj@gilmour> References: <0deae76aec31586da45c316546b12bcc316442ee.1608721968.git.wilken.gottwalt@posteo.net> <20210106101542.zziwdyhq7arysrsj@gilmour> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Jan 2021 11:15:42 +0100 Maxime Ripard wrote: > On Wed, Dec 23, 2020 at 12:35:10PM +0100, Wilken Gottwalt wrote: > > Adds the sun6i_hwspinlock driver for the hardware spinlock unit found in > > most of the sun6i compatible SoCs. > > > > This unit provides at least 32 spinlocks in hardware. The implementation > > supports 32, 64, 128 or 256 32bit registers. A lock can be taken by > > reading a register and released by writing a 0 to it. This driver > > supports all 4 spinlock setups, but for now only the first setup (32 > > locks) seem to exist in available devices. This spinlock unit is shared > > between all ARM cores and the embedded companion core. All of them can > > take/release a lock with a single cycle operation. It can be used to > > sync access to devices shared by the ARM cores and the companion core. > > > > There are two ways to check if a lock is taken. The first way is to read > > a lock. If a 0 is returned, the lock was free and is taken now. If an 1 > > is returned, the caller has to try again. Which means the lock is taken. > > The second way is to read a 32bit wide status register where every bit > > represents one of the 32 first locks. According to the datasheets this > > status register supports only the 32 first locks. This is the reason the > > first way (lock read/write) approach is used to be able to cover all 256 > > locks in future devices. The driver also reports the amount of supported > > locks via debugfs. > > > > Signed-off-by: Wilken Gottwalt > > Reviewed-by: Maxime Ripard Does it mean the driver is okay and I only need to fix the bindings documentation? If so, would you prefer an updated patch set or only the documentation patch in a new version? > Thanks! > Maxime