Skip to content

Add support for hwspinlock on A64 SoC

Nikolay Borisov linux-arm-kernel linux-devicetree 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v13 patches 14 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hwspinlock: sunxi: Implement support for Allwinner's A64 SoCdrivers/hwspinlock/Kconfig drivers/hwspinlock/Makefile drivers/hwspinlock/sun50i_hwspinlock.c+173 -00 replies
2/3arm64: dts: allwinner: a64: Add hwspinlock nodearch/arm64/boot/dts/allwinner/sun50i-a64.dtsi+9 -00 replies
3/3dt-bindings: hwlock: Document A64 hwspinlock bindingsDocumentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml+47 -04 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Add support for hwspinlock on A64 SoC

Here's v2 of hwspinlock support in A64 SoC. Main changes:

* Rewrote dt bindings in yaml
* Re-arranged hwspinlock node in dts to follow ascending address order
* Sorted includes alphabetically
* Minor style changes
* Use GENMASK/FIELD_GET to query number of locks from mmio register
* Separate hwspinlock_device from sun50i_hwspinlock. This enables to utilize devm_add_action_or_reset, which results in cleaner error handling in the probe function.
* Switched to device managed resources where applicable.

This was tested on a pine64 board. I loadeded/unloaded the driver checking the state of clock/reset/sysstatus registers as well as trying lock/unlock operations (using the devmem busybox utility).

Nikolay Borisov (3):
hwspinlock: sunxi: Implement support for Allwinner's A64 SoC
arm64: dts: allwinner: a64: Add hwspinlock node
dt-bindings: hwlock: Document A64 hwspinlock bindings

 .../allwinner,sun50i-a64-hwspinlock.yaml      |  47 +++++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi |   9 +
 drivers/hwspinlock/Kconfig                    |   9 +
 drivers/hwspinlock/Makefile                   |   1 +
 drivers/hwspinlock/sun50i_hwspinlock.c        | 163 ++++++++++++++++++
 5 files changed, 229 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
 create mode 100644 drivers/hwspinlock/sun50i_hwspinlock.c

--
2.17.1