Documentation/driver-api/sm501.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

SM501 Driver

SM501 MFD core의 platform child device, video memory 배치, platform data와 AB-5 PLL 제약을 다루는 전문 번역입니다.

Source pathDocumentation/driver-api/sm501.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

sm501.rst:1-74

SM501 core는 PCI·local-bus multifunction chip을 platform child device로 분해하고 register lock·clock·resource service를 공유합니다. Video memory는 fb0와 fb1을 양끝에 두고 중간을 acceleration에 쓰며, AB-5 errata 때문에 M1XCLK와 M1CLK는 같은 PLL을 사용해야 합니다.

문서 구성
원문 줄내용
1-13SM501 기능과 host connection
14-33MFD core와 platform child device
34-57Peripheral resource와 video memory layout
58-74Platform data와 clock errata

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. include:: <isonum.txt>
2
3 ============
4 SM501 Driver
5 ============
6
7 :Copyright: |copy| 2006, 2007 Simtec Electronics
8
9 The Silicon Motion SM501 multimedia companion chip is a multifunction device
10 which may provide numerous interfaces including USB host controller USB gadget,
11 asynchronous serial ports, audio functions, and a dual display video interface.
12 The device may be connected by PCI or local bus with varying functions enabled.
13
14 Core
15 ----
16
17 The core driver in drivers/mfd provides common services for the
18 drivers which manage the specific hardware blocks. These services
19 include locking for common registers, clock control and resource
20 management.
21
22 The core registers drivers for both PCI and generic bus based
23 chips via the platform device and driver system.
24
25 On detection of a device, the core initialises the chip (which may
26 be specified by the platform data) and then exports the selected
27 peripheral set as platform devices for the specific drivers.
28
29 The core re-uses the platform device system as the platform device
30 system provides enough features to support the drivers without the
31 need to create a new bus-type and the associated code to go with it.
32
33
34 Resources
35 ---------
36
37 Each peripheral has a view of the device which is implicitly narrowed to
38 the specific set of resources that peripheral requires in order to
39 function correctly.
40
41 The centralised memory allocation allows the driver to ensure that the
42 maximum possible resource allocation can be made to the video subsystem
43 as this is by-far the most resource-sensitive of the on-chip functions.
44
45 The primary issue with memory allocation is that of moving the video
46 buffers once a display mode is chosen. Indeed when a video mode change
47 occurs the memory footprint of the video subsystem changes.
48
49 Since video memory is difficult to move without changing the display
50 (unless sufficient contiguous memory can be provided for the old and new
51 modes simultaneously) the video driver fully utilises the memory area
52 given to it by aligning fb0 to the start of the area and fb1 to the end
53 of it. Any memory left over in the middle is used for the acceleration
54 functions, which are transient and thus their location is less critical
55 as it can be moved.
56
57
58 Configuration
59 -------------
60
61 The platform device driver uses a set of platform data to pass
62 configurations through to the core and the subsidiary drivers
63 so that there can be support for more than one system carrying
64 an SM501 built into a single kernel image.
65
66 The PCI driver assumes that the PCI card behaves as per the Silicon
67 Motion reference design.
68
69 There is an errata (AB-5) affecting the selection of the
70 of the M1XCLK and M1CLK frequencies. These two clocks
71 must be sourced from the same PLL, although they can then
72 be divided down individually. If this is not set, then SM501 may
73 lock and hang the whole system. The driver will refuse to
74 attach if the PLL selection is different.
75

3. 한국어 전문 번역

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

SM501 multifunction device

1-13

이 문서는 2006·2007 Simtec Electronics 저작물인 SM501 driver 설명입니다.

Silicon Motion SM501 multimedia companion chip은 USB host controller, USB gadget, asynchronous serial port, audio, dual-display video interface 등 여러 interface를 제공할 수 있는 multifunction device입니다.

Device는 PCI 또는 local bus로 연결할 수 있으며 system에 따라 enable되는 function이 다릅니다.

SM501 기능과 연결
구분내용
ChipSilicon Motion SM501 multimedia companion
InterfaceUSB host/gadget, serial, audio, dual display
Host connectionPCI 또는 local bus
Copyright2006, 2007 Simtec Electronics

.. include:: <isonum.txt>

============
SM501 Driver
============

:Copyright: |copy| 2006, 2007 Simtec Electronics

The Silicon Motion SM501 multimedia companion chip is a multifunction device
which may provide numerous interfaces including USB host controller USB gadget,
asynchronous serial ports, audio functions, and a dual display video interface.
The device may be connected by PCI or local bus with varying functions enabled.

MFD core와 platform device

14-33

`drivers/mfd`의 core driver는 특정 hardware block을 관리하는 child driver에 common service를 제공합니다. 여기에는 common register locking, clock control, resource management가 포함됩니다.

Core는 platform device·driver system을 통해 PCI 기반 chip과 generic bus 기반 chip 모두의 driver를 등록합니다.

Device를 detect하면 core는 platform data에 지정될 수 있는 설정으로 chip을 초기화하고, 선택된 peripheral 집합을 각 driver용 platform device로 export합니다.

Platform device system만으로 child driver를 지원할 기능이 충분하므로 core는 이를 재사용하며 새로운 bus type과 관련 code를 만들지 않습니다.

SM501 MFD core
PCI or local bus SM501`drivers/mfd` coreRegister lock / clock / resource servicesPlatform child devicesBlock-specific drivers
Platform dataChip initialization and selected peripherals

하나의 multifunction chip을 초기화한 뒤 enable된 hardware block을 platform child device로 분리합니다.

Core
----

The core driver in drivers/mfd provides common services for the
drivers which manage the specific hardware blocks. These services
include locking for common registers, clock control and resource
management.

The core registers drivers for both PCI and generic bus based
chips via the platform device and driver system.

On detection of a device, the core initialises the chip (which may
be specified by the platform data) and then exports the selected
peripheral set as platform devices for the specific drivers.

The core re-uses the platform device system as the platform device
system provides enough features to support the drivers without the
need to create a new bus-type and the associated code to go with it.

Peripheral resource view와 video memory

34-57

각 peripheral은 정상 동작에 필요한 resource 집합만 보도록 device view가 암묵적으로 좁혀집니다.

중앙화된 memory allocation으로 on-chip function 중 resource에 가장 민감한 video subsystem에 가능한 최대 resource를 할당할 수 있습니다.

핵심 문제는 display mode를 선택한 뒤 video buffer를 이동하는 것입니다. Video mode가 바뀌면 subsystem의 memory footprint도 달라집니다.

기존 mode와 새 mode용 contiguous memory를 동시에 충분히 제공하지 않는 한 display를 바꾸지 않고 video memory를 옮기기 어렵습니다. 따라서 video driver는 받은 memory area에서 `fb0`를 시작에, `fb1`을 끝에 정렬해 전체 영역을 활용합니다.

가운데 남은 memory는 transient acceleration function에 사용합니다. Acceleration data는 위치를 옮길 수 있어 framebuffer보다 배치 제약이 작습니다.

Video memory area 배치
영역배치특성
`fb0`Memory area 시작Display buffer, 이동 어려움
Acceleration가운데 남은 영역Transient, 이동 가능
`fb1`Memory area 끝Display buffer, 이동 어려움

양끝 framebuffer 사이의 가변 공간을 acceleration에 사용해 mode별 footprint 변화에 대응합니다.

Resources
---------

Each peripheral has a view of the device which is implicitly narrowed to
the specific set of resources that peripheral requires in order to
function correctly.

The centralised memory allocation allows the driver to ensure that the
maximum possible resource allocation can be made to the video subsystem
as this is by-far the most resource-sensitive of the on-chip functions.

The primary issue with memory allocation is that of moving the video
buffers once a display mode is chosen. Indeed when a video mode change
occurs the memory footprint of the video subsystem changes.

Since video memory is difficult to move without changing the display
(unless sufficient contiguous memory can be provided for the old and new
modes simultaneously) the video driver fully utilises the memory area
given to it by aligning fb0 to the start of the area and fb1 to the end
of it. Any memory left over in the middle is used for the acceleration
functions, which are transient and thus their location is less critical
as it can be moved.

Platform data와 clock errata

58-74

Platform device driver는 platform data로 configuration을 core와 subsidiary driver에 전달합니다. 하나의 kernel image가 서로 다른 SM501 탑재 system을 여러 개 지원할 수 있게 합니다.

PCI driver는 PCI card가 Silicon Motion reference design대로 동작한다고 가정합니다.

Errata AB-5는 `M1XCLK`와 `M1CLK` frequency 선택에 영향을 줍니다. 두 clock은 같은 PLL을 source로 사용해야 하며 그 뒤에는 각각 독립적으로 divide할 수 있습니다.

PLL 선택이 다르면 SM501이 lock되어 system 전체가 hang될 수 있으므로 driver는 서로 다른 PLL selection을 감지하면 attach를 거부합니다.

SM501 clock safety rule
Platform data`M1XCLK` PLL selectionSame PLL check`M1CLK` PLL selection
Same PLLIndependent divisorsAttach
Different PLLRefuse attachPrevent system hang

두 clock의 source PLL 일치를 attach 조건으로 강제해 chip lock과 system hang을 방지합니다.

Configuration
-------------

The platform device driver uses a set of platform data to pass
configurations through to the core and the subsidiary drivers
so that there can be support for more than one system carrying
an SM501 built into a single kernel image.

The PCI driver assumes that the PCI card behaves as per the Silicon
Motion reference design.

There is an errata (AB-5) affecting the selection of the
of the M1XCLK and M1CLK frequencies. These two clocks
must be sourced from the same PLL, although they can then
be divided down individually. If this is not set, then SM501 may
lock and hang the whole system. The driver will refuse to
attach if the PLL selection is different.