2 * emif definitions to re-use davinci emif driver on Keystone2
4 * (C) Copyright 2012-2014
5 * Texas Instruments Incorporated, <www.ti.com>
6 * (C) Copyright 2007 Sergey Kubushyn <ksi@koi8.net>
8 * SPDX-License-Identifier: GPL-2.0+
13 #include <asm/arch/hardware.h>
15 struct davinci_emif_regs {
27 uint32_t ddrphyid_rev;
42 uint32_t nand4biteccload;
43 uint32_t nand4bitecc[4];
50 #define davinci_emif_regs \
51 ((struct davinci_emif_regs *)DAVINCI_ASYNC_EMIF_CNTRL_BASE)
53 #define DAVINCI_NANDFCR_NAND_ENABLE(n) (1 << ((n) - 2))
54 #define DAVINCI_NANDFCR_4BIT_ECC_SEL_MASK (3 << 4)
55 #define DAVINCI_NANDFCR_4BIT_ECC_SEL(n) (((n) - 2) << 4)
56 #define DAVINCI_NANDFCR_1BIT_ECC_START(n) (1 << (8 + ((n) - 2)))
57 #define DAVINCI_NANDFCR_4BIT_ECC_START (1 << 12)
58 #define DAVINCI_NANDFCR_4BIT_CALC_START (1 << 13)
60 /* Chip Select setup */
61 #define DAVINCI_ABCR_STROBE_SELECT (1 << 31)
62 #define DAVINCI_ABCR_EXT_WAIT (1 << 30)
63 #define DAVINCI_ABCR_WSETUP(n) ((n) << 26)
64 #define DAVINCI_ABCR_WSTROBE(n) ((n) << 20)
65 #define DAVINCI_ABCR_WHOLD(n) ((n) << 17)
66 #define DAVINCI_ABCR_RSETUP(n) ((n) << 13)
67 #define DAVINCI_ABCR_RSTROBE(n) ((n) << 7)
68 #define DAVINCI_ABCR_RHOLD(n) ((n) << 4)
69 #define DAVINCI_ABCR_TA(n) ((n) << 2)
70 #define DAVINCI_ABCR_ASIZE_16BIT 1
71 #define DAVINCI_ABCR_ASIZE_8BIT 0