linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wilken Gottwalt <wilken.gottwalt@posteo.net>
To: linux-kernel@vger.kernel.org
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>
Subject: [PATCH 0/2] hwspinlock: add sunxi hardware spinlock support
Date: Wed, 18 Nov 2020 11:01:21 +0100	[thread overview]
Message-ID: <cover.1605693132.git.wilken.gottwalt@posteo.net> (raw)

Most of the Allwinner SoCs contain a spinlock unit which can be used for
synchronization/locking between different subsystems. According to the
several Allwinner datasheets most of the sun8i and sun50i SoCs share the
same hardware with at least 32 (32bit wide) registers for 32 spinlocks.
The implemented spinlock hardware can support 32, 64, 128 or 256
registers.

This driver supports all four register bank sizes and also provides some
additional information via debugfs. The driver can be build by setting
the HWSPINLOCK_SUNXI symbol and can be also compiled as module.

This patch adds the driver for this hardware and updates the hwlock
documentation on how to use it. According to the datasheets the H2+, H3,
H5 and H6 SoCs share exactly the same spinlock hardware. But I'm pretty
sure that the whole sun8i family has the same hardware. The sun50i family
may be a different story. The H616 is missing the whole spinlock part in
the datasheets, so I assume this is a sun50i part that does not support
hwspinlocks.

The driver itself is not yet enabled in the devicetree files of the H2/H3,
H5 and H6 SoCs, because for now I'm only able to test the driver against
a H2+ device (OrangePi Zero).

This patch adds:
- hwspinlock driver sunxi_hwspinlock
- hwspinlock dt bindings documentation
- updates MAINTAINERS

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>

Wilken Gottwalt (2):
  dt-bindings: hwlock: sunxi: add sunxi_hwspinlock documentation
  hwspinlock: add sunxi hardware spinlock support

 .../bindings/hwlock/sunxi-hwspinlock.yaml     |  64 ++++
 MAINTAINERS                                   |   6 +
 drivers/hwspinlock/Kconfig                    |   9 +
 drivers/hwspinlock/Makefile                   |   1 +
 drivers/hwspinlock/sunxi_hwspinlock.c         | 282 ++++++++++++++++++
 5 files changed, 362 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwlock/sunxi-hwspinlock.yaml
 create mode 100644 drivers/hwspinlock/sunxi_hwspinlock.c

-- 
2.29.2


             reply	other threads:[~2020-11-18 10:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 10:01 Wilken Gottwalt [this message]
2020-11-18 10:01 ` [PATCH 1/2] dt-bindings: hwlock: sunxi: add sunxi_hwspinlock documentation Wilken Gottwalt
2020-11-18 10:02 ` [PATCH 2/2] hwspinlock: add sunxi hardware spinlock support Wilken Gottwalt
2020-11-18 15:37   ` Maxime Ripard
2020-11-18 19:36     ` Wilken Gottwalt
2020-11-19  7:15       ` Maxime Ripard
2020-11-19 10:13         ` Wilken Gottwalt
2020-11-20 16:42           ` Maxime Ripard
2020-11-21 12:22             ` fuyao
2020-11-21 16:44               ` Maxime Ripard
2020-11-23 18:32                 ` Wilken Gottwalt
2020-11-24  3:35                   ` Samuel Holland
2020-11-24 14:28                     ` Maxime Ripard
2020-11-26 13:10                     ` Wilken Gottwalt
2020-11-22  5:19   ` Bjorn Andersson
2020-11-23 18:17     ` Wilken Gottwalt
2020-11-24 14:54       ` Bjorn Andersson
2020-11-26 13:31         ` Wilken Gottwalt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1605693132.git.wilken.gottwalt@posteo.net \
    --to=wilken.gottwalt@posteo.net \
    --cc=baolin.wang7@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=ohad@wizery.com \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    --subject='Re: [PATCH 0/2] hwspinlock: add sunxi hardware spinlock support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).