diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-95A33491-17AC-4F12-948E-A1352ADDA483.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-95A33491-17AC-4F12-948E-A1352ADDA483.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,85 @@ + + + + + +DMA Implementation GuideExplains how to implement the DMA Platform Specific Layer +(PSL) for your platform. +

The DMA Framework is made of a PIL and a PSL. You have to write +a new Platform specific implementation code whenever your hardware +changes, but the PIL and the platform service API do not change.

+
Prerequisites

You should be familiar with the DMA Technology Guide and with the specifications of your hardware DMA controller.

+
Architecture

In the diagram below, the classes in green provide the platform +service API and the classes in blue implement the Platform-specific +functions (PSL).

+PSL class diagram + +
+
Implementation +files

The following table lists the important files of the +DMA Framework and what you should do with each of them. + + + +File +Usage + + + + +/os/kernelhwsrv/kernel/eka/include/drivers/dma.h +

This file is the main header file for DMA.

Include +it in the PSL implementation.

+
+ +/os/kernelhwsrv/kernel/eka/include/drivers/dma_v1.h +

This file contains the definitions of the PSL classes.

Refer to this file for the signature of the PSL functions.

+
+ +/os/kernelhwsrv/kernel/eka/drivers/dma/dmapil.cpp +This file is for information only: it contains the source code +for the generic implementation. + + +/os/kernelhwsrv/kernel/eka/drivers/dma/dma_lib.mmp +

This file is the MMP for the PIL.

Use it to build +the .LIB file for the PIL.

+
+ +/os/kernelhwsrv/bsptemplate/asspandvariant/template_assp/dmapsl.cpp +

This file contains the template code for the PSL implementation.

Copy it to your variant directory and modify it.

+
+ +/os/kernelhwsrv/bsptemplate/asspandvariant/template_assp/dma.mmp +

This file is the template MMP for the PSL implementation.

Copy it to your variant directory and modify it.

Use the +new file to build the DMA Framework (PIL and PSL).

+
+ + +

+
Implementation +process

To write the PSL for the DMA Framework, do the following:

    +
  1. Copy the template +listed in the above section to your own variant directory (at chip +level or at board level depending on where the DMA hardware is located).

  2. +
  3. Implement the DmaChannelMgr functions.

  4. +
  5. Derive the TDmac class and implement its controller-specific functions.

  6. +
  7. If necessary, +derive the TDmaChannel class or one of its sub-classes +to store channel-specific data.

  8. +
  9. Test the PSL +implementation.

  10. + +

+
+DMA +Client Interface Guide +DMA +Testing Guide +
\ No newline at end of file