source: soft/giet_vm/giet_drivers/mmc_driver.h @ 481

Last change on this file since 481 was 481, checked in by alain, 9 years ago

1) The NIC, IOC, DMA and HBA drivers have been adapted to support the new _v2p_translate() function prototype (returns void).
2) The _mmc_inval() and _mmc_sync() functions does not use anymore the hard lock in the MMC, but use a soft spin_lock.
3) The NIC driver does not use anymore the GIET_NIC_BUFSIZE, GIET_NIC_NBUFS, and GIET_NIC_TIMEOUT parameters (removed from giet_config.h file).
4) The NIC driver registers map has been modified to support 64 bytes buffer descriptors for chained buffers.

File size: 2.0 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : mmc_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_MMC_DRIVERS_H_
9#define _GIET_MMC_DRIVERS_H_
10
11#include <hard_config.h>
12#include <locks.h>
13
14///////////////////////////////////////////////////////////////////////////////////
15// TSAR Memory Cache configuration registers offsets and commands
16///////////////////////////////////////////////////////////////////////////////////
17
18enum SoclibMemCacheConfigRegs
19{
20    MEMC_LOCK,
21    MEMC_ADDR_LO,
22    MEMC_ADDR_HI,
23    MEMC_BUF_LENGTH,
24    MEMC_CMD_TYPE
25};
26
27enum SoclibMemCacheConfigCmd
28{
29    MEMC_CMD_NOP,
30    MEMC_CMD_INVAL,
31    MEMC_CMD_SYNC
32};
33
34#define MMC_REG(func,idx) ((func<<7)|idx)
35
36///////////////////////////////////////////////////////////////////////////////
37// Distributed locks protecting MMC components (one per cluster)
38///////////////////////////////////////////////////////////////////////////////
39
40spin_lock_t  _mmc_lock[X_SIZE][Y_SIZE]  __attribute__((aligned(64)));
41
42///////////////////////////////////////////////////////////////////////////////////
43// MEMC access functions (for TSAR architecture)
44///////////////////////////////////////////////////////////////////////////////////
45
46extern void _mmc_inval( unsigned long long buf_paddr, 
47                        unsigned int buf_length );
48
49extern void _mmc_sync(  unsigned long long buf_paddr, 
50                        unsigned int buf_length);
51
52extern void _mmc_isr( unsigned int irq_type,
53                      unsigned int irq_id,
54                      unsigned int channel );
55
56///////////////////////////////////////////////////////////////////////////////////
57
58#endif
59
60// Local Variables:
61// tab-width: 4
62// c-basic-offset: 4
63// c-file-offsets:((innamespace . 0)(inline-open . 0))
64// indent-tabs-mode: nil
65// End:
66// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
67
Note: See TracBrowser for help on using the repository browser.