社区
嵌入开发(WinCE)
帖子详情
请问“device driver porting”中的porting是什么意思?
printk
2003-03-24 05:04:03
经常看到
“device driver porting”
或“Linux kernel porting”
之类,
不知有谁知道其中的porting是什么意思?
...全文
1318
2
打赏
收藏
请问“device driver porting”中的porting是什么意思?
经常看到 “device driver porting” 或“Linux kernel porting” 之类, 不知有谁知道其中的porting是什么意思?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
joyfly
2003-03-25
打赏
举报
回复
移植
初学者
2003-03-24
打赏
举报
回复
不知是入口还是出口。
Port
ing
device
driver
s to the 2.6 kernel
非常好的
driver
移植参考文档,内容来源于lwn.net上的Linux2.6驱动移植系列文章, 由晏渭川收集整理.
LCD
driver
port
ing
_06_02_16
LCD
driver
port
ing
_06_02_16
vxbus_
device
_
driver
_developers_guide_6.9
PART I: VXBUS FUNDAMENTALS 1 Gett
ing
Started with
Device
Driver
Development .................................... 3 1.1 About
Device
Driver
s ..................................................................................................... 3 1.2 About this Documentation ............................................................................................ 4 1.2.1 Intended Audience ........................................................................................... 4 1.2.2 Navigat
ing
this Manual .................................................................................. 4 Experienced VxWorks
Device
Driver
Developers ........................................ 4 Novice VxWorks
Device
Driver
Developers ................................................. 5 1.2.3 Documentation Conventions .......................................................................... 5 1.3 Additional Documentation Resources ....................................................................... 6 2 VxBus and VxBus
Device
Driver
s ............................................................. 7 2.1 Introduction ...................................................................................................................... 7 2.2 About VxBus ................................................................................................................... 7 2.3 VxBus
Device
Driver
s ................................................................................................... 8 2.4 Design Goals ................................................................................................................... 11 2.4.1 Performance ....................................................................................................... 11 2.4.2 Maintenance and Readability .......................................................................... 11 2.4.3 Ease of Configuration ....................................................................................... 12 2.4.4 Performance Test
ing
......................................................................................... 12 2.4.5 Code Size ............................................................................................................ 12 3
Device
Driver
Fundamentals ..................................................................... 13 3.1 Introduction ...................................................................................................................... 13 3.2
Driver
Classes ................................................................................................................. 14 VxBus
Device
Driver
Developer's Guide, 6.9 iv 3.2.1 General Classes .................................................................................................. 14 Serial
Driver
s .................................................................................................... 14 Storage
Driver
s ................................................................................................. 14 Network Interface
Driver
s .............................................................................. 15 Non-Volatile RAM
Driver
s ............................................................................. 15 Timer
Driver
s .................................................................................................... 16 DMA Controller
Driver
s ................................................................................. 16 Bus Controller
Driver
s ..................................................................................... 16 USB
Driver
s ....................................................................................................... 17 Interrupt Controller
Driver
s ........................................................................... 17 Multifunction
Driver
s ...................................................................................... 17 Remote Process
ing
Element
Driver
s ............................................................. 18 Console
Driver
s ................................................................................................ 18 Resource
Driver
s .............................................................................................. 19 3.2.2 Other Classes .................................................................................................... 19 3.3
Driver
Organization ....................................................................................................... 19 3.3.1 File Location ...................................................................................................... 20 Wind River
Driver
s ........................................................................................... 20 Third-Party
Driver
s .......................................................................................... 20 3.3.2 Sample
Driver
Files: wrsample ....................................................................... 21 3.3.3 Required Files ................................................................................................... 21
Driver
Source File ............................................................................................. 22 Component Description File ........................................................................... 24
Driver
Configuration Stub Files ..................................................................... 29 README File .................................................................................................... 31
Device
Driver
Makefiles .................................................................................. 31 3.4 VxBus
Driver
Methods .................................................................................................. 33 3.4.1 Represent
ing
Driver
Methods in the Documentation ................................ 33 3.4.2 Parts of a
Driver
Method ................................................................................. 33 3.4.3 Call
ing
Driver
Methods ................................................................................... 34 3.4.4 Advertis
ing
Driver
Methods .......................................................................... 35 3.4.5
Driver
Method Limitations ............................................................................. 36 3.5
Driver
Run-time Life Cycle .......................................................................................... 36 3.5.1
Driver
Initialization Sequence ........................................................................ 36 Mak
ing
Assumptions About Initialization Order ....................................... 37 Early in the Boot Process ................................................................................. 37 sysHwInit( ), PLB, and Hardware Discovery ............................................... 37
Driver
Registration ........................................................................................... 38
Driver
Initialization Phase 1 ........................................................................... 38 Kernel Startup ................................................................................................... 39
Driver
Initialization Phase 2 ........................................................................... 39
Driver
Initialization Phase 3 ........................................................................... 39 3.5.2 Invok
ing
a
Driver
Method .............................................................................. 39 3.5.3 Run-time Operation ......................................................................................... 39 Contents v Unload
ing
a
Driver
.......................................................................................... 40 Remov
ing
a
Device
from the System ............................................................ 40 Dissociat
ing
a
Device
from a
Driver
.............................................................. 40 3.5.4 Handl
ing
a System Shutdown Notification ................................................. 41 3.5.5 Handl
ing
Late
Driver
Registration ................................................................ 41 3.5.6
Driver
Registration Order Considerations ................................................... 42 3.5.7
Driver
-to-
Device
Match
ing
and Hardware Availability ............................. 42 PLB ..................................................................................................................... 43 Other Bus Types ................................................................................................ 43 3.6 Services Available to
Driver
s ....................................................................................... 44 3.6.1 Configuration .................................................................................................... 44 Determin
ing
Driver
Configuration Information ......................................... 45 Respond
ing
to Changes in
Device
Parameters ............................................ 47 3.6.2 Memory Allocation .......................................................................................... 47 Allocat
ing
Memory Dur
ing
System Startup ................................................ 48 Allocat
ing
Memory Dur
ing
Normal System Operation ............................. 49 Intermix
ing
Memory Allocation Methods within a S
ing
le
Driver
........... 49 3.6.3 Non-Volatile RAM Sup
port
............................................................................. 49 3.6.4 Hardware Access .............................................................................................. 50 Find
ing
the Address of the Hardware Registers ......................................... 50 Read
ing
and Writ
ing
to the Hardware Registers ........................................ 51 Special Requirements for Hardware Register Access ................................. 53 VxBus Version Considerations ........................................................................ 53 3.6.5 Interrupt Handl
ing
........................................................................................... 54 Overview of Interrupt Handl
ing
.................................................................... 54 Interrupt Indexes .............................................................................................. 54 Dynamic Interrupt Handl
ing
.......................................................................... 55 Minimiz
ing
Work Performed Within an ISR ................................................ 56 3.6.6 Synchronization ................................................................................................ 57 Task-Level Synchronization ............................................................................ 57 Interrupt-Level Synchronization .................................................................... 58 3.6.7 Direct Memory Access (DMA) ....................................................................... 59 vxbDmaBufLib .................................................................................................. 60 DMA Considerations ........................................................................................ 60 Allocat
ing
External DMA Engines ................................................................ 63 3.6.8 Atomic Operators ............................................................................................. 65 3.7 BSP Configuration ......................................................................................................... 66 3.7.1 Requirements for PLB
Device
s ....................................................................... 67 3.7.2 Configur
ing
Device
Parameters in the BSP .................................................. 68 3.8 SMP Considerations ...................................................................................................... 69 3.8.1 Lack of Implicit Lock
ing
................................................................................. 69 VxBus
Device
Driver
Developer's Guide, 6.9 vi 3.8.2 True Task-to-Task Contention ......................................................................... 70 3.8.3 Interrupt Rout
ing
............................................................................................. 70 3.8.4 Deferr
ing
Interrupt Process
ing
...................................................................... 71 3.9
Device
Memory Mapp
ing
in 64-Bit
Device
s .............................................................. 72 3.10 Physical-to-Virtual Address Translations in 64-Bit VxWorks ................................. 73 3.10.1 64-bit Changes to the Memory Management Model ................................... 73 3.10.2
Port
ing
Driver
s That Rely on Physical-to-Virtual Address Translations .. 74 Transfer Us
ing
Descriptors .............................................................................. 74 Strategies When Order is Unpredictable ....................................................... 75 4 Development Strategies ............................................................................. 77 4.1 Introduction ...................................................................................................................... 77 4.2 Writ
ing
New VxBus
Driver
s ........................................................................................ 77 4.2.1 Creat
ing
the VxBus Infrastructure ................................................................. 78 Writ
ing
Driver
Source Files ............................................................................. 78 Writ
ing
Header Files (Optional) .................................................................... 78 Writ
ing
the Component Description File (CDF) .......................................... 78 Writ
ing
the Configuration Stub Files ............................................................ 79 Verify
ing
the Infrastructure ............................................................................ 80 4.2.2 Modify
ing
the BSP (Optional) ........................................................................ 80 4.2.3 Add
ing
Debug Code ........................................................................................ 81 4.2.4 Add
ing
the VxBus
Driver
Methods ............................................................... 81 4.2.5 Remov
ing
Global Variables ............................................................................ 82 4.3 VxBus Show Routines ................................................................................................... 83 4.3.1 Available Show Routines ................................................................................ 83 vxBusShow( ) ..................................................................................................... 83 vxbDevStructShow( ) ........................................................................................ 85 vxbDevPathShow( ) .......................................................................................... 86 4.3.2 PCI Show Routines .......................................................................................... 86 pciDevShow( ) ................................................................................................... 87 vxbPci
Device
Show( ) ........................................................................................ 87 vxbPciHeaderShow( ) ....................................................................................... 88 vxbPciFind
Device
Show( ) ................................................................................ 89 vxbPciFindClassShow( ) ................................................................................... 89 vxbPciConfigTopoShow( ) ............................................................................... 90 4.3.3 Us
ing
Show Routines from Software ............................................................ 91 4.3.4 Configur
ing
Show Routines into VxWorks .................................................. 93 4.4 Debugg
ing
....................................................................................................................... 94 4.4.1 Configur
ing
Show Routines ........................................................................... 94 Contents vii 4.4.2 Deferr
ing
Driver
Registration ........................................................................ 95 4.4.3 Includ
ing
Debug Code .................................................................................... 95 4.4.4 Confirm
ing
Register Access ............................................................................ 96 4.4.5 Increas
ing
the Size of HWMEM_POOL ........................................................ 96 4.4.6 Confirm
ing
Device
and
Driver
Name Matches ........................................... 96 5
Driver
Release Procedure .......................................................................... 99 5.1 Introduction ..................................................................................................................... 99 5.2
Driver
Source Location .................................................................................................. 100 5.3
Driver
-Specific Directories ............................................................................................ 101 5.4
Driver
Installation and the README File ................................................................ 102 5.5
Driver
Packag
ing
............................................................................................................ 103 5.6
Driver
Release Procedure ............................................................................................. 104 PART II:
DEVICE
DRIVER
PORT
ING
6 Class-Specific
Driver
Development .......................................................... 107 6.1 About VxBus
Driver
Classes ........................................................................................ 107 6.2 Before You Begin ............................................................................................................. 107 6.3 About the Class-Specific
Driver
Documentation ..................................................... 108 7 Bus Controller
Driver
s ................................................................................ 109 7.1 Introduction ..................................................................................................................... 109 7.2 Overview .......................................................................................................................... 109 7.3 VxBus
Driver
Methods .................................................................................................. 111 7.3.1 {busCtlrDevCfgRead}( ) ................................................................................... 111 7.3.2 {busCtlrCfgRead}( ) ........................................................................................... 112 7.3.3 {busCtlrDevCfgWrite}( ) ................................................................................... 113 7.3.4 {busCtlrCfgWrite}( ) .......................................................................................... 113 7.3.5 {busCtlrDevCtlr}( ) ............................................................................................ 114 7.3.6 {busCtlrAccessOverride}( ) .............................................................................. 115 Override for (*busCfgRead)( ) ......................................................................... 115 Override for (*busCfgWrite)( ) ........................................................................ 116 Override for (*vxbDevControl)( ) ................................................................... 116 VxBus
Device
Driver
Developer's Guide, 6.9 viii 7.3.7 {busCtlrCfgInfo}( ) ............................................................................................. 116 7.3.8 {busCtlrBaseAddrCvt}( ) .................................................................................. 117 7.3.9 {vxbDevRegMap}( ) ........................................................................................... 117 Specify
ing
a Predefined Transaction Type ..................................................... 119 Provid
ing
a New Transaction Type ............................................................... 120 7.3.10 {vxbIntDynaVecProgram}( ) ............................................................................. 122 7.4 Header Files ..................................................................................................................... 122 7.5 BSP Configuration .......................................................................................................... 123 7.5.1 PCI Configuration ............................................................................................ 124 7.5.2 PCI Autoconfiguration .................................................................................... 124 7.6 Available Utility Routines ............................................................................................ 125 7.6.1 PCI Configuration ............................................................................................ 125 7.6.2 PCI Autoconfiguration ..................................................................................... 126 7.6.3 vxbBusAnnounce( ) ........................................................................................... 126 7.6.4 vxbPciBusTypeInit( ) ......................................................................................... 127 7.7 Initialization .................................................................................................................... 127 7.7.1 Initialization Example ..................................................................................... 128 vxbBusAnnounce( ) ........................................................................................... 129 vxb
Device
Announce( ) ..................................................................................... 130 vxbDevStructAlloc( ) ........................................................................................ 130 vxbDevStructFree( ) .......................................................................................... 130 7.8 Debugg
ing
........................................................................................................................ 130 8 Direct Memory Access
Driver
s .................................................................. 131 8.1 Introduction ..................................................................................................................... 131 8.2 Overview ........................................................................................................................... 131 8.3 VxBus
Driver
Methods ................................................................................................... 132 8.3.1 {vxbDmaResourceGet}( ) .................................................................................. 132 8.3.2 {vxbDmaResourceRelease}( ) ........................................................................... 133 8.3.3 {vxbDmaResDedicatedGet}( ) .......................................................................... 133 8.4 Header Files ...................................................................................................................... 133 8.5 BSP Configuration .......................................................................................................... 134 8.6 Available Utility Routines ............................................................................................. 134 8.7 Initialization ..................................................................................................................... 134 Contents ix 8.8 DMA System Structures and Routines ....................................................................... 134 8.8.1 (*dmaRead)( ) ..................................................................................................... 135 8.8.2 (*dmaReadAndWait)( ) ..................................................................................... 135 8.8.3 (*dmaWrite)( ) .................................................................................................... 135 8.8.4 (*dmaWriteAndWait)( ) .................................................................................... 136 8.8.5 (*dmaCancel)( ) .................................................................................................. 136 8.8.6 (*dmaPause)( ) ................................................................................................... 136 8.8.7 (*dmaResume)( ) ................................................................................................ 136 8.8.8 (*dmaStatus)( ) ................................................................................................... 136 8.9 Debugg
ing
....................................................................................................................... 137 9 I2C
Driver
s ................................................................................................... 139 9.1 Introduction ...................................................................................................................... 139 9.2 Overview ........................................................................................................................... 139 9.3 VxBus
Driver
Methods ................................................................................................... 140 9.4 Header Files ...................................................................................................................... 141 9.5 BSP Configuration .......................................................................................................... 141 9.6 Initialization ..................................................................................................................... 143 9.7 Implement
ing
Driver
Service Routines ...................................................................... 144 (*VXB_I2C_LOCK_BUS_FUNC)( ) ................................................................. 145 (*VXB_I2C_UNLOCK_BUS_FUNC)( ) ........................................................... 145 (*VXB_I2C_START_FUNC)( ) .......................................................................... 145 (*VXB_I2C_STOP_FUNC)( ) ............................................................................ 146 (*VXB_I2C_READ_FUNC)( ) ........................................................................... 146 (*VXB_I2C_WRITE_FUNC)( ) ......................................................................... 146 (*VXB_I2C_DEV_READ)( ) .............................................................................. 147 (*VXB_I2C_DEV_WRITE)( ) ............................................................................ 147 9.8
Device
Driver
................................................................................................................... 148 9.8.1 Generic I2C
Device
s .......................................................................................... 149 10 Interrupt Controller
Driver
s ........................................................................ 151 10.1 Introduction ..................................................................................................................... 151 10.2 Overview .......................................................................................................................... 152 Interrupt Identification .................................................................................... 152 Interrupt Controller
Driver
Responsibilities ................................................. 152 Interrupt Controller Configurations ............................................................... 153 Dynamic Vectors ................................................................................................ 153 Interrupt Controller
Driver
s and Multiprocess
ing
....................................... 154 VxBus
Device
Driver
Developer's Guide, 6.9 x 10.3 VxBus
Driver
Methods .................................................................................................. 154 10.3.1 Basic Methods .................................................................................................... 154 {vxbIntCtlrAlloc}( ) ............................................................................................ 154 {vxbIntCtlrFree}( ) ............................................................................................. 155 {vxbIntCtlrConnect}( ) ...................................................................................... 155 {vxbIntCtlrDisconnect}( ) ................................................................................. 155 {vxbIntCtlrEnable}( ) ......................................................................................... 156 {vxbIntCtlrDisable}( ) ........................................................................................ 156 10.3.2 Dynamic Vector Methods ................................................................................ 156 {vxbIntDynaVecConnect}( ) ............................................................................. 156 10.3.3 Multiprocessor Methods ................................................................................. 157 {vxbIntCtlrIntReroute}( ) .................................................................................. 157 {vxbIntCtlrCpuReroute}( ) .............................................................................. 157 {vxIpiControlGet}( ) .......................................................................................... 157 10.4 Header Files ...................................................................................................................... 158 vxbIntrCtlr.h ....................................................................................................... 158 vxbIntCtlrLib.h .................................................................................................. 158 10.5 BSP Configuration .......................................................................................................... 158 10.5.1 Interrupt Input Table ........................................................................................ 159 10.5.2 Dynamic Vector Table ....................................................................................... 160 10.5.3 CPU Rout
ing
Table ............................................................................................ 162 10.5.4 Interrupt Priority ............................................................................................... 163 10.5.5 Crossbar Rout
ing
Table .................................................................................... 163 10.6 Available Utility Routines ............................................................................................. 164 10.6.1 intCtlrHwConfGet( ) ......................................................................................... 165 10.6.2 intCtlrISRAdd( ) ................................................................................................ 165 10.6.3 intCtlrISRDisable( ) ........................................................................................... 165 10.6.4 intCtlrISREnable( ) ............................................................................................ 166 10.6.5 intCtlrISRRemove( ) .......................................................................................... 166 10.6.6 intCtlrPinFind( ) ................................................................................................ 166 10.6.7 intCtlrTableArgGet( ) ........................................................................................ 166 10.6.8 intCtlrTableFlagsGet( ) ..................................................................................... 166 10.6.9 intCtlrTableIsrGet( ) .......................................................................................... 166 10.6.10 intCtlrHwConfShow( ) ..................................................................................... 166 10.6.11 intCtlrTableCreate( ) ......................................................................................... 167 10.6.12 intCtlrTableFlagsSet( ) ...................................................................................... 167 10.6.13 intCtlrTableUserSet( ) ....................................................................................... 167 10.6.14 VXB_INTCTLR_ISR_CALL( ) ......................................................................... 167 10.6.15 VXB_INTCTLR_PINENTRY_ENABLED( ) ................................................... 167 Contents xi 10.6.16 VXB_INTCTLR_PINENTRY_ALLOCATED( ) ............................................. 167 10.6.17 Dispatch Routines ............................................................................................. 168 vxbIntDynaCtlrInputInit( ) .............................................................................. 168 vxbIntDynaVecProgram( ) ............................................................................... 168 vxbIntDynaVecErase( ) ..................................................................................... 169 10.7 Initialization ..................................................................................................................... 169 10.8 Interrupt Controller Topologies and Hierarchies ..................................................... 169 10.9 Interrupt Priority ............................................................................................................. 170 10.10 ISR Dispatch .................................................................................................................... 171 10.11 Manag
ing
Dynamic Interrupt Vectors ........................................................................ 173 Configur
ing
Dynamic Vectors Us
ing
the Service
Driver
Routines ............ 174 Configur
ing
Dynamic Vectors in the BSP ..................................................... 174 Programm
ing
Dynamic Vectors ...................................................................... 175 Determin
ing
Dynamic Vector Values ............................................................ 175 10.12 Internal Representation of Interrupt Inputs .............................................................. 176 10.13 Multiprocessor Issues with VxWorks SMP ................................................................ 177 10.13.1 Rout
ing
Interrupt Inputs to Individual CPUs .............................................. 177 10.13.2 Interprocessor Interrupts ................................................................................. 178 10.13.3 Limitations in Multiprocessor Systems .......................................................... 182 10.14 Debugg
ing
........................................................................................................................ 182 11 Multifunction
Driver
s .................................................................................. 185 11.1 Introduction ...................................................................................................................... 185 11.2 Overview ........................................................................................................................... 185 11.3 VxBus
Driver
Methods ................................................................................................... 186 11.4 Header Files ...................................................................................................................... 186 11.5 BSP Configuration .......................................................................................................... 186 11.6 Available Utility Routines ............................................................................................. 187 vxbDevStructAlloc( ) ........................................................................................ 187 vxb
Device
Announce( ) ..................................................................................... 187 vxbDevRemovalAnnounce( ) .......................................................................... 187 vxbDevStructFree( ) .......................................................................................... 188 vxbBusAnnounce( ) ........................................................................................... 188 11.7 Initialization ..................................................................................................................... 188 11.8
Device
Interconnections ................................................................................................ 188 VxBus
Device
Driver
Developer's Guide, 6.9 xii 11.8.1 Interleaved Registers ........................................................................................ 188 11.8.2 Shared Resources ............................................................................................... 189 11.8.3 Other Interactions ............................................................................................. 190 11.9 Logical Location of Subordinate
Device
s ................................................................... 190 11.10 Debugg
ing
........................................................................................................................ 190 12 Network
Driver
s .......................................................................................... 191 12.1 Introduction ...................................................................................................................... 191 12.1.1 Terminology ....................................................................................................... 191 12.1.2 Network
ing
Overview ..................................................................................... 192 Seven Layer OSI Model .................................................................................... 192 Transmission Media and VxWorks ................................................................. 192 Protocols ............................................................................................................. 193 12.2 Network Interface
Driver
s ............................................................................................. 193 12.2.1 Network Interface
Driver
Overview .............................................................. 193 IPNET-Native
Driver
s ...................................................................................... 193 Functional Modules .......................................................................................... 194 Network
Driver
Interrupts ............................................................................. 195 12.2.2 VxBus
Driver
Methods for Network Interface
Driver
s .............................. 196 {muxDevConnect}( ) ......................................................................................... 196 {muxDevConnect2}( ) ....................................................................................... 197 {vxbDrvUnlink}( ) .............................................................................................. 199 {miiMediaUpdate}( ) ......................................................................................... 199 {miiRead}( ) ........................................................................................................ 200 {miiWrite}( ) ........................................................................................................ 201 12.2.3 Header Files for Network Interface
Driver
s ................................................. 201 12.2.4 BSP Configuration for Network Interface
Driver
s ...................................... 202 12.2.5 Available Utility Routines for Network Interface
Driver
s ......................... 203 MUX Interactions .............................................................................................. 203 Job Queue
ing
..................................................................................................... 204 Buffer Management .......................................................................................... 205 DMA Sup
port
.................................................................................................... 209 PHY and MII bus interactions ......................................................................... 210 12.2.6 Initialization for Network Interface
Driver
s ................................................ 212 12.2.7 MUX: Connect
ing
to Network
ing
Code ........................................................ 212 12.2.8 jobQueueLib: Deferr
ing
ISRs ........................................................................... 213 12.2.9 Work
ing
with Ipcom_pkt Packets ................................................................... 214 Sup
port
ing
Scatter-Gather with IPNET-Native
Driver
s .............................. 217 12.2.10 netBufLib: Transferr
ing
Data with M_BLKs ................................................ 218 12.2.11 Protocol Impact on
Driver
s .............................................................................. 220 Contents xiii 12.2.12 Other Network Interface
Driver
Issues .......................................................... 232 Receive Handl
ing
Method ............................................................................... 233 Receive Stall Handl
ing
..................................................................................... 240 12.2.13 Debugg
ing
Network Interface
Driver
s .......................................................... 241 Us
ing
VxBus Show Routines ........................................................................... 241 Deferr
ing
Driver
Registration ......................................................................... 241 Pair
ing
with a PHY instance ............................................................................ 242 Stress Test
ing
...................................................................................................... 242 Netperf Test Suite .............................................................................................. 243 Interrupt Validation .......................................................................................... 243 Additional Tests ................................................................................................. 243 12.3 PHY
Driver
s ...................................................................................................................... 249 12.3.1 PHY
Driver
Overview ...................................................................................... 250 PHY
Device
Prob
ing
and Discovery .............................................................. 250 MAC and MII Bus Relationship ...................................................................... 251 Generic PHY
Driver
Sup
port
........................................................................... 252 Generic TBI
Driver
Sup
port
............................................................................. 252 12.3.2 VxBus
Driver
Methods for PHY
Driver
s ....................................................... 253 Upper Edge Methods ........................................................................................ 253 Lower Edge Methods ....................................................................................... 253 12.3.3 Header Files for PHY
Driver
s ......................................................................... 255 12.3.4 BSP Configuration for PHY
Driver
s ............................................................... 255 12.3.5 Available Utility Routines for PHY
Driver
s .................................................. 255 Upper Edge Utility Routines ........................................................................... 256 Lower Edge Utility Routines ........................................................................... 256 12.3.6 Initialization for PHY
Driver
s ......................................................................... 257 12.3.7 Debugg
ing
PHY
Driver
s .................................................................................. 257 12.4 Wireless Ethernet
Driver
s .............................................................................................. 258 12.5 Hierarchical END
Driver
s ............................................................................................. 258 13 Non-Volatile RAM
Driver
s .......................................................................... 259 13.1 Introduction ...................................................................................................................... 259 NVRAM
Driver
s and TrueFFS ........................................................................ 259 13.2 Non-Volatile RAM
Driver
s ........................................................................................... 260 13.2.1 NVRAM
Driver
Overview ............................................................................... 260 13.2.2 VxBus
Driver
Methods for NVRAM
Driver
s ................................................ 260 {nonVolGet}( ) .................................................................................................... 260 {nonVolSet}( ) ..................................................................................................... 261 13.2.3 Header Files ....................................................................................................... 261 13.2.4 BSP Configuration for NVRAM
Driver
s ....................................................... 261 VxBus
Device
Driver
Developer's Guide, 6.9 xiv 13.2.5 Utility Routines for NVRAM
Driver
s ............................................................ 262 13.2.6 Initialization for NVRAM
Driver
s .................................................................. 262 13.2.7 NVRAM Block Sizes ......................................................................................... 262 13.2.8 Stack
ing
NVRAM Instances ............................................................................ 263 13.2.9 Debugg
ing
NVRAM
Driver
s ........................................................................... 263 13.3 Flash File System Sup
port
with TrueFFS ................................................................... 263 13.3.1 TrueFFS Overview ............................................................................................. 264 Core Layer .......................................................................................................... 264 MTD Layer ........................................................................................................ 264 Socket Layer ....................................................................................................... 264 Flash Translation Layer .................................................................................... 265 13.3.2 TrueFFS
Driver
Development Process ........................................................... 265 Us
ing
MTD-Sup
port
ed Flash
Device
s ........................................................... 265 Writ
ing
MTD Components .............................................................................. 269 Socket
Driver
s .................................................................................................... 276 Flash Translation Layer .................................................................................... 282 14 RapidIO
Driver
s ........................................................................................... 297 14.1 Introduction ...................................................................................................................... 297 14.2 Overview ........................................................................................................................... 297 14.3 VxBus
Driver
Methods ................................................................................................... 299 {vxbRapidIoCtlrInfoGet}( ) .............................................................................. 299 {sharedMemSup
port
APIGet}( ) ....................................................................... 300 {vxbMsgApiGet}( ) ............................................................................................ 300 14.4 Header Files ...................................................................................................................... 301 14.5 BSP Configuration .......................................................................................................... 301 RapidIO Bus Controller
Driver
....................................................................... 301 Virtual Message Network
Device
Driver
....................................................... 301 14.6 Initialization ..................................................................................................................... 302 Phase 1 ................................................................................................................ 302 Phase 2 ................................................................................................................ 302 Phase 3 ................................................................................................................ 303 14.7 Implement
ing
Driver
Service Routines ...................................................................... 303 RapidIO Bus Controller
Driver
....................................................................... 303 Message Controller
Driver
............................................................................... 307 15 Resource
Driver
s ........................................................................................ 311 15.1 Introduction ...................................................................................................................... 311 Contents xv 15.2 Overview ........................................................................................................................... 311 15.3 VxBus
Driver
Methods ................................................................................................... 312 15.4 Header Files ...................................................................................................................... 312 15.5 BSP Configuration .......................................................................................................... 312 15.6 Available Utility Routines ............................................................................................. 313 15.7 Initialization ..................................................................................................................... 313 15.8 Debugg
ing
........................................................................................................................ 313 16 Serial
Driver
s ............................................................................................... 315 16.1 Introduction ...................................................................................................................... 315 16.2 Overview ........................................................................................................................... 315 16.3 VxBus
Driver
Methods ................................................................................................... 316 16.3.1 {sioChanGet}( ) ................................................................................................... 316 16.3.2 {sioChanConnect}( ) .......................................................................................... 317 16.4 Header Files ...................................................................................................................... 317 16.5 BSP Configuration .......................................................................................................... 318 16.6 Available Utility Routines ............................................................................................. 318 16.7 Initialization ..................................................................................................................... 318 16.8 Polled Mode Versus Interrupt-Driven Mode ............................................................. 318 16.9 SIO_CHAN and SIO_DRV_FUNCS ............................................................................ 319 16.10 WDB ................................................................................................................................... 321 16.10.1 WDB and Kernel Initialization ........................................................................ 321 16.11 Serial
Driver
s, Initialization, and Interrupts ............................................................. 321 16.11.1 WDB and Interrupts ......................................................................................... 322 16.11.2 Initialization Order and Interrupts ................................................................. 322 16.11.3 Initialization Order ........................................................................................... 323 16.12 Debugg
ing
........................................................................................................................ 323 17 SPI
Driver
s ................................................................................................... 325 17.1 Introduction ...................................................................................................................... 325 17.2 Overview ........................................................................................................................... 325 VxBus
Device
Driver
Developer's Guide, 6.9 xvi 17.3 VxBus
Driver
Methods ................................................................................................... 326 17.4 Header Files ...................................................................................................................... 326 17.5 BSP Configuration .......................................................................................................... 327 17.6 Initialization ..................................................................................................................... 328 17.7 Implement
ing
Driver
Service Routines ...................................................................... 329 17.8
Device
Driver
................................................................................................................... 329 17.8.1 SPI_EEPROM ..................................................................................................... 330 17.8.2 SPI Flash ............................................................................................................. 330 18 Storage
Driver
s ........................................................................................... 333 18.1 Introduction ...................................................................................................................... 333 18.2 Overview ........................................................................................................................... 333 Updates in VxWorks 6.9, Update Pack 2, Service Pack 1 ............................ 334 Updates in VxWorks 6.9, Update Pack 3, Service Pack 3 ............................ 334 18.3 VxBus
Driver
Methods ................................................................................................... 335 18.4 Header Files ...................................................................................................................... 335 18.5 BSP Configuration .......................................................................................................... 336 18.6 Available Utility Routines ............................................................................................. 336 erfHandlerRegister( ) and erfHandlerUnregister( ) ..................................... 336 erfEventRaise( ) ................................................................................................. 336 xbdAttach( ) ....................................................................................................... 336 bio_done( ) .......................................................................................................... 337 18.7 Initialization ..................................................................................................................... 337 18.8 Interface with VxWorks File Systems ......................................................................... 337 18.8.1
Device
Creation ................................................................................................. 337 ERF Registration ................................................................................................ 338 Advertisement of XBD Methods ..................................................................... 338 ERF New
Device
Notification ......................................................................... 339 18.8.2 Process
ing
........................................................................................................... 340 xbd_request process
ing
.................................................................................... 340 18.8.3 Event Re
port
ing
................................................................................................. 341 18.9 Writ
ing
New Storage
Driver
s ........................................................................................ 342 18.10 Writ
ing
New SD/MMC/SDIO host controller
Driver
s ............................................ 343 18.11
Device
Driver
................................................................................................................... 344 Contents xvii 19 Timer
Driver
s ............................................................................................... 345 19.1 Introduction ...................................................................................................................... 345 19.2 Overview ........................................................................................................................... 345 19.3 VxBus
Driver
Methods ................................................................................................... 346 19.4 Header Files ...................................................................................................................... 349 19.5 BSP Configuration .......................................................................................................... 349 19.6 Available Utility Routines ............................................................................................. 349 19.7 Initialization ..................................................................................................................... 349 19.8 Data Structure Layout ..................................................................................................... 350 19.9 Implement
ing
Driver
Service Routines ...................................................................... 351 19.9.1 (*timerAllocate)( ) .............................................................................................. 351 19.9.2 (*timerRelease)( ) ............................................................................................... 351 19.9.3 (*timerRolloverGet)( ) ....................................................................................... 352 19.9.4 (*timerCountGet)( ) ........................................................................................... 352 19.9.5 (*timerDisable)( ) ............................................................................................... 353 19.9.6 (*timerEnable)( ) ................................................................................................ 354 19.9.7 (*timerISRSet)( ) ................................................................................................. 354 19.9.8 (*timerEnable64)( ) ............................................................................................ 355 19.9.9 (*timerRolloverGet64)( ) ................................................................................... 355 19.9.10 (*timerCountGet64)( ) ....................................................................................... 356 19.10 Integrat
ing
a Timer
Driver
............................................................................................ 357 19.10.1 VxWorks System Clock .................................................................................... 357 19.10.2 VxWorks Auxiliary Clock ................................................................................ 359 19.10.3 VxWorks Timestamp
Driver
............................................................................ 360 19.11 Debugg
ing
........................................................................................................................ 361 19.12 SMP Considerations ....................................................................................................... 361 20 USB
Driver
s ................................................................................................. 363 20.1 Introduction ...................................................................................................................... 363 20.2 Wind River USB Overview ............................................................................................ 363 20.2.1 USB Host Stack
Driver
s .................................................................................... 364 VxBus Model
Driver
s ....................................................................................... 364 Other Host
Driver
s ............................................................................................ 364 VxBus
Device
Driver
Developer's Guide, 6.9 xviii 20.2.2 USB Target Stack ............................................................................................... 364 20.3 Host Controller and Root Hub Class
Driver
s ............................................................ 365 20.3.1 VxBus
Driver
Methods ..................................................................................... 365 20.3.2 Header Files ....................................................................................................... 365 20.3.3 BSP Configuration ............................................................................................. 366 20.3.4 Available Utility Routines ................................................................................ 367 20.3.5 Initialization ....................................................................................................... 367 20.3.6 Debugg
ing
.......................................................................................................... 368 21 Other
Driver
Classes .................................................................................. 371 21.1 Introduction ...................................................................................................................... 371 21.2 Overview ........................................................................................................................... 371 21.3 VxBus
Driver
Methods ................................................................................................... 372 21.4 Header Files ...................................................................................................................... 373 21.5 BSP Configuration .......................................................................................................... 373 21.6 Available Utility Routines ............................................................................................. 373 21.7 Initialization ..................................................................................................................... 373 21.8 Debugg
ing
........................................................................................................................ 374 PART III:
DEVICE
DRIVER
PORT
ING
22 Legacy
Driver
s and Migration ................................................................... 377 22.1 Migration Overview ....................................................................................................... 377 22.2 Legacy
Driver
Overview ................................................................................................ 377 23 Migrat
ing
to VxBus ..................................................................................... 379 23.1 Overview ........................................................................................................................... 379 23.2 Available Resources ........................................................................................................ 379 Template
Driver
s ............................................................................................... 379 23.3
Port
ing
an Exist
ing
VxWorks
Driver
to VxBus .......................................................... 380 23.3.1 Verify
ing
Your Hardware and
Driver
Code .................................................. 380 23.3.2 Creat
ing
the VxBus Infrastructure ........
i.MX 6 BSP
Port
ing
Guide
Chapter 1 -
Port
ing
U-Boot from an i.MX 6 Reference Board to an i.MX 6 Custom Board Chapter 2 - Configur
ing
the IOMUX Controller Chapter 3 - Register
ing
a New UART
Driver
Chapter 4 - Add
ing
Sup
port
for SDHC Chapter 5 - Configur
ing
the SPI NOR Flash Memory Technology
Device
(MTD)
Driver
.....
Android
Port
ing
Guide
Android
Port
ing
Guide关于Android移植方面的文档,感觉原文作者。
嵌入开发(WinCE)
19,523
社区成员
41,568
社区内容
发帖
与我相关
我的任务
嵌入开发(WinCE)
硬件/嵌入开发 嵌入开发(WinCE)
复制链接
扫一扫
分享
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章