blob: 11a7384cec97e85a6e422ef7ef5d44cbcf921f22 [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 {
Bastien Curutchet9f35e402024-10-21 17:13:26 +020019 void *base;
Khoronzhuk, Ivan8062b052014-06-07 05:10:49 +030020 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
37void aemif_init(int num_cs, struct aemif_config *config);
38
39#endif