diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-03 17:52:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-03 17:52:25 -0400 |
commit | d033ed9eeafc3bf33ce2de286ea2fb2c63e1c183 (patch) | |
tree | 21d877cc15c04c6717411a3d0fe948318291af04 /Documentation | |
parent | 6361c845ceab326a306412349fa6b125700b2cec (diff) | |
parent | bd5717a4632cdecafe82d03de7dcb3b1876e2828 (diff) |
Merge tag 'hwspinlock-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock
Pull hwspinlock updates from Ohad Ben-Cohen:
- hwspinlock core DT support from Suman Anna
- OMAP hwspinlock DT support from Suman Anna
- QCOM hwspinlock DT support from Bjorn Andersson
- a new CSR atlas7 hwspinlock driver from Wei Chen
- CSR atlas7 hwspinlock DT binding document from Wei Chen
- a tiny QCOM hwspinlock driver fix from Bjorn Andersson
* tag 'hwspinlock-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
hwspinlock: qcom: Correct msb in regmap_field
DT: hwspinlock: add the CSR atlas7 hwspinlock bindings document
hwspinlock: add a CSR atlas7 driver
hwspinlock: qcom: Add support for Qualcomm HW Mutex block
DT: hwspinlock: Add binding documentation for Qualcomm hwmutex
hwspinlock/omap: add support for dt nodes
Documentation: dt: add the omap hwspinlock bindings document
hwspinlock/core: add device tree support
Documentation: dt: add common bindings for hwspinlock
Diffstat (limited to 'Documentation')
5 files changed, 162 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/hwlock/hwlock.txt b/Documentation/devicetree/bindings/hwlock/hwlock.txt new file mode 100644 index 000000000000..085d1f5c916a --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/hwlock.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | Generic hwlock bindings | ||
2 | ======================= | ||
3 | |||
4 | Generic bindings that are common to all the hwlock platform specific driver | ||
5 | implementations. | ||
6 | |||
7 | Please also look through the individual platform specific hwlock binding | ||
8 | documentations for identifying any additional properties specific to that | ||
9 | platform. | ||
10 | |||
11 | hwlock providers: | ||
12 | ================= | ||
13 | |||
14 | Required properties: | ||
15 | - #hwlock-cells: Specifies the number of cells needed to represent a | ||
16 | specific lock. | ||
17 | |||
18 | hwlock users: | ||
19 | ============= | ||
20 | |||
21 | Consumers that require specific hwlock(s) should specify them using the | ||
22 | property "hwlocks", and an optional "hwlock-names" property. | ||
23 | |||
24 | Required properties: | ||
25 | - hwlocks: List of phandle to a hwlock provider node and an | ||
26 | associated hwlock args specifier as indicated by | ||
27 | #hwlock-cells. The list can have just a single hwlock | ||
28 | or multiple hwlocks, with each hwlock represented by | ||
29 | a phandle and a corresponding args specifier. | ||
30 | |||
31 | Optional properties: | ||
32 | - hwlock-names: List of hwlock name strings defined in the same order | ||
33 | as the hwlocks, with one name per hwlock. Consumers can | ||
34 | use the hwlock-names to match and get a specific hwlock. | ||
35 | |||
36 | |||
37 | 1. Example of a node using a single specific hwlock: | ||
38 | |||
39 | The following example has a node requesting a hwlock in the bank defined by | ||
40 | the node hwlock1. hwlock1 is a hwlock provider with an argument specifier | ||
41 | of length 1. | ||
42 | |||
43 | node { | ||
44 | ... | ||
45 | hwlocks = <&hwlock1 2>; | ||
46 | ... | ||
47 | }; | ||
48 | |||
49 | 2. Example of a node using multiple specific hwlocks: | ||
50 | |||
51 | The following example has a node requesting two hwlocks, a hwlock within | ||
52 | the hwlock device node 'hwlock1' with #hwlock-cells value of 1, and another | ||
53 | hwlock within the hwlock device node 'hwlock2' with #hwlock-cells value of 2. | ||
54 | |||
55 | node { | ||
56 | ... | ||
57 | hwlocks = <&hwlock1 2>, <&hwlock2 0 3>; | ||
58 | ... | ||
59 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt new file mode 100644 index 000000000000..2c9804f4f4ac --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | OMAP4+ HwSpinlock Driver | ||
2 | ======================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: Should be "ti,omap4-hwspinlock" for | ||
6 | OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs | ||
7 | - reg: Contains the hwspinlock module register address space | ||
8 | (base address and length) | ||
9 | - ti,hwmods: Name of the hwmod associated with the hwspinlock device | ||
10 | - #hwlock-cells: Should be 1. The OMAP hwspinlock users will use a | ||
11 | 0-indexed relative hwlock number as the argument | ||
12 | specifier value for requesting a specific hwspinlock | ||
13 | within a hwspinlock bank. | ||
14 | |||
15 | Please look at the generic hwlock binding for usage information for consumers, | ||
16 | "Documentation/devicetree/bindings/hwlock/hwlock.txt" | ||
17 | |||
18 | Example: | ||
19 | |||
20 | /* OMAP4 */ | ||
21 | hwspinlock: spinlock@4a0f6000 { | ||
22 | compatible = "ti,omap4-hwspinlock"; | ||
23 | reg = <0x4a0f6000 0x1000>; | ||
24 | ti,hwmods = "spinlock"; | ||
25 | #hwlock-cells = <1>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt new file mode 100644 index 000000000000..4563f524556b --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | Qualcomm Hardware Mutex Block: | ||
2 | |||
3 | The hardware block provides mutexes utilized between different processors on | ||
4 | the SoC as part of the communication protocol used by these processors. | ||
5 | |||
6 | - compatible: | ||
7 | Usage: required | ||
8 | Value type: <string> | ||
9 | Definition: must be one of: | ||
10 | "qcom,sfpb-mutex", | ||
11 | "qcom,tcsr-mutex" | ||
12 | |||
13 | - syscon: | ||
14 | Usage: required | ||
15 | Value type: <prop-encoded-array> | ||
16 | Definition: one cell containing: | ||
17 | syscon phandle | ||
18 | offset of the hwmutex block within the syscon | ||
19 | stride of the hwmutex registers | ||
20 | |||
21 | - #hwlock-cells: | ||
22 | Usage: required | ||
23 | Value type: <u32> | ||
24 | Definition: must be 1, the specified cell represent the lock id | ||
25 | (hwlock standard property, see hwlock.txt) | ||
26 | |||
27 | Example: | ||
28 | |||
29 | tcsr_mutex_block: syscon@fd484000 { | ||
30 | compatible = "syscon"; | ||
31 | reg = <0xfd484000 0x2000>; | ||
32 | }; | ||
33 | |||
34 | hwlock@fd484000 { | ||
35 | compatible = "qcom,tcsr-mutex"; | ||
36 | syscon = <&tcsr_mutex_block 0 0x80>; | ||
37 | |||
38 | #hwlock-cells = <1>; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt new file mode 100644 index 000000000000..9bb1240a68e0 --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | SIRF Hardware spinlock device Binding | ||
2 | ----------------------------------------------- | ||
3 | |||
4 | Required properties : | ||
5 | - compatible : shall contain only one of the following: | ||
6 | "sirf,hwspinlock" | ||
7 | |||
8 | - reg : the register address of hwspinlock | ||
9 | |||
10 | - #hwlock-cells : hwlock users only use the hwlock id to represent a specific | ||
11 | hwlock, so the number of cells should be <1> here. | ||
12 | |||
13 | Please look at the generic hwlock binding for usage information for consumers, | ||
14 | "Documentation/devicetree/bindings/hwlock/hwlock.txt" | ||
15 | |||
16 | Example of hwlock provider: | ||
17 | hwlock { | ||
18 | compatible = "sirf,hwspinlock"; | ||
19 | reg = <0x13240000 0x00010000>; | ||
20 | #hwlock-cells = <1>; | ||
21 | }; | ||
22 | |||
23 | Example of hwlock users: | ||
24 | node { | ||
25 | ... | ||
26 | hwlocks = <&hwlock 2>; | ||
27 | ... | ||
28 | }; | ||
diff --git a/Documentation/hwspinlock.txt b/Documentation/hwspinlock.txt index 62f7d4ea6e26..61c1ee98e59f 100644 --- a/Documentation/hwspinlock.txt +++ b/Documentation/hwspinlock.txt | |||
@@ -48,6 +48,16 @@ independent, drivers. | |||
48 | ids for predefined purposes. | 48 | ids for predefined purposes. |
49 | Should be called from a process context (might sleep). | 49 | Should be called from a process context (might sleep). |
50 | 50 | ||
51 | int of_hwspin_lock_get_id(struct device_node *np, int index); | ||
52 | - retrieve the global lock id for an OF phandle-based specific lock. | ||
53 | This function provides a means for DT users of a hwspinlock module | ||
54 | to get the global lock id of a specific hwspinlock, so that it can | ||
55 | be requested using the normal hwspin_lock_request_specific() API. | ||
56 | The function returns a lock id number on success, -EPROBE_DEFER if | ||
57 | the hwspinlock device is not yet registered with the core, or other | ||
58 | error values. | ||
59 | Should be called from a process context (might sleep). | ||
60 | |||
51 | int hwspin_lock_free(struct hwspinlock *hwlock); | 61 | int hwspin_lock_free(struct hwspinlock *hwlock); |
52 | - free a previously-assigned hwspinlock; returns 0 on success, or an | 62 | - free a previously-assigned hwspinlock; returns 0 on success, or an |
53 | appropriate error code on failure (e.g. -EINVAL if the hwspinlock | 63 | appropriate error code on failure (e.g. -EINVAL if the hwspinlock |