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

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

Remove the MMC_LOCK in the addressable registers map.

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_ADDR_LO,
21    MEMC_ADDR_HI,
22    MEMC_BUF_LENGTH,
23    MEMC_CMD_TYPE
24};
25
26enum SoclibMemCacheConfigCmd
27{
28    MEMC_CMD_NOP,
29    MEMC_CMD_INVAL,
30    MEMC_CMD_SYNC
31};
32
33#define MMC_REG(func,idx) ((func<<7)|idx)
34
35///////////////////////////////////////////////////////////////////////////////
36// Distributed locks protecting MMC components (one per cluster)
37///////////////////////////////////////////////////////////////////////////////
38
39spin_lock_t  _mmc_lock[X_SIZE][Y_SIZE]  __attribute__((aligned(64)));
40
41///////////////////////////////////////////////////////////////////////////////////
42// MEMC access functions (for TSAR architecture)
43///////////////////////////////////////////////////////////////////////////////////
44
45extern void _mmc_inval( unsigned long long buf_paddr, 
46                        unsigned int buf_length );
47
48extern void _mmc_sync(  unsigned long long buf_paddr, 
49                        unsigned int buf_length);
50
51extern void _mmc_isr( unsigned int irq_type,
52                      unsigned int irq_id,
53                      unsigned int channel );
54
55///////////////////////////////////////////////////////////////////////////////////
56
57#endif
58
59// Local Variables:
60// tab-width: 4
61// c-basic-offset: 4
62// c-file-offsets:((innamespace . 0)(inline-open . 0))
63// indent-tabs-mode: nil
64// End:
65// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
66
Note: See TracBrowser for help on using the repository browser.