mirror of https://lore.kernel.org/lkml/
 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 v2 0/2] hwspinlock: add sunxi hardware spinlock support
Date: Fri, 4 Dec 2020 16:33:46 +0100	[thread overview]
Message-ID: <cover.1607094989.git.wilken.gottwalt@posteo.net> (raw)

Most of the Allwinner sun8i and sun50i based SoCs contain a spinlock
unit which can be used to sync access to devices shared between the ARM
cores in the embedded OpenRisc (AR100) core. This spinlock unit is
included in the A83T, A64, H2+, H3, H5 and H6 SoCs and according to the
datasheets support at least 32 spinlocks. The implementation supports
32, 64, 128 and 256 spinlock setups, but there is no known SoC yet,
which supports more the 32.

This driver adds support for this hardware spinlock unit to Linux
including all 4 possible setups. The driver reports the found setup via
debugfs. It can be build as a builtin and normal module by using the
HWSPINLOCK_SUNXI symbol.

This driver is the first step to enable hwspinlock support in Linux,
but also needs support on the OpenRisc core side in the crust firmware.
This patch provides the driver and binding documentation but is not yet
included into the sun8i and sun50i dtsi files. Also not every sun8i or
sun50i SoC seem to have support for this hardware. For example the H616
is missing the whole spinlock section in the datasheets.

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

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

Changes in v2:
  - redone coverletter
  - fixed ranges in the device tree description
  - added suggestions from Bjorn Andersson and Maxime Ripard to the driver
  - provided better driver and test description

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         | 234 ++++++++++++++++++
 5 files changed, 314 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-12-04 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 15:33 Wilken Gottwalt [this message]
2020-12-04 15:34 ` [PATCH v2 1/2] dt-bindings: hwlock: sunxi: add sunxi_hwspinlock documentation Wilken Gottwalt
2020-12-04 15:35 ` [PATCH v2 2/2] hwspinlock: add sunxi hardware spinlock support Wilken Gottwalt
2020-12-04 16:21   ` Maxime Ripard
2020-12-04 16:56     ` Wilken Gottwalt
2020-12-04 17:07     ` Wilken Gottwalt
2020-12-07  9:26       ` Maxime Ripard

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.1607094989.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 \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®