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