요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
* Hisilicon K3 DMA controller
See dma.txt first
Required properties:
- compatible: Must be one of
- "hisilicon,k3-dma-1.0"
- "hisilicon,hisi-pcm-asp-dma-1.0"
- reg: Should contain DMA registers location and length.
- interrupts: Should contain one interrupt shared by all channel
- #dma-cells: see dma.txt, should be 1, para number
- dma-channels: physical channels supported
- dma-requests: virtual channels supported, each virtual channel
have specific request line
- clocks: clock required
Example:
Controller:
dma0: dma@fcd02000 {
compatible = "hisilicon,k3-dma-1.0";
reg = <0xfcd02000 0x1000>;
#dma-cells = <1>;
dma-channels = <16>;
dma-requests = <27>;
interrupts = <0 12 4>;
clocks = <&pclk>;
};
Client:
Use specific request line passing from dmax
For example, i2c0 read channel request line is 18, while write channel use 19
i2c0: i2c@fcb08000 {
compatible = "snps,designware-i2c";
dmas = <&dma0 18 /* read channel */
&dma0 19>; /* write channel */
dma-names = "rx", "tx";
};
i2c1: i2c@fcb09000 {
compatible = "snps,designware-i2c";
dmas = <&dma0 20 /* read channel */
&dma0 21>; /* write channel */
dma-names = "rx", "tx";
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
Hisilicon K3 DMA 속성
1-16Hisilicon K3 DMA controller 바인딩이며 먼저 `dma.txt`를 참조합니다. `compatible`은 `hisilicon,k3-dma-1.0` 또는 `hisilicon,hisi-pcm-asp-dma-1.0`입니다.
`reg`는 DMA register 위치와 길이, `interrupts`는 모든 channel이 공유하는 하나의 interrupt입니다. `#dma-cells`는 1이며 parameter number를 전달합니다. `dma-channels`는 physical channel 수, `dma-requests`는 특정 request line을 가진 virtual channel 수, `clocks`는 필수 clock입니다.
Virtual request line이 shared interrupt를 사용하는 physical channel에 매핑됩니다.
K3 DMA controller 예제
17-29예제 controller는 register 영역, 16 physical channel, 27 virtual request, shared interrupt와 peripheral clock을 선언합니다.
dma0: dma@fcd02000 {
compatible = "hisilicon,k3-dma-1.0";
reg = <0xfcd02000 0x1000>;
#dma-cells = <1>;
dma-channels = <16>;
dma-requests = <27>;
interrupts = <0 12 4>;
clocks = <&pclk>;
};
I2C request-line client 예제
30-47Client는 DMA controller에서 전달된 특정 request line을 사용합니다. I2C0 read/write는 18/19, I2C1 read/write는 20/21이며 `dma-names`는 `rx`, `tx`입니다.
i2c0: i2c@fcb08000 {
compatible = "snps,designware-i2c";
dmas = <&dma0 18 /* read channel */
&dma0 19>; /* write channel */
dma-names = "rx", "tx";
};
i2c1: i2c@fcb09000 {
compatible = "snps,designware-i2c";
dmas = <&dma0 20 /* read channel */
&dma0 21>; /* write channel */
dma-names = "rx", "tx";
};
요약과 해설
k3dma.txt:1-47Shared interrupt와 I2C request line 예제를 설명합니다.