← Documents Documentation/devicetree/bindings/hwlock/hwlock.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Generic Hardware Spinlock

Hwlock provider cell과 단일·복수 consumer lock 바인딩입니다.

Source pathDocumentation/devicetree/bindings/hwlock/hwlock.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

hwlock.txt:1-59

hwlocks와 hwlock-names의 provider별 argument를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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 };
60

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Hwlock provider

1-17

이 문서는 모든 platform-specific hwlock driver 구현에 공통인 generic binding입니다. Platform별 추가 속성은 개별 hwlock binding 문서를 함께 확인해야 합니다.

Hwlock provider의 필수 `#hwlock-cells`는 특정 lock을 나타내는 데 필요한 cell 수를 지정합니다.

Hwlock consumer

18-35

특정 hwlock이 필요한 consumer는 `hwlocks` property와 선택 `hwlock-names`를 사용합니다. 필수 `hwlocks`는 hwlock provider node phandle과 `#hwlock-cells`가 정한 argument specifier의 목록입니다. Lock 하나 또는 여러 개를 담을 수 있고 각 lock은 phandle과 대응 argument로 표현합니다.

선택 `hwlock-names`는 `hwlocks`와 같은 순서로 lock마다 이름 string 하나를 제공합니다. Consumer는 이 이름으로 특정 hwlock을 match하고 가져올 수 있습니다.

Hwlock consumer specifier
Provider#hwlock-cellsConsumer entry
hwlock11<&hwlock1 2>
hwlock22<&hwlock2 0 3>

Provider별 cell 수에 따라 단일 또는 복수 lock을 표현하는 방식을 정리합니다.

단일·복수 hwlock 예제

36-59

첫 예제는 argument specifier 길이가 1인 provider `hwlock1`의 lock 2 하나를 요청합니다.

node {
        ...
        hwlocks = <&hwlock1 2>;
        ...
};

두 번째 예제는 `#hwlock-cells = 1`인 `hwlock1`의 lock 2와 `#hwlock-cells = 2`인 `hwlock2`의 argument `0 3` lock을 함께 요청합니다.

node {
        ...
        hwlocks = <&hwlock1 2>, <&hwlock2 0 3>;
        ...
};