blob: a77538673f6377695a7874d8847ff1555674fb98 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Khoronzhuk, Ivan8062b052014-06-07 05:10:49 +03002/*
3 * AEMIF definitions
4 *
5 * (C) Copyright 2012-2014
6 * Texas Instruments Incorporated, <www.ti.com>
Khoronzhuk, Ivan8062b052014-06-07 05:10:49 +03007 */
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
18struct 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
36void aemif_init(int num_cs, struct aemif_config *config);
37
38#endif