Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3426478pxf; Mon, 15 Mar 2021 09:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3Vq6ctQasc1Bc1SXOhsmr8gJpbWiQrN0Z/13S+7VPJ6LXaBzDO8CiZrn4GXhLmYRAzzRH X-Received: by 2002:a17:906:228d:: with SMTP id p13mr24864495eja.412.1615824967644; Mon, 15 Mar 2021 09:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615824967; cv=none; d=google.com; s=arc-20160816; b=DoyMJj9GvdEeStNb1k3VO9kxy4p32PGzXaAQ7cU++oGD5/JNFj3yBucpUHGZgvaUNX i9fuH+PoxEO7ycR4p70v9JFoABPRv9jSkjQCqGP4sFAk4kgmfoAX/9uet5fhVUBDsLxX hcq3IE4RpHO6PhoO7YSUgB2QHyUHChZlh4BMByQZ6SACCRkg61ZunqvB0RuQ9Js3a0eS DpK5UmGkVQyev4mnspDFJQqD9RD8jPC/RSeLRHR5aDRxCIwkszmJKNoF5Yft+WwTNAuZ tCG90oH7ki8Yf2ltloTi2fPuLj01C75+IvRDy1PmjqitQXawBsF/RfVt2DftembgFLCC Fubw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=WNHtvP7BKPSirxSpzTWIe4zHI5+AJMQZQRuLDzKPABY=; b=YRmNBQ9onyKH+PQX0x55j79KrSqQNBTcgxQHrU82g8k7R8dqXKTpT85d4ssc/UHD5o ONBvpZmkiHq5yZ9T/VMxUHnk+kP1A8HYaIwPg/vzsreLpRz5Si3UG98qdBhdPoIVQBMi sWViM/7Y+oXN/9+MsjOGlbbwbCncNjcWGLAfB5h1iIIrYWo+81+l5B/RSm9i24+XlxnC JBRyaTbQcYjuFDyPjiRo5QkhkGtdCi61qnifpoJm3xuOUzgqdM6ugFmX/UwzVq/NZgvm tDp04I6TissctH3PjaOzZJEIzIFEkvtl9ofhrdpXC4xaD8uo2go6gRmat4HglmjsLGpz FvmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=T84ECQkg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YgTxdVJd; 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=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si11201660ejx.104.2021.03.15.09.15.44; Mon, 15 Mar 2021 09:16:07 -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=@cerno.tech header.s=fm2 header.b=T84ECQkg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YgTxdVJd; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbhCOQMv (ORCPT + 99 others); Mon, 15 Mar 2021 12:12:51 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:45439 "EHLO wout4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230405AbhCOQMY (ORCPT ); Mon, 15 Mar 2021 12:12:24 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 2678032D7; Mon, 15 Mar 2021 12:12:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 15 Mar 2021 12:12:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=WNHtvP7BKPSirxSpzTWIe4zHI5+ AJMQZQRuLDzKPABY=; b=T84ECQkg5SvFVLww+BtElw9yRPpbIfvWSQovK8WoWPt EkSbkYjo5YJ5HFpqxYxNsEuA3/0FmZ4icG72TVPQ4k3vPYz2h8zk3EMoEoJq7Qgu 2o5foXqpXsBsdng5SSjM3aRQQ79Ol+DHUuNVHbSPiXzQ0WceUwfFy1itl5z4PrNq 9w41jJbHRV1ylu4DGHk86vr08hvvlmbiIVNSFKqKQg+4TFc2u8PJRlvjkkIjFULf 0Z7PlCv3W5mLY/h4kETsiiJJHyr43fteH2arqBGPpRJcGkafOazvd+VrfCgZxqJ6 8MZbFRwqd3vOBpxKjhe5nomxdI3KWu6370mMFcQB/Ow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=WNHtvP 7BKPSirxSpzTWIe4zHI5+AJMQZQRuLDzKPABY=; b=YgTxdVJdmEMw7pumTzqsvE 8hWruC4u92L2hudcXF8No24CLQehXaHl11VXyUX1khHiGpO+AJ7yp+9UhxoUkEoU Iy2caGvkRVtM+nerFygQI853ZLYOdGQmCOQxMJFVF64qtYDbsheGFd74vbpWQv9G MtQJF5gcbzme/9A+f7af1JyzJsN9pUt1gbLGU3AgtM+BtGUdHWadrWHGySl2wADG 78UvcmSlSZXQPgfYhXWejL7+NpQEeA4JNZdg1m6GdtVZIWJeUZWMIxxOOXeWegWD GVMGgxp3T+f4KRHOoJwWjFkRDkIRSflWGAHb4+lb2eynEaIldcJ2MTdXB2os4mig == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvledgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 77570240057; Mon, 15 Mar 2021 12:12:21 -0400 (EDT) Date: Mon, 15 Mar 2021 17:12:20 +0100 From: Maxime Ripard To: Wilken Gottwalt Cc: linux-kernel@vger.kernel.org, Ohad Ben-Cohen , Bjorn Andersson , Baolin Wang , Rob Herring , Chen-Yu Tsai , Jernej Skrabec Subject: Re: [PATCH v7 2/2] hwspinlock: add sun6i hardware spinlock support Message-ID: <20210315161220.sxjkam7bqli5fk5y@gilmour> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ugceib25g7u7yjue" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ugceib25g7u7yjue Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 14, 2021 at 10:31:13AM +0100, Wilken Gottwalt wrote: > Adds the sun6i_hwspinlock driver for the hardware spinlock unit found in > most of the sun6i compatible SoCs. >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Wilken Gottwalt Acked-by: Maxime Ripard Maxime --ugceib25g7u7yjue Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYE+HZAAKCRDj7w1vZxhR xZCyAQCtg7NjcMB1RU9JypyxATYhgusZFieipCV1Sd853uzIMQEA2egEjSyiW/Uh tMaNWeYMgwAqR1MqyO98rUGEbJaOHAk= =RdjY -----END PGP SIGNATURE----- --ugceib25g7u7yjue--