Adaptation/GUID-4E3C086B-25BE-4DAC-9E21-CFC4F8B792A5.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-4E3C086B-25BE-4DAC-9E21-CFC4F8B792A5" xml:lang="en"><title>DMA Technology Guide</title><shortdesc>Describes the Direct Memory Access framework.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    13 <section id="GUID-E987EF55-27CE-4EC2-B250-2C3D7C36CAF9"><title>Purpose</title><p>The DMA framework provides a generic simple interface for the
       
    14 clients to access DMA resources in a device. The primary clients are
       
    15 device drivers that will use the DMA framework to set up DMA transfers.
       
    16 A device can have more than one DMA controller (DMAC). </p></section>
       
    17 <section id="GUID-7607CC80-0FA0-4FC2-897A-C4AB6B6C74FC"><title>Architectural
       
    18 concepts</title><p>The key concepts related to DMA framework are:</p><fig id="GUID-ECCF1F57-DBD0-4653-A631-F8972E24DECF">
       
    19 <title>DMA Framework</title>
       
    20 <image href="GUID-10FE825A-4383-4A10-A507-58577BB230FB_d0e89974_href.png" placement="inline"/>
       
    21 </fig><dl>
       
    22 <dlentry>
       
    23 <dt>DMA Client</dt>
       
    24 <dd><p>A device driver or a kernel object that needs to use the resources
       
    25 of the DMA framework. On the Symbian platform, the Physical Device
       
    26 Drivers are the primary clients of the DMA framework. </p></dd>
       
    27 </dlentry>
       
    28 <dlentry>
       
    29 <dt>DMA Platform Service API</dt>
       
    30 <dd><p>The generic interface to provide DMA services to the clients.</p></dd>
       
    31 </dlentry>
       
    32 <dlentry>
       
    33 <dt>DMA Import Library</dt>
       
    34 <dd><p>The DMA clients link against the <filepath>dma.lib</filepath> file.</p></dd>
       
    35 </dlentry>
       
    36 <dlentry>
       
    37 <dt>DMA Platform-Independent Layer (PIL)</dt>
       
    38 <dd><p>The platform-independent layer contains the generic framework
       
    39 independent from the hardware.</p></dd>
       
    40 </dlentry>
       
    41 <dlentry>
       
    42 <dt>DMA Platform-Specific Layer (PSL)</dt>
       
    43 <dd><p>The platform-specific layer is specific to the baseport and
       
    44 the hardware used.</p></dd>
       
    45 </dlentry>
       
    46 <dlentry>
       
    47 <dt>DMA Controller (DMAC)</dt>
       
    48 <dd><p>The DMAC is the DMA hardware implementation. The number of
       
    49 DMAC in the implementation of the DMA Framework depends on the hardware.
       
    50 The DMAC is a peripheral to the CPU and is programmed to control data
       
    51 transfers without using the CPU. </p></dd>
       
    52 </dlentry>
       
    53 </dl></section>
       
    54 <section id="GUID-CAC0FE8F-A338-4B0E-92ED-7A1D1FD52C24"><title>DMA
       
    55 functionality</title><p>The key concepts related to functionality
       
    56 provided by the DMA framework are:</p><dl>
       
    57 <dlentry>
       
    58 <dt>Scatter/Gather Mode</dt>
       
    59 <dd><p>Some DMA controllers transfer data using scatter/gather mode.
       
    60 In this mode, the operating system creates a DMA descriptor with source
       
    61 and destination memory addresses and the configuration. The source
       
    62 and destination data can be a list of scattered memory blocks. The
       
    63 DMA controller uses this configuration to perform the data transfer.</p></dd>
       
    64 </dlentry>
       
    65 <dlentry>
       
    66 <dt>DMA Descriptors</dt>
       
    67 <dd><p>The data structure used by the DMA framework to store the configuration
       
    68 of the data transfer. These will store details such as source address,
       
    69 destination address, number of bytes and pointer to the next descriptor,
       
    70 when the DMA is used to transfer disjoint blocks of data. This structure
       
    71 is defined in the platform specific layer. The descriptors are always
       
    72 used to store the configuration even if the DMA controller does not
       
    73 support scatter/gather mode. When the scatter/gather mode is not supported
       
    74 by the DMAC, the descriptors used to store the configuration are called
       
    75 as pseudo-descriptors.</p></dd>
       
    76 </dlentry>
       
    77 <dlentry>
       
    78 <dt>Descriptor Headers</dt>
       
    79 <dd><p>The descriptor headers are used to store additional information
       
    80 about the descriptors. The descriptors are accessed using the descriptor
       
    81 headers which contain the pointer to the descriptor.</p></dd>
       
    82 </dlentry>
       
    83 <dlentry>
       
    84 <dt>Transfer Request</dt>
       
    85 <dd><p>The device drivers configure and initialize a data transfer
       
    86 using the class <xref href="GUID-780F4D53-5546-3B69-B328-0226C70EBDE2.dita"><apiname>DDmaRequest</apiname></xref>. The data can be transferred
       
    87 between:<ul>
       
    88 <li><p>memory to memory</p></li>
       
    89 <li><p>memory to peripheral</p></li>
       
    90 <li><p>peripheral to memory</p></li>
       
    91 </ul>The transfer request stores the callback function of the clients.
       
    92 The callback function is used to notify the success or failure of
       
    93 a data transfer.</p></dd>
       
    94 </dlentry>
       
    95 <dlentry>
       
    96 <dt>DMA Channel</dt>
       
    97 <dd><p>The object which represents a single hardware, logical or a
       
    98 virtual channel. In the DMA platform service API, each DMA channel
       
    99 is referred to by a 32-bit value called a cookie. Each DMA transfer
       
   100 is in the form of a description header and its associated DMA descriptor.
       
   101 The queue of transfer requests (both being transferred and pending)
       
   102 consists of a linked list of the DMA headers. </p></dd>
       
   103 </dlentry>
       
   104 <dlentry>
       
   105 <dt>DMA Channel Allocator</dt>
       
   106 <dd><p>The channel manager controls the opening and closing of DMA
       
   107 channels. The channel manager functions are defined in the platform
       
   108 independent layer and implemented in the platform specific layer. </p></dd>
       
   109 </dlentry>
       
   110 </dl></section>
       
   111 <section id="GUID-F64155FC-5245-447F-88E7-C642EDEB2CEE"><title>Typical
       
   112 Uses</title><p>The typical use cases of a DMA framework are:</p><ul>
       
   113 <li><p>programmable data transfer between hardware peripherals and
       
   114 memory buffers</p></li>
       
   115 <li><p>programmable data transfer of block of data between different
       
   116 regions of memory</p></li>
       
   117 </ul></section>
       
   118 </conbody><related-links>
       
   119 <link href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0424b/index.html.dita">
       
   120 <linktext>ARM DMA Controller Reference Manual</linktext></link>
       
   121 </related-links></concept>