P2020 DMA Model
This section describes the P2020 DMA model.
The DMA controller transfers blocks of data between the interface and functional modules of this chip, independent of the cores or external hosts. It has four high-speed DMA channels. Both the cores and external devices can initiate DMA transfers.
The DMA module has two modes of operation: basic and extended. Basic mode is the DMA legacy mode, which does not support advanced features. Extended mode supports advanced features such as striding and flexible descriptor structures. These two basic modes allow users to initiate and end DMA transfers in various ways:
-
Direct mode: no descriptors are involved, software/user must initialize such required fields as source address and attributes and destination address and attributes.
-
Chaining mode: software must initialize descriptors in memory and such fields as link/list descriptor address before starting a transfer.
-
Single-write start mode: DMA process can be started using a single-write command to either the descriptor address register in one of the chaining modes or the source/destination address registers in one of the direct modes.
Configuration
The DMA programmable registers that occupy memory-mapped space are named according to P2020 QorIQ integrated processor reference manual. All 4 DMA channels have the same set of registers, so the register index is the channels id (from 0 to 3).
# set source address for channel 3
dma.SAR[3] = 0x40000000
// set source address for channel 3
temu_writeValueU32(dma, "SAR", 0x40000000, 3);
@DMA Reference
DMA Reference
Properties
Name | Type | Description |
---|---|---|
BCR |
[uint32_t; 4] |
DMA n byte count register |
CLNDAR |
[uint32_t; 4] |
DMA n current link descriptor address register |
CLSDAR |
[uint32_t; 4] |
DMA n current list descriptor address register |
Class |
*void |
Class object |
Component |
*void |
Pointer to component object if part of component |
DAR |
[uint32_t; 4] |
DMA n destination address register |
DATR |
[uint32_t; 4] |
DMA n destination attributes register |
DSR |
[uint32_t; 4] |
DMA n destination stride register |
ECLNDAR |
[uint32_t; 4] |
DMA n current link descriptor extended address register |
ECLSDAR |
[uint32_t; 4] |
DMA n extended current list descriptor address register |
ENLNDAR |
[uint32_t; 4] |
DMA n extended next link descriptor address register |
ENLSDAR |
[uint32_t; 4] |
DMA n extended next list descriptor address register |
LoggingFlags |
uint64_t |
Flags for logging info |
MR |
[uint32_t; 4] |
DMA n mode register |
NLNDAR |
[uint32_t; 4] |
DMA n next link descriptor address register |
NLSDAR |
[uint32_t; 4] |
DMA n next list descriptor address register |
Name |
*char |
Object name |
SAR |
[uint32_t; 4] |
DMA n source address register |
SATR |
[uint32_t; 4] |
DMA n source attributes register |
SR |
[uint32_t; 4] |
DMA n status register |
SSR |
[uint32_t; 4] |
DMA n source stride register |
TimeSource |
*void |
Time source object |
config.interrupt |
[uint8_t; 4] |
DMA IRQ number for each channel |
irqCtrl |
temu_IfaceRef/ <unknown> |
Interrupt controller |
memAccess |
temu_IfaceRef/ <unknown> |
Memory access for DMA. |
Registers
Register support is currently experimental! |
Register Bank default
Register BCR
- Description
-
DMA n byte count register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register CLNDAR
- Description
-
DMA n current link descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register CLSDAR
- Description
-
DMA n current list descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register DAR
- Description
-
DMA n destination address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register DATR
- Description
-
DMA n destination attributes register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register DSR
- Description
-
DMA n destination stride register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register ECLNDAR
- Description
-
DMA n current link descriptor extended address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register ECLSDAR
- Description
-
DMA n extended current list descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register ENLNDAR
- Description
-
DMA n extended next link descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register ENLSDAR
- Description
-
DMA n extended next list descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register MR
- Description
-
DMA n mode register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register NLNDAR
- Description
-
DMA n next link descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register NLSDAR
- Description
-
DMA n next list descriptor address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register SAR
- Description
-
DMA n source address register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |
Register SATR
- Description
-
DMA n source attributes register
- Reset value
-
0x00000000
- Warm reset mask
-
0x00000000
Field | Mask | Reset | Description |
---|---|---|---|
- |
- |
- |
- |