← Documents Documentation/mhi/topology.rst GitHub 원문 ↗

Linux 6.18.37 · MHI

MHI Topology

MHI controller, logical device, client driver의 역할과 kernel bus framework 등록·전송 흐름을 설명합니다.

Source pathDocumentation/mhi/topology.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

topology.rst:1-60

Controller는 physical link와 MHI bus를 관리하고, core는 channel configuration에서 logical MHI device를 만들며, client driver가 이 device에 bind되어 upper-layer packet을 전송합니다.

Kernel MHI topology
Controller driverMHI coreMHI deviceClient driver
Physical linkPCIe data pathModem or WiFi chipset

Controller가 channel을 공개하면 core가 logical device를 만들고 client driver를 bind합니다. 실제 payload 이동은 PCIe 같은 physical bus가 담당합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ============
4 MHI Topology
5 ============
6
7 This document provides information about the MHI topology modeling and
8 representation in the kernel.
9
10 MHI Controller
11 --------------
12
13 MHI controller driver manages the interaction with the MHI client devices
14 such as the external modems and WiFi chipsets. It is also the MHI bus master
15 which is in charge of managing the physical link between the host and device.
16 It is however not involved in the actual data transfer as the data transfer
17 is taken care by the physical bus such as PCIe. Each controller driver exposes
18 channels and events based on the client device type.
19
20 Below are the roles of the MHI controller driver:
21
22 * Turns on the physical bus and establishes the link to the device
23 * Configures IRQs, IOMMU, and IOMEM
24 * Allocates struct mhi_controller and registers with the MHI bus framework
25 with channel and event configurations using mhi_register_controller.
26 * Initiates power on and shutdown sequence
27 * Initiates suspend and resume power management operations of the device.
28
29 MHI Device
30 ----------
31
32 MHI device is the logical device which binds to a maximum of two MHI channels
33 for bi-directional communication. Once MHI is in powered on state, the MHI
34 core will create MHI devices based on the channel configuration exposed
35 by the controller. There can be a single MHI device for each channel or for a
36 couple of channels.
37
38 Each supported device is enumerated in::
39
40 /sys/bus/mhi/devices/
41
42 MHI Driver
43 ----------
44
45 MHI driver is the client driver which binds to one or more MHI devices. The MHI
46 driver sends and receives the upper-layer protocol packets like IP packets,
47 modem control messages, and diagnostics messages over MHI. The MHI core will
48 bind the MHI devices to the MHI driver.
49
50 Each supported driver is enumerated in::
51
52 /sys/bus/mhi/drivers/
53
54 Below are the roles of the MHI driver:
55
56 * Registers the driver with the MHI bus framework using mhi_driver_register.
57 * Prepares the device for transfer by calling mhi_prepare_for_transfer.
58 * Initiates data transfer by calling mhi_queue_transfer.
59 * Once the data transfer is finished, calls mhi_unprepare_from_transfer to
60 end data transfer.
61

3. 한국어 전문 번역

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

MHI topology model

1-9

이 문서는 MHI topology를 kernel에서 modeling하고 표현하는 방법을 설명합니다.

.. SPDX-License-Identifier: GPL-2.0

============
MHI Topology
============

This document provides information about the MHI topology modeling and
representation in the kernel.

MHI controller

10-28

MHI controller driver는 external modem과 WiFi chipset 같은 MHI client device와의 상호 작용을 관리합니다. Host와 device 사이의 physical link를 관리하는 MHI bus master이지만 실제 data transfer에는 관여하지 않으며, transfer는 PCIe 같은 physical bus가 담당합니다. Controller driver는 client device 유형에 맞는 channel과 event를 공개합니다.

  • Physical bus를 켜고 device와 link를 설정합니다.
  • IRQ, IOMMU, IOMEM을 구성합니다.
  • `struct mhi_controller`를 할당하고 channel·event configuration과 함께 `mhi_register_controller`로 MHI bus framework에 등록합니다.
  • Power-on과 shutdown sequence를 시작합니다.
  • Device의 suspend와 resume power-management 작업을 시작합니다.
MHI Controller
--------------

MHI controller driver manages the interaction with the MHI client devices
such as the external modems and WiFi chipsets. It is also the MHI bus master
which is in charge of managing the physical link between the host and device.
It is however not involved in the actual data transfer as the data transfer
is taken care by the physical bus such as PCIe. Each controller driver exposes
channels and events based on the client device type.

Below are the roles of the MHI controller driver:

* Turns on the physical bus and establishes the link to the device
* Configures IRQs, IOMMU, and IOMEM
* Allocates struct mhi_controller and registers with the MHI bus framework
  with channel and event configurations using mhi_register_controller.
* Initiates power on and shutdown sequence
* Initiates suspend and resume power management operations of the device.

MHI device

29-41

MHI device는 bidirectional 통신을 위해 최대 두 MHI channel에 bind되는 logical device입니다. MHI가 power-on 상태가 되면 core가 controller가 공개한 channel configuration에 따라 MHI device를 만듭니다. Channel마다 device 하나를 만들 수도 있고 channel 한 쌍에 device 하나를 만들 수도 있습니다.

지원되는 각 device는 `/sys/bus/mhi/devices/`에 enumerate됩니다.

MHI Device
----------

MHI device is the logical device which binds to a maximum of two MHI channels
for bi-directional communication. Once MHI is in powered on state, the MHI
core will create MHI devices based on the channel configuration exposed
by the controller. There can be a single MHI device for each channel or for a
couple of channels.

Each supported device is enumerated in::

        /sys/bus/mhi/devices/

MHI driver

42-60

MHI driver는 하나 이상의 MHI device에 bind되는 client driver입니다. IP packet, modem control message, diagnostic message 같은 upper-layer protocol packet을 MHI로 송수신하며 MHI core가 device와 driver를 bind합니다.

지원되는 각 driver는 `/sys/bus/mhi/drivers/`에 enumerate됩니다.

  • `mhi_driver_register`로 driver를 MHI bus framework에 등록합니다.
  • `mhi_prepare_for_transfer`를 호출해 device의 transfer를 준비합니다.
  • `mhi_queue_transfer`를 호출해 data transfer를 시작합니다.
  • Transfer가 끝나면 `mhi_unprepare_from_transfer`를 호출해 data transfer를 종료합니다.
MHI Driver
----------

MHI driver is the client driver which binds to one or more MHI devices. The MHI
driver sends and receives the upper-layer protocol packets like IP packets,
modem control messages, and diagnostics messages over MHI. The MHI core will
bind the MHI devices to the MHI driver.

Each supported driver is enumerated in::

        /sys/bus/mhi/drivers/

Below are the roles of the MHI driver:

* Registers the driver with the MHI bus framework using mhi_driver_register.
* Prepares the device for transfer by calling mhi_prepare_for_transfer.
* Initiates data transfer by calling mhi_queue_transfer.
* Once the data transfer is finished, calls mhi_unprepare_from_transfer to
  end data transfer.