1 /*
2  * NAND Flash Controller Device Driver
3  * Copyright (c) 2009, Intel Corporation and its suppliers.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  */
19 
20 #ifndef _FFSDEFS_
21 #define _FFSDEFS_
22 
23 #define CLEAR 0			/*use this to clear a field instead of "fail"*/
24 #define SET   1			/*use this to set a field instead of "pass"*/
25 #define FAIL 1			/*failed flag*/
26 #define PASS 0			/*success flag*/
27 #define ERR -1			/*error flag*/
28 
29 #define   ERASE_CMD             10
30 #define   WRITE_MAIN_CMD        11
31 #define   READ_MAIN_CMD         12
32 #define   WRITE_SPARE_CMD       13
33 #define   READ_SPARE_CMD        14
34 #define   WRITE_MAIN_SPARE_CMD  15
35 #define   READ_MAIN_SPARE_CMD   16
36 #define   MEMCOPY_CMD           17
37 #define   DUMMY_CMD             99
38 
39 #define     EVENT_PASS                                  0x00
40 #define     EVENT_CORRECTABLE_DATA_ERROR_FIXED         0x01
41 #define     EVENT_UNCORRECTABLE_DATA_ERROR              0x02
42 #define     EVENT_TIME_OUT                              0x03
43 #define     EVENT_PROGRAM_FAILURE                       0x04
44 #define     EVENT_ERASE_FAILURE                         0x05
45 #define     EVENT_MEMCOPY_FAILURE                       0x06
46 #define     EVENT_FAIL                                  0x07
47 
48 #define     EVENT_NONE                                  0x22
49 #define     EVENT_DMA_CMD_COMP                          0x77
50 #define     EVENT_ECC_TRANSACTION_DONE                  0x88
51 #define     EVENT_DMA_CMD_FAIL                          0x99
52 
53 #define CMD_PASS        0
54 #define CMD_FAIL        1
55 #define CMD_ABORT       2
56 #define CMD_NOT_DONE    3
57 
58 #endif /* _FFSDEFS_ */
59