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

Last change on this file since 412 was 345, checked in by cfuguet, 11 years ago

giet_vm optimizations:

  • Several modifications in GIET_VM in order to support compilation with GCC optimizations (-O2) activated.
  • Adding missing volatile in some global variables.
  • Using ioread and iowrite utility functions in peripheral drivers which prevent GCC to remove writes or reads in hardware memory mapped registers.
  • Code refactoring of stdio printf functions. Now, shr_printf and tty_printf function reuse the same function body. The only difference is that shr_printf wraps printf function call with TTY get lock and release lock.
File size: 1.7 KB
RevLine 
[258]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///////////////////////////////////////////////////////////////////////////////////
12// TSAR Memory Cache configuration registers offsets and commands
13///////////////////////////////////////////////////////////////////////////////////
14
15enum SoclibMemCacheConfigRegs
16{
17    MEMC_LOCK,
18    MEMC_ADDR_LO,
19    MEMC_ADDR_HI,
20    MEMC_BUF_LENGTH,
21    MEMC_CMD_TYPE
22};
23
24enum SoclibMemCacheConfigCmd
25{
26    MEMC_CMD_NOP,
27    MEMC_CMD_INVAL,
28    MEMC_CMD_SYNC
29};
30
[345]31#define MMC_REG(func,idx) ((func<<7)|idx)
32
[258]33///////////////////////////////////////////////////////////////////////////////////
34// MEMC access functions (for TSAR architecture)
35///////////////////////////////////////////////////////////////////////////////////
36
[297]37extern void _mmc_inval( unsigned long long buf_paddr, 
38                        unsigned int buf_length );
[258]39
[297]40extern void _mmc_sync(  unsigned long long buf_paddr, 
41                        unsigned int buf_length);
[258]42
[297]43extern void _mmc_isr( unsigned int irq_type,
44                      unsigned int irq_id,
45                      unsigned int channel );
46
[258]47///////////////////////////////////////////////////////////////////////////////////
48
49#endif
50
51// Local Variables:
52// tab-width: 4
53// c-basic-offset: 4
54// c-file-offsets:((innamespace . 0)(inline-open . 0))
55// indent-tabs-mode: nil
56// End:
57// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
58
Note: See TracBrowser for help on using the repository browser.