source: trunk/tools/bootloader_tsar/boot_mmc_driver.h @ 349

Last change on this file since 349 was 1, checked in by alain, 8 years ago

First import

File size: 1.8 KB
RevLine 
[1]1///////////////////////////////////////////////////////////////////////////////////
2// File     : mmc_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7// This simplified driver provides only one INVAL command, and does not
8// use any lock to access the MMC registers, as the boot-loader does not
9// generate concurrent accesses to the MMC configuration interface.
10///////////////////////////////////////////////////////////////////////////////////
11
12#ifndef _GIET_MMC_DRIVERS_H_
13#define _GIET_MMC_DRIVERS_H_
14
15#include <hal_types.h>
16
17///////////////////////////////////////////////////////////////////////////////////
18// TSAR Memory Cache configuration registers offsets and commands
19///////////////////////////////////////////////////////////////////////////////////
20
21enum SoclibMemCacheFunc
22{
23    MEMC_CONFIG = 0,
24    MEMC_INSTRM = 1,
25    MEMC_RERROR = 2,
26
27    MEMC_FUNC_SPAN = 0x200
28};
29
30enum SoclibMemCacheConfigRegs
31{
32    MEMC_ADDR_LO,
33    MEMC_ADDR_HI,
34    MEMC_BUF_LENGTH,
35    MEMC_CMD_TYPE
36};
37
38enum SoclibMemCacheConfigCmd
39{
40    MEMC_CMD_NOP,
41    MEMC_CMD_INVAL,
42    MEMC_CMD_SYNC
43};
44
45#define MMC_REG(func,idx) ((func<<7)|idx)
46
47///////////////////////////////////////////////////////////////////////////////////
48// MEMC access functions (for TSAR architecture)
49///////////////////////////////////////////////////////////////////////////////////
50
51extern int boot_mmc_inval( uint64_t buf_paddr, 
52                           uint32_t buf_length );
53
54
55#endif
56
57// Local Variables:
58// tab-width: 4
59// c-basic-offset: 4
60// c-file-offsets:((innamespace . 0)(inline-open . 0))
61// indent-tabs-mode: nil
62// End:
63// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
64
Note: See TracBrowser for help on using the repository browser.