요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* STMicroelectronics Flexible Direct Memory Access Device Tree bindings
The FDMA is a general-purpose direct memory access controller capable of
supporting 16 independent DMA channels. It accepts up to 32 DMA requests.
The FDMA is based on a Slim processor which requires a firmware.
* FDMA Controller
Required properties:
- compatible : Should be one of
- st,stih407-fdma-mpe31-11, "st,slim-rproc";
- st,stih407-fdma-mpe31-12, "st,slim-rproc";
- st,stih407-fdma-mpe31-13, "st,slim-rproc";
- reg : Should contain an entry for each name in reg-names
- reg-names : Must contain "slimcore", "dmem", "peripherals", "imem" entries
- interrupts : Should contain one interrupt shared by all channels
- dma-channels : Number of channels supported by the controller
- #dma-cells : Must be <3>. See DMA client section below
- clocks : Must contain an entry for each clock
See: Documentation/devicetree/bindings/clock/clock-bindings.txt
Example:
fdma0: dma-controller@8e20000 {
compatible = "st,stih407-fdma-mpe31-11", "st,slim-rproc";
reg = <0x8e20000 0x8000>,
<0x8e30000 0x3000>,
<0x8e37000 0x1000>,
<0x8e38000 0x8000>;
reg-names = "slimcore", "dmem", "peripherals", "imem";
clocks = <&clk_s_c0_flexgen CLK_FDMA>,
<&clk_s_c0_flexgen CLK_EXT2F_A9>,
<&clk_s_c0_flexgen CLK_EXT2F_A9>,
<&clk_s_c0_flexgen CLK_EXT2F_A9>;
interrupts = <GIC_SPI 5 IRQ_TYPE_NONE>;
dma-channels = <16>;
#dma-cells = <3>;
};
* DMA client
Required properties:
- dmas: Comma separated list of dma channel requests
- dma-names: Names of the aforementioned requested channels
Each dmas request consists of 4 cells:
1. A phandle pointing to the FDMA controller
2. The request line number
3. A 32bit mask specifying (see include/linux/platform_data/dma-st-fdma.h)
-bit 2-0: Holdoff value, dreq will be masked for
0x0: 0-0.5us
0x1: 0.5-1us
0x2: 1-1.5us
-bit 17: data swap
0x0: disabled
0x1: enabled
-bit 21: Increment Address
0x0: no address increment between transfers
0x1: increment address between transfers
-bit 22: 2 STBus Initiator Coprocessor interface
0x0: high priority port
0x1: low priority port
4. transfers type
0 free running
1 paced
Example:
sti_uni_player2: sti-uni-player@2 {
compatible = "st,sti-uni-player";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
assigned-clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
assigned-clock-parents = <&clk_s_d0_quadfs 2>;
assigned-clock-rates = <50000000>;
reg = <0x8D82000 0x158>;
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
dmas = <&fdma0 4 0 1>;
dai-name = "Uni Player #1 (DAC)";
dma-names = "tx";
st,uniperiph-id = <2>;
st,version = <5>;
st,mode = "PCM";
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ST FDMA controller
1-40STMicroelectronics Flexible DMA(FDMA)는 16개의 독립 DMA channel과 최대 32개의 DMA request를 지원하는 general-purpose controller입니다. Firmware가 필요한 Slim processor를 기반으로 합니다.
필수 compatible 조합은 `st,stih407-fdma-mpe31-11`, `st,stih407-fdma-mpe31-12`, `st,stih407-fdma-mpe31-13` 중 하나와 `st,slim-rproc`입니다. `reg`에는 `reg-names` 항목마다 영역을 넣고 이름은 `slimcore`, `dmem`, `peripherals`, `imem`이어야 합니다.
`interrupts`는 모든 channel이 공유하는 interrupt, `dma-channels`는 지원 channel 수, `#dma-cells = <3>`은 client specifier 길이입니다. `clocks`에는 각 clock을 넣으며 형식은 `Documentation/devicetree/bindings/clock/clock-bindings.txt`를 따릅니다.
예제 FDMA0은 네 register 영역과 네 clock, GIC interrupt 5, 16 channel 및 3-cell DMA specifier를 선언합니다.
fdma0: dma-controller@8e20000 {
compatible = "st,stih407-fdma-mpe31-11", "st,slim-rproc";
reg = <0x8e20000 0x8000>,
<0x8e30000 0x3000>,
<0x8e37000 0x1000>,
<0x8e38000 0x8000>;
reg-names = "slimcore", "dmem", "peripherals", "imem";
clocks = <&clk_s_c0_flexgen CLK_FDMA>,
<&clk_s_c0_flexgen CLK_EXT2F_A9>,
<&clk_s_c0_flexgen CLK_EXT2F_A9>,
<&clk_s_c0_flexgen CLK_EXT2F_A9>;
interrupts = <GIC_SPI 5 IRQ_TYPE_NONE>;
dma-channels = <16>;
#dma-cells = <3>;
};
Firmware를 실행하는 Slim core가 최대 32 request를 16 DMA channel로 처리합니다.
FDMA client 3-cell specifier
41-67Client의 필수 `dmas`는 comma-separated channel request 목록이고 `dma-names`는 같은 channel의 이름입니다. Phandle을 포함한 각 request는 네 요소이며 controller 뒤의 DMA specifier는 request line, 32-bit mask, transfer type의 3-cell입니다.
Mask bit 2:0은 holdoff 값으로 `0x0`은 0~0.5 us, `0x1`은 0.5~1 us, `0x2`는 1~1.5 us 동안 dreq를 mask합니다. Bit 17은 data swap으로 0 disabled/1 enabled입니다.
Bit 21은 transfer 사이 address increment로 0은 increment 없음, 1은 increment입니다. Bit 22는 두 STBus Initiator Coprocessor interface 중 0 high-priority port, 1 low-priority port를 선택합니다. Transfer type 0은 free-running, 1은 paced입니다.
DMA specifier의 mask와 transfer-type field를 구조화합니다.
Uni Player paced DMA 예제
68-86예제 Uni Player는 PCM clock을 50 MHz로 설정하고 GIC interrupt 86을 사용합니다. `dmas = <&fdma0 4 0 1>`은 FDMA0의 request line 4, mask 0, paced transfer type 1을 뜻하며 이름은 `tx`입니다.
sti_uni_player2: sti-uni-player@2 {
compatible = "st,sti-uni-player";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
assigned-clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
assigned-clock-parents = <&clk_s_d0_quadfs 2>;
assigned-clock-rates = <50000000>;
reg = <0x8D82000 0x158>;
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
dmas = <&fdma0 4 0 1>;
dai-name = "Uni Player #1 (DAC)";
dma-names = "tx";
st,uniperiph-id = <2>;
st,version = <5>;
st,mode = "PCM";
};
요약과 해설
st_fdma.txt:1-8616-channel controller와 3-cell client specifier를 설명합니다.