mtd: nand: davinci: add header file for driver definitions
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>
Sat, 7 Jun 2014 01:22:52 +0000 (04:22 +0300)
committerTom Rini <trini@ti.com>
Thu, 19 Jun 2014 21:53:58 +0000 (17:53 -0400)
The definitions inside emif_defs.h concern davinci nand driver and
should be in it's header. So create header file for davinci nand
driver and move definitions from emif_defs.h and nand_defs.h to it.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
[trini: Fixup more davinci breakage]
Signed-off-by: Tom Rini <trini@ti.com>
29 files changed:
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
arch/arm/cpu/arm926ejs/davinci/dm365_lowlevel.c
arch/arm/cpu/armv7/keystone/aemif.c
arch/arm/include/asm/arch-davinci/emif_defs.h [deleted file]
arch/arm/include/asm/arch-davinci/hardware.h
arch/arm/include/asm/arch-davinci/nand_defs.h [deleted file]
arch/arm/include/asm/arch-keystone/emif_defs.h [deleted file]
arch/arm/include/asm/arch-keystone/nand_defs.h [deleted file]
arch/arm/include/asm/arch-tnetv107x/emif_defs.h [deleted file]
arch/arm/include/asm/arch-tnetv107x/hardware.h
arch/arm/include/asm/arch-tnetv107x/nand_defs.h [deleted file]
arch/arm/include/asm/ti-common/davinci_nand.h [new file with mode: 0644]
board/Barix/ipam390/ipam390.c
board/ait/cam_enc_4xx/cam_enc_4xx.c
board/davinci/da8xxevm/da830evm.c
board/davinci/da8xxevm/da850evm.c
board/davinci/dm355evm/dm355evm.c
board/davinci/dm355leopard/dm355leopard.c
board/davinci/dm365evm/dm365evm.c
board/davinci/dm6467evm/dm6467evm.c
board/davinci/ea20/ea20.c
board/davinci/sonata/sonata.c
board/enbw/enbw_cmc/enbw_cmc.c
board/omicron/calimain/calimain.c
board/ti/k2hk_evm/board.c
board/ti/tnetv107xevm/sdb_board.c
drivers/mtd/nand/davinci_nand.c
include/configs/davinci_dm6467evm.h
include/configs/k2hk_evm.h

index b91e948ce3e1450cdf6e8129e2aa1132abcea200..19730cef8c08768ea861597786ada2951a781914 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/davinci_misc.h>
 #include <asm/arch/ddr2_defs.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/pll_defs.h>
 
 void davinci_enable_uart0(void)
index ee096fe7219afbeb0f26571164105f4c1c15c254..c8b44988d3c1aa0d90bd90b0e7127fd40e5582aa 100644 (file)
@@ -11,6 +11,7 @@
 #include <nand.h>
 #include <ns16550.h>
 #include <post.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/dm365_lowlevel.h>
 #include <asm/arch/hardware.h>
 
index 9b26886dba69cfa0c400b3df1018a256dd5446d3..bcbb95aa44861e589f69a4bfe2504e59fc460e25 100644 (file)
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 
 #define AEMIF_CFG_SELECT_STROBE(v)     ((v) ? 1 << 31 : 0)
 #define AEMIF_CFG_EXTEND_WAIT(v)       ((v) ? 1 << 30 : 0)
diff --git a/arch/arm/include/asm/arch-davinci/emif_defs.h b/arch/arm/include/asm/arch-davinci/emif_defs.h
deleted file mode 100644 (file)
index 7e19cfe..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#ifndef _EMIF_DEFS_H_
-#define _EMIF_DEFS_H_
-
-#include <asm/arch/hardware.h>
-
-struct davinci_emif_regs {
-       u_int32_t       ercsr;
-       u_int32_t       awccr;
-       u_int32_t       sdbcr;
-       u_int32_t       sdrcr;
-       u_int32_t       ab1cr;
-       u_int32_t       ab2cr;
-       u_int32_t       ab3cr;
-       u_int32_t       ab4cr;
-       u_int32_t       sdtimr;
-       u_int32_t       ddrsr;
-       u_int32_t       ddrphycr;
-       u_int32_t       ddrphysr;
-       u_int32_t       totar;
-       u_int32_t       totactr;
-       u_int32_t       ddrphyid_rev;
-       u_int32_t       sdsretr;
-       u_int32_t       eirr;
-       u_int32_t       eimr;
-       u_int32_t       eimsr;
-       u_int32_t       eimcr;
-       u_int32_t       ioctrlr;
-       u_int32_t       iostatr;
-       u_int8_t        rsvd0[8];
-       u_int32_t       nandfcr;
-       u_int32_t       nandfsr;
-       u_int8_t        rsvd1[8];
-       u_int32_t       nandfecc[4];
-       u_int8_t        rsvd2[60];
-       u_int32_t       nand4biteccload;
-       u_int32_t       nand4bitecc[4];
-       u_int32_t       nanderradd1;
-       u_int32_t       nanderradd2;
-       u_int32_t       nanderrval1;
-       u_int32_t       nanderrval2;
-};
-
-#define davinci_emif_regs \
-       ((struct davinci_emif_regs *)DAVINCI_ASYNC_EMIF_CNTRL_BASE)
-
-#define DAVINCI_NANDFCR_NAND_ENABLE(n)                 (1 << (n-2))
-#define DAVINCI_NANDFCR_4BIT_ECC_SEL_MASK              (3 << 4)
-#define DAVINCI_NANDFCR_4BIT_ECC_SEL(n)                        ((n-2) << 4)
-#define DAVINCI_NANDFCR_1BIT_ECC_START(n)              (1 << (8 + (n-2)))
-#define DAVINCI_NANDFCR_4BIT_ECC_START                 (1 << 12)
-#define DAVINCI_NANDFCR_4BIT_CALC_START                        (1 << 13)
-#define DAVINCI_NANDFCR_CS2NAND                                (1 << 0)
-
-/* Chip Select setup */
-#define DAVINCI_ABCR_STROBE_SELECT                     (1 << 31)
-#define DAVINCI_ABCR_EXT_WAIT                          (1 << 30)
-#define DAVINCI_ABCR_WSETUP(n)                         (n << 26)
-#define DAVINCI_ABCR_WSTROBE(n)                                (n << 20)
-#define DAVINCI_ABCR_WHOLD(n)                          (n << 17)
-#define DAVINCI_ABCR_RSETUP(n)                         (n << 13)
-#define DAVINCI_ABCR_RSTROBE(n)                                (n << 7)
-#define DAVINCI_ABCR_RHOLD(n)                          (n << 4)
-#define DAVINCI_ABCR_TA(n)                             (n << 2)
-#define DAVINCI_ABCR_ASIZE_16BIT                       1
-#define DAVINCI_ABCR_ASIZE_8BIT                                0
-
-#endif
index 98fe56e68653023b4c30695ee4859fee36ac792a..a4eb0bd89b0fe2d2805ffece16a4f15865837791 100644 (file)
@@ -597,7 +597,6 @@ static inline enum davinci_clk_ids get_async3_src(void)
 #if defined(CONFIG_SOC_DM365)
 #include <asm/arch/aintc_defs.h>
 #include <asm/arch/ddr2_defs.h>
-#include <asm/arch/emif_defs.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pll_defs.h>
 #include <asm/arch/psc_defs.h>
diff --git a/arch/arm/include/asm/arch-davinci/nand_defs.h b/arch/arm/include/asm/arch-davinci/nand_defs.h
deleted file mode 100644 (file)
index dee1c6f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
- *
- * Parts shamelesly stolen from Linux Kernel source tree.
- *
- * ------------------------------------------------------------
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#ifndef _NAND_DEFS_H_
-#define _NAND_DEFS_H_
-
-#include <asm/arch/hardware.h>
-
-#ifdef CONFIG_SOC_DM646X
-#define        MASK_CLE        0x80000
-#define        MASK_ALE        0x40000
-#else
-#define        MASK_CLE        0x10
-#define        MASK_ALE        0x08
-#endif
-
-#ifdef CONFIG_SYS_NAND_MASK_CLE
-#undef MASK_CLE
-#define MASK_CLE CONFIG_SYS_NAND_MASK_CLE
-#endif
-#ifdef CONFIG_SYS_NAND_MASK_ALE
-#undef MASK_ALE
-#define MASK_ALE CONFIG_SYS_NAND_MASK_ALE
-#endif
-
-#define NAND_READ_START                0x00
-#define NAND_READ_END          0x30
-#define NAND_STATUS            0x70
-
-extern void davinci_nand_init(struct nand_chip *nand);
-
-#endif
diff --git a/arch/arm/include/asm/arch-keystone/emif_defs.h b/arch/arm/include/asm/arch-keystone/emif_defs.h
deleted file mode 100644 (file)
index a3378aa..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * emif definitions to re-use davinci emif driver on Keystone2
- *
- * (C) Copyright 2012-2014
- *     Texas Instruments Incorporated, <www.ti.com>
- * (C) Copyright 2007 Sergey Kubushyn <ksi@koi8.net>
- *
- * SPDX-License-Identifier:     GPL-2.0+
- */
-#ifndef _EMIF_DEFS_H_
-#define _EMIF_DEFS_H_
-
-#include <asm/arch/hardware.h>
-
-struct davinci_emif_regs {
-       uint32_t        ercsr;
-       uint32_t        awccr;
-       uint32_t        sdbcr;
-       uint32_t        sdrcr;
-       uint32_t        abncr[4];
-       uint32_t        sdtimr;
-       uint32_t        ddrsr;
-       uint32_t        ddrphycr;
-       uint32_t        ddrphysr;
-       uint32_t        totar;
-       uint32_t        totactr;
-       uint32_t        ddrphyid_rev;
-       uint32_t        sdsretr;
-       uint32_t        eirr;
-       uint32_t        eimr;
-       uint32_t        eimsr;
-       uint32_t        eimcr;
-       uint32_t        ioctrlr;
-       uint32_t        iostatr;
-       uint32_t        rsvd0;
-       uint32_t        one_nand_cr;
-       uint32_t        nandfcr;
-       uint32_t        nandfsr;
-       uint32_t        rsvd1[2];
-       uint32_t        nandfecc[4];
-       uint32_t        rsvd2[15];
-       uint32_t        nand4biteccload;
-       uint32_t        nand4bitecc[4];
-       uint32_t        nanderradd1;
-       uint32_t        nanderradd2;
-       uint32_t        nanderrval1;
-       uint32_t        nanderrval2;
-};
-
-#define davinci_emif_regs \
-       ((struct davinci_emif_regs *)DAVINCI_ASYNC_EMIF_CNTRL_BASE)
-
-#define DAVINCI_NANDFCR_NAND_ENABLE(n)                 (1 << ((n) - 2))
-#define DAVINCI_NANDFCR_4BIT_ECC_SEL_MASK              (3 << 4)
-#define DAVINCI_NANDFCR_4BIT_ECC_SEL(n)                        (((n) - 2) << 4)
-#define DAVINCI_NANDFCR_1BIT_ECC_START(n)              (1 << (8 + ((n) - 2)))
-#define DAVINCI_NANDFCR_4BIT_ECC_START                 (1 << 12)
-#define DAVINCI_NANDFCR_4BIT_CALC_START                        (1 << 13)
-
-/* Chip Select setup */
-#define DAVINCI_ABCR_STROBE_SELECT                     (1 << 31)
-#define DAVINCI_ABCR_EXT_WAIT                          (1 << 30)
-#define DAVINCI_ABCR_WSETUP(n)                         ((n) << 26)
-#define DAVINCI_ABCR_WSTROBE(n)                                ((n) << 20)
-#define DAVINCI_ABCR_WHOLD(n)                          ((n) << 17)
-#define DAVINCI_ABCR_RSETUP(n)                         ((n) << 13)
-#define DAVINCI_ABCR_RSTROBE(n)                                ((n) << 7)
-#define DAVINCI_ABCR_RHOLD(n)                          ((n) << 4)
-#define DAVINCI_ABCR_TA(n)                             ((n) << 2)
-#define DAVINCI_ABCR_ASIZE_16BIT                       1
-#define DAVINCI_ABCR_ASIZE_8BIT                                0
-
-#endif
diff --git a/arch/arm/include/asm/arch-keystone/nand_defs.h b/arch/arm/include/asm/arch-keystone/nand_defs.h
deleted file mode 100644 (file)
index 58417db..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * nand driver definitions to re-use davinci nand driver on Keystone2
- *
- * (C) Copyright 2012-2014
- *     Texas Instruments Incorporated, <www.ti.com>
- * (C) Copyright 2007 Sergey Kubushyn <ksi@koi8.net>
- *
- * SPDX-License-Identifier:     GPL-2.0+
- */
-#ifndef _NAND_DEFS_H_
-#define _NAND_DEFS_H_
-
-#include <asm/arch/hardware.h>
-#include <linux/mtd/nand.h>
-
-#define MASK_CLE         0x4000
-#define        MASK_ALE         0x2000
-
-#define NAND_READ_START  0x00
-#define NAND_READ_END    0x30
-#define NAND_STATUS      0x70
-
-#endif
diff --git a/arch/arm/include/asm/arch-tnetv107x/emif_defs.h b/arch/arm/include/asm/arch-tnetv107x/emif_defs.h
deleted file mode 100644 (file)
index 9969a01..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm/arch-davinci/emif_defs.h>
index 2a7ca4e00c137872682e7bbfc52cab39e071ce42..d458e0bdf0909654cec8a0fe6682af30802214b4 100644 (file)
@@ -155,4 +155,6 @@ int wdt_kick(void);
 #define INTC_HINT_EN                   (TNETV107X_INTC_BASE + 0x1500)
 #define INTC_EN_CLR0                   (TNETV107X_INTC_BASE + 0x380)
 
+#define DAVINCI_ASYNC_EMIF_CNTRL_BASE  TNETV107X_ASYNC_EMIF_CNTRL_BASE
+
 #endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/include/asm/arch-tnetv107x/nand_defs.h b/arch/arm/include/asm/arch-tnetv107x/nand_defs.h
deleted file mode 100644 (file)
index b298fba..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * TNETV107X: NAND definitions
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#ifndef _NAND_DEFS_H_
-#define _NAND_DEFS_H_
-
-#include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
-
-#define DAVINCI_ASYNC_EMIF_CNTRL_BASE  TNETV107X_ASYNC_EMIF_CNTRL_BASE
-
-#define        MASK_CLE                0x4000
-#define        MASK_ALE                0x2000
-
-#define NAND_READ_START                0x00
-#define NAND_READ_END          0x30
-#define NAND_STATUS            0x70
-
-extern void davinci_nand_init(struct nand_chip *nand);
-
-#endif
diff --git a/arch/arm/include/asm/ti-common/davinci_nand.h b/arch/arm/include/asm/ti-common/davinci_nand.h
new file mode 100644 (file)
index 0000000..11407be
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * NAND Flash Driver
+ *
+ * Copyright (C) 2006-2014 Texas Instruments.
+ *
+ * Based on Linux DaVinci NAND driver by TI.
+ */
+
+#ifndef _DAVINCI_NAND_H_
+#define _DAVINCI_NAND_H_
+
+#include <linux/mtd/nand.h>
+#include <asm/arch/hardware.h>
+
+#define NAND_READ_START        0x00
+#define NAND_READ_END          0x30
+#define NAND_STATUS            0x70
+
+#define MASK_CLE               0x10
+#define MASK_ALE               0x08
+
+#ifdef CONFIG_SYS_NAND_MASK_CLE
+#undef MASK_CLE
+#define MASK_CLE CONFIG_SYS_NAND_MASK_CLE
+#endif
+#ifdef CONFIG_SYS_NAND_MASK_ALE
+#undef MASK_ALE
+#define MASK_ALE CONFIG_SYS_NAND_MASK_ALE
+#endif
+
+struct davinci_emif_regs {
+       uint32_t        ercsr;
+       uint32_t        awccr;
+       uint32_t        sdbcr;
+       uint32_t        sdrcr;
+       union {
+               uint32_t abncr[4];
+               uint32_t ab1cr;
+               uint32_t ab2cr;
+               uint32_t ab3cr;
+               uint32_t ab4cr;
+       };
+       uint32_t        sdtimr;
+       uint32_t        ddrsr;
+       uint32_t        ddrphycr;
+       uint32_t        ddrphysr;
+       uint32_t        totar;
+       uint32_t        totactr;
+       uint32_t        ddrphyid_rev;
+       uint32_t        sdsretr;
+       uint32_t        eirr;
+       uint32_t        eimr;
+       uint32_t        eimsr;
+       uint32_t        eimcr;
+       uint32_t        ioctrlr;
+       uint32_t        iostatr;
+       uint32_t        rsvd0;
+       uint32_t        one_nand_cr;
+       uint32_t        nandfcr;
+       uint32_t        nandfsr;
+       uint32_t        rsvd1[2];
+       uint32_t        nandfecc[4];
+       uint32_t        rsvd2[15];
+       uint32_t        nand4biteccload;
+       uint32_t        nand4bitecc[4];
+       uint32_t        nanderradd1;
+       uint32_t        nanderradd2;
+       uint32_t        nanderrval1;
+       uint32_t        nanderrval2;
+};
+
+#define davinci_emif_regs \
+       ((struct davinci_emif_regs *)DAVINCI_ASYNC_EMIF_CNTRL_BASE)
+
+#define DAVINCI_NANDFCR_NAND_ENABLE(n)                 (1 << ((n) - 2))
+#define DAVINCI_NANDFCR_4BIT_ECC_SEL_MASK              (3 << 4)
+#define DAVINCI_NANDFCR_4BIT_ECC_SEL(n)                        (((n) - 2) << 4)
+#define DAVINCI_NANDFCR_1BIT_ECC_START(n)              (1 << (8 + ((n) - 2)))
+#define DAVINCI_NANDFCR_4BIT_ECC_START                 (1 << 12)
+#define DAVINCI_NANDFCR_4BIT_CALC_START                        (1 << 13)
+#define DAVINCI_NANDFCR_CS2NAND                                (1 << 0)
+
+/* Chip Select setup */
+#define DAVINCI_ABCR_STROBE_SELECT                     (1 << 31)
+#define DAVINCI_ABCR_EXT_WAIT                          (1 << 30)
+#define DAVINCI_ABCR_WSETUP(n)                         (n << 26)
+#define DAVINCI_ABCR_WSTROBE(n)                                (n << 20)
+#define DAVINCI_ABCR_WHOLD(n)                          (n << 17)
+#define DAVINCI_ABCR_RSETUP(n)                         (n << 13)
+#define DAVINCI_ABCR_RSTROBE(n)                                (n << 7)
+#define DAVINCI_ABCR_RHOLD(n)                          (n << 4)
+#define DAVINCI_ABCR_TA(n)                             (n << 2)
+#define DAVINCI_ABCR_ASIZE_16BIT                       1
+#define DAVINCI_ABCR_ASIZE_8BIT                                0
+
+void davinci_nand_init(struct nand_chip *nand);
+
+#endif
index ae88b4230a2deb384152c8edb36c8e22835a61a3..6ce8960bbd647ca030dae6c0cd18966eb549ef2c 100644 (file)
@@ -20,7 +20,7 @@
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/pinmux_defs.h>
 #include <asm/io.h>
index 7e1b16ac4655317e121fe46e5adf5159bd86f10d..1f816b3df6ef2cfc6aebedd380b33439d0192a31 100644 (file)
@@ -16,7 +16,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/davinci_misc.h>
 #ifdef CONFIG_DAVINCI_MMC
 #include <mmc.h>
index 4f5c780e549cb13923eb7dbb064e0096d54f4ea9..c40587ff0981d0b6fc2cce785c465976fe7b36e8 100644 (file)
 #include <net.h>
 #include <netdev.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/pinmux_defs.h>
 #include <asm/io.h>
 #include <nand.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/davinci_misc.h>
 
 #ifdef CONFIG_DAVINCI_MMC
index 85b483096b3b481c07e9509892d66f364896e7e0..b9ca38e9293dd8b2e0c1fbe244833691cc2cc09f 100644 (file)
@@ -16,7 +16,7 @@
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/pinmux_defs.h>
 #include <asm/io.h>
index 10422b226b89ee11ef2dfa3c8eba000c2f997d41..e5a958f7e0cb9c077e84117859113dd27c868efc 100644 (file)
@@ -8,8 +8,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/davinci_misc.h>
 #include <net.h>
 #include <netdev.h>
index 534184329cb538e098094a9bffc416c4e2fd90f3..53902f996c769074d01189c7b04e2f651c2c6013 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/gpio.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/davinci_misc.h>
 #include <net.h>
 #include <netdev.h>
index ceffd4d6038e0b6b164fb1e5476060a792841628..24bec56d5687e5169cb5508d0cf01052a1601017 100644 (file)
@@ -8,8 +8,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/gpio.h>
 #include <netdev.h>
 #include <asm/arch/davinci_misc.h>
index 469c9bac4b2fc580036315d916252557908576b6..e51cc9e63892bef2f2e30a204715dc83a5e2b43c 100644 (file)
@@ -8,7 +8,8 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <nand.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/arch/hardware.h>
+#include <asm/ti-common/davinci_nand.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index c4444c7c7f549cd2cb1f24e8cc3619e3a0c24f00..66804d75bd045d9a01a01f400cabbdc9abc7be5a 100644 (file)
@@ -19,7 +19,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
index aa04041246fa8ab37460f0de6a0174266332f3d1..f5c3258de563326bb02a5d8d498d9e2fef87dcc1 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <common.h>
 #include <nand.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/davinci_misc.h>
 
index 39efe20bfdf49b836edf0f1cce4332db13372157..53b83621473239e2ce5739c7c00ce38099696768 100644 (file)
@@ -29,7 +29,7 @@
 #include <asm/io.h>
 #include <asm/arch/da850_lowlevel.h>
 #include <asm/arch/davinci_misc.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux_defs.h>
index dd28915cdc4c3cfce048c2dff7a6fcc54f96ea93..32f2b20183833b88d464877b5d20aaa6365e5e51 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/gpio.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/pinmux_defs.h>
 #include <asm/arch/davinci_misc.h>
index dc39139565f9bcaa72e129d6cc8bb4a744c2a196..53f26b2ef33328634716c01dcb787ce9eb267c66 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
-#include <asm/arch/nand_defs.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/psc_defs.h>
 
index a95434b5efe391ff90dad18dbca75fbde04e95da..a84ec84baeb0f803f7746107f194435135280691 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
-#include <asm/arch/nand_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/mux.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 75b03a74b65ab9eb6498bb52022a34cfa95033bb..5d425092f43a1eb2eb84a956db56faa5fce1f7f6 100644 (file)
@@ -32,8 +32,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <nand.h>
-#include <asm/arch/nand_defs.h>
-#include <asm/arch/emif_defs.h>
+#include <asm/ti-common/davinci_nand.h>
 
 /* Definitions for 4-bit hardware ECC */
 #define NAND_TIMEOUT                   10240
index 8a3c45334736f66a21c0b93fb2a4382dd4ead799..b1b18ad04127463a2886f5d9a2df9f4f263a0dce 100644 (file)
@@ -78,6 +78,8 @@ extern unsigned int davinci_arm_clk_get(void);
 #define CONFIG_SYS_NO_FLASH
 #ifdef CONFIG_SYS_USE_NAND
 #define CONFIG_NAND_DAVINCI
+#define CONFIG_SYS_NAND_MASK_CLE       0x80000
+#define CONFIG_SYS_NAND_MASK_ALE       0x40000
 #define CONFIG_SYS_NAND_CS             2
 #undef CONFIG_ENV_IS_IN_FLASH
 #define CONFIG_ENV_IS_IN_NAND
index 6ba7e62e5546a63f156361f06274e303300c9707..fcfbca92d18ae89c82906dee82f8e93df0c8dc06 100644 (file)
 #define CONFIG_SYS_NAND_USE_FLASH_BBT
 #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 #define CONFIG_SYS_NAND_PAGE_2K
+#define CONFIG_SYS_NAND_MASK_CLE               0x4000
+#define CONFIG_SYS_NAND_MASK_ALE               0x2000
 
 #define CONFIG_SYS_NAND_LARGEPAGE
 #define CONFIG_SYS_NAND_BASE_LIST       { 0x30000000, }