pi_tests.h
2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef __PIDV_TESTS_HDR__
#define __PIDV_TESTS_HDR__
/*
* Tests returning int return PASS, FAIL, or TESTERROR.
* PASS/FAIL indicates the test was able to run and
* whether it completed successfully. TESTERROR
* indicates a failure in code supporting the
* actual test, such as malloc returning NULL.
*
* Tests returning void are wrappers that drive the
* tests returning int and control output.
*
*/
/*
* Flash controller tests
*/
void flashCtlReadId(const u16 expectedIds[]);
void flashCtlFullPageRead(char *flashInitFileName,
const u32 flashSimDeviceSize[]);
void flashCtlBlockOperations(const u32 flashSimDeviceSize[]);
void flashCtlPartialPageReads(const u32 flashSimDeviceSize[]);
int flashCtlOobReadBufPack(const u32 flashSimDeviceSize[]);
void flashCtlStopAndReset(const u32 flashSimDeviceSize[]);
void flashCtlReadStatus(const u32 flashSimDeviceSize[]);
void flashCtlModuleState(const u32 flashSimDeviceSize[]);
int flashReadId(int intEnable,int numDevices,const u16 expectedIds[]);
int flashFullPageReadWalk(FILE *fp,const u32 devSize[]);
int flashFullPageReadRandom(FILE *fp,const u32 devSize[]);
/*
* ECC tests
*/
void eccGen(const u32 flashSimDeviceSize[]);
void eccReadValid(const u32 flashSimDeviceSize[]);
void eccSingleBitErr(const u32 flashSimDeviceSize[]);
void eccDoubleBitErr(const u32 flashSimDeviceSize[]);
void eccSingleBitGateLevel(int device,int bigDevice);
/*
* PI Buffer DMA tests
*/
int piBufDmaTest();
void piBufDmaIntTest();
void piBufDmaErrTest();
void piBufDmaModTest();
void piBufDmaRand(u32 dramStartAddr,int dramSize,int verify);
int startDmaToBuf(u8 *data, u32 pi_addr, u32 num_bytes);
int checkDmaToBuf(u8 *data, u32 pi_addr, u32 num_bytes);
int CheckDmaToDramAccess(u32 pi_addr,int num_bytes, int expect_fail);
/*
* AES tests
*/
int piAesTestRandomKeyDataIv(int intrEnable,
u32 ivIndx16,u32 dataIndex16,u32 size16,
u8 **rdecdata, u8 **rindata);
int piAesTestRandomKeyDataIvCheck(int intEnable,
u32 dataIndex16,u32 size16,
u8 *decdata,u8 *indata);
int piAesCheckClearIntr();
void aesGateLevel();
/*
* ATB tests
*/
int piAtbEntryIoTest();
int piAtbDmaTest();
void piAtbDmaIntTest(char *flashInitFileName);
void piAtbDmaErrTest(char *flashInitFileName);
void piAtbDmaPioTest(char *flashInitFileName);
/*
* Register i/o tests
*/
int piRegIoTest();
int piBufIoTest();
/*
* Register reset state test
*/
int RegResetStateTest();
/*
* GPIO tests
*/
void gpioSignals();
void gpioBoardId();
/*
* Memory Module Indicator test
*/
void memModIndicators();
/*
* Access Control
*/
void accCtrlTest(const u32 flashSimDeviceSize[]);
/*
* IDE
*/
void ideDebugPort();
#endif