요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Altera Mailbox Driver
=====================
Required properties:
- compatible : "altr,mailbox-1.0".
- reg : physical base address of the mailbox and length of
memory mapped region.
- #mbox-cells: Common mailbox binding property to identify the number
of cells required for the mailbox specifier. Should be 1.
Optional properties:
- interrupts : interrupt number. The interrupt specifier format
depends on the interrupt controller parent.
Example:
mbox_tx: mailbox@100 {
compatible = "altr,mailbox-1.0";
reg = <0x100 0x8>;
interrupt-parent = < &gic_0 >;
interrupts = <5>;
#mbox-cells = <1>;
};
mbox_rx: mailbox@200 {
compatible = "altr,mailbox-1.0";
reg = <0x200 0x8>;
interrupt-parent = < &gic_0 >;
interrupts = <6>;
#mbox-cells = <1>;
};
Mailbox client
===============
"mboxes" and the optional "mbox-names" (please see
Documentation/devicetree/bindings/mailbox/mailbox.txt for details). Each value
of the mboxes property should contain a phandle to the mailbox controller
device node and second argument is the channel index. It must be 0 (hardware
support only one channel).The equivalent "mbox-names" property value can be
used to give a name to the communication channel to be used by the client user.
Example:
mclient0: mclient0@400 {
compatible = "client-1.0";
reg = <0x400 0x10>;
mbox-names = "mbox-tx", "mbox-rx";
mboxes = <&mbox_tx 0>,
<&mbox_rx 0>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Altera mailbox controller
1-14Altera mailbox controller의 필수 `compatible`은 `altr,mailbox-1.0`입니다. `reg`는 mailbox의 물리 base address와 memory-mapped region 길이를 지정합니다. 공통 mailbox 속성 `#mbox-cells`는 mailbox specifier에 필요한 cell 수이며 1이어야 합니다.
선택적인 `interrupts`는 interrupt 번호입니다. interrupt specifier 형식은 상위 interrupt controller에 따라 달라집니다.
TX와 RX controller 노드를 분리하고 client가 channel index 0으로 각각 참조합니다.
TX와 RX controller 예제
15-31예제는 `0x100`과 `0x200`에 각각 8-byte MMIO region을 가진 TX·RX mailbox를 둡니다. 두 노드는 GIC의 interrupt 5와 6을 사용하고 `#mbox-cells = <1>`로 선언합니다.
mbox_tx: mailbox@100 {
compatible = "altr,mailbox-1.0";
reg = <0x100 0x8>;
interrupt-parent = < &gic_0 >;
interrupts = <5>;
#mbox-cells = <1>;
};
mbox_rx: mailbox@200 {
compatible = "altr,mailbox-1.0";
reg = <0x200 0x8>;
interrupt-parent = < &gic_0 >;
interrupts = <6>;
#mbox-cells = <1>;
};
Mailbox client 속성
32-40Client는 `mboxes`와 선택적인 `mbox-names`를 사용하며 자세한 규칙은 `Documentation/devicetree/bindings/mailbox/mailbox.txt`를 따릅니다. 각 `mboxes` 값은 mailbox controller 노드의 phandle과 channel index를 담습니다. Hardware가 channel 하나만 지원하므로 두 번째 인자는 반드시 0이어야 합니다. 대응하는 `mbox-names` 값으로 client가 사용할 통신 channel에 이름을 붙일 수 있습니다.
양방향 client 예제
41-48예제 client는 `mbox-tx`와 `mbox-rx`라는 이름으로 두 controller의 channel 0을 각각 참조합니다.
mclient0: mclient0@400 {
compatible = "client-1.0";
reg = <0x400 0x10>;
mbox-names = "mbox-tx", "mbox-rx";
mboxes = <&mbox_tx 0>,
<&mbox_rx 0>;
};
요약과 해설
altera-mailbox.txt:1-48TX·RX controller를 분리하고 client가 channel 0으로 참조하는 방식을 설명합니다.