source: soft/giet_vm/giet_drivers/dma_driver.h @ 323

Last change on this file since 323 was 320, checked in by alain, 10 years ago

All drivers have been modified to use only the information
contained in the hard_config.h file

File size: 2.5 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : dma_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_DMA_DRIVER_H_
9#define _GIET_DMA_DRIVER_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12// Multi DMA registers offset
13///////////////////////////////////////////////////////////////////////////////////
14
15enum DMA_registers
16{
17    DMA_SRC         = 0,
18    DMA_DST         = 1,
19    DMA_LEN         = 2,
20    DMA_RESET       = 3,
21    DMA_IRQ_DISABLE = 4,
22    DMA_SRC_EXT     = 5,
23    DMA_DST_EXT     = 6,
24    /**/
25    DMA_END         = 7,
26    DMA_SPAN        = 8,
27};
28
29enum SoclibDmaStatus
30{
31    DMA_SUCCESS      = 0,
32    DMA_READ_ERROR   = 1,
33    DMA_IDLE         = 2,
34    DMA_WRITE_ERROR  = 3,
35    DMA_BUSY         = 4,
36};
37
38
39///////////////////////////////////////////////////////////////////////////////////
40// Multi DMA variables and access functions  (vci_multi_dma)
41///////////////////////////////////////////////////////////////////////////////////
42
43// low level access functions
44extern unsigned int _dma_init( unsigned int cluster_xy,
45                               unsigned int channel_id );
46
47extern unsigned int _dma_reset( unsigned int  cluster_xy, 
48                                unsigned int  channel_id );
49
50extern unsigned int _dma_get_status( unsigned int  cluster_xy, 
51                                     unsigned int  channel_id );
52
53extern unsigned int _dma_start_transfer( unsigned int       cluster_xy,
54                                         unsigned int       channel_id,
55                                         unsigned long long dst_paddr,
56                                         unsigned long long src_paddr,
57                                         unsigned int       size );
58
59// higher level access function
60extern void _dma_copy(  unsigned int vspace_id,
61                        void*        dest,
62                        const void*  source,
63                        unsigned int size ); 
64
65extern void _dma_isr( unsigned int irq_type,
66                      unsigned int irq_id,
67                      unsigned int channel );
68
69///////////////////////////////////////////////////////////////////////////////////
70
71#endif
72
73// Local Variables:
74// tab-width: 4
75// c-basic-offset: 4
76// c-file-offsets:((innamespace . 0)(inline-open . 0))
77// indent-tabs-mode: nil
78// End:
79// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
80
Note: See TracBrowser for help on using the repository browser.