1 /*
2  * AEMIF definitions
3  *
4  * (C) Copyright 2012-2014
5  *     Texas Instruments Incorporated, <www.ti.com>
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9 
10 #ifndef _AEMIF_H_
11 #define _AEMIF_H_
12 
13 #define AEMIF_NUM_CS               4
14 #define AEMIF_MODE_NOR             0
15 #define AEMIF_MODE_NAND            1
16 #define AEMIF_MODE_ONENAND         2
17 #define AEMIF_PRESERVE             -1
18 
19 struct aemif_config {
20 	unsigned mode;
21 	unsigned select_strobe;
22 	unsigned extend_wait;
23 	unsigned wr_setup;
24 	unsigned wr_strobe;
25 	unsigned wr_hold;
26 	unsigned rd_setup;
27 	unsigned rd_strobe;
28 	unsigned rd_hold;
29 	unsigned turn_around;
30 	enum {
31 		AEMIF_WIDTH_8	= 0,
32 		AEMIF_WIDTH_16	= 1,
33 		AEMIF_WIDTH_32	= 2,
34 	} width;
35 };
36 
37 void aemif_init(int num_cs, struct aemif_config *config);
38 
39 #endif
40