Changes between Version 2 and Version 3 of Component/Vci Dma


Ignore:
Timestamp:
Oct 29, 2007, 2:09:21 PM (17 years ago)
Author:
Nicolas Pouillon
Comment:

Dont document constants values

Legend:

Unmodified
Added
Removed
Modified
  • Component/Vci Dma

    v2 v3  
    1616= Memory region layout =
    1717
    18  * `DMA_SRC`: ADDRESS![3:0] = 0x0
     18 * `DMA_SRC`
    1919The source of memory copy.
    2020
    21  * `DMA_DST`: ADDRESS![3:0] = 0x4
     21 * `DMA_DST`
    2222The destination of memory copy
    2323
    24  * `DMA_LEN`: ADDRESS![3:0] = 0x8
     24 * `DMA_LEN`
    2525Length of transfer, in bytes. Writing to this register initiates the transfer, you should write to it after src and dst.
    2626This register gets back to 0 when transfer is finished.
    2727
    28  * `DMA_IRQ_ENABLED`: ADDRESS![3:0] = 0xC
     28 * `DMA_IRQ_ENABLED`
    2929  * Written to: A boolean enabling the IRQ line (0 is disabling)
    3030  * Read from: A boolean indicating the completion of the transfer, (0 is completed)
     
    4747    volatile int *dma = ((int*)dma_address);
    4848
    49     dma[DMA_DST] = (uint32_t)dst;
    50     dma[DMA_SRC] = (uint32_t)src;
    51     dma[DMA_LEN] = (uint32_t)len;
    52     while ( dma[DMA_LEN] )
     49    soclib_io_set( dma, DMA_DST, dst );
     50    soclib_io_set( dma, DMA_SRC, src );
     51    soclib_io_set( dma, DMA_LEN, len );
     52    while( soclib_io_get( dma, DMA_LEN ) )
    5353        ;
    5454    return dst;