Skip to contentSkip to conversation

drivers: hwspinlock: add CSR atlas7 implementation

PATCH Superseded Barry Song 2 participants 3 messages Mar 6, 2015 – Mar 9, 2015

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/1 drivers: hwspinlock: add CSR atlas7 implementation

From: Wei Chen <[email protected]>

Add hwspinlock support for the CSR atlas7 SoC.

The Hardware Spinlock device on atlas7 provides hardware assistance for synchronization between the multiple processors in the system (dual Cortex-A7, CAN bus Cortex-M3 and audio DSP).

---
 .../bindings/hwspinlock/sirf,hwspinlock.txt        |  18 +++
 drivers/hwspinlock/Kconfig                         |  12 ++
 drivers/hwspinlock/Makefile                        |   1 +
 drivers/hwspinlock/sirf_hwspinlock.c               | 151 +++++++++++++++++++++
 4 files changed, 182 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwspinlock/sirf,hwspinlock.txt
 create mode 100644 drivers/hwspinlock/sirf_hwspinlock.c
Documentation/devicetree/bindings/hwspinlock/sirf,hwspinlock.txt new file +18 -0
new file mode 100644
index 0000000..b22c492
@@ -0,0 +1,18 @@
+SIRF Hardware spinlock device Binding
+-----------------------------------------------
+
+Required properties :
+- compatible : shall contain only one of the following:
+	"sirf,hwspinlock"
+
+- reg : the register address of hwspinlock
+
+- num-spinlocks : how many spinlocks this device provides
+
+Example:
+	hwspinlock {
+		compatible = "sirf,hwspinlock";
+		reg = <0x13240000 0x00010000>;
+
+		num-spinlocks = <30>;
+	};
drivers/hwspinlock/Kconfig +12 -0
index 3612cb5..fc400e4 100644
@@ -29,4 +29,16 @@ config HSEM_U8500
 
 	  If unsure, say N.
 
+config HWSPINLOCK_SIRF
+	tristate "SIRF Hardware Spinlock device"
+	depends on ARCH_SIRF
+	select HWSPINLOCK
+	help
+	  Say y here to support the SIRF Hardware Spinlock device, which
+	  provides a synchronisation mechanism for the various processor
+	  on the SoC.
+
+	  It's safe to say n here if you're not interested in SIRF hardware
+	  spinlock or just want a bare minimum kernel.
+
 endmenu
drivers/hwspinlock/Makefile +1 -0
index 93eb64b..472b82d 100644
@@ -5,3 +5,4 @@
 obj-$(CONFIG_HWSPINLOCK)		+= hwspinlock_core.o
 obj-$(CONFIG_HWSPINLOCK_OMAP)		+= omap_hwspinlock.o
 obj-$(CONFIG_HSEM_U8500)		+= u8500_hsem.o
+obj-$(CONFIG_HWSPINLOCK_SIRF)		+= sirf_hwspinlock.o
drivers/hwspinlock/sirf_hwspinlock.c new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
2.3.0
#1 lore raw

One license nit.

Barry Song schreef op vr 06-03-2015 om 16:30 [+0800]:

drivers/hwspinlock/sirf_hwspinlock.c line 7

Quoted 10 lines
drivers/hwspinlock/sirf_hwspinlock.c new file +7 -0
@@ -0,0 +1,151 @@
+/*
+ * SIRF hardware spinlock driver
+ *
+ * Copyright (c) 2014 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */

This states the license is GPL v2 or later.

drivers/hwspinlock/sirf_hwspinlock.c line 149

Quoted 1 line
drivers/hwspinlock/sirf_hwspinlock.c new file +1 -0
+MODULE_LICENSE("GPL v2");

So you probably want

    MODULE_LICENSE("GPL");

here.

Paul Bolle

author
#2 lore raw

2015-03-07 21:42 GMT+08:00 Paul Bolle <[email protected]>:

Quoted 16 lines

One license nit.

Barry Song schreef op vr 06-03-2015 om 16:30 [+0800]:

drivers/hwspinlock/sirf_hwspinlock.c line 7

Quoted 10 lines
drivers/hwspinlock/sirf_hwspinlock.c new file +7 -0
@@ -0,0 +1,151 @@
+/*
+ * SIRF hardware spinlock driver
+ *
+ * Copyright (c) 2014 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */

This states the license is GPL v2 or later.

Quoted 6 lines

drivers/hwspinlock/sirf_hwspinlock.c line 149

Quoted 1 line
drivers/hwspinlock/sirf_hwspinlock.c new file +1 -0
+MODULE_LICENSE("GPL v2");

So you probably want

    MODULE_LICENSE("GPL");

here.

i'd like to drop "or later".

Quoted 4 lines

Paul Bolle

-barry