mtd: nand: davinci: add header file for driver definitions
PATCH v3 1/1 mtd: nand: davinci: add header file for driver definitions
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.
---
v3..v2
- move drivers/mtd/nand/davinci_nand.h to arch/arm/include/asm/ti-common/davinci_nand.h
- apply changes also for davinci platforms
v2..v1
- no functional changes
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 2 +-
arch/arm/cpu/armv7/keystone/aemif.c | 2 +-
arch/arm/include/asm/arch-davinci/emif_defs.h | 72 ----------------------
arch/arm/include/asm/arch-davinci/hardware.h | 1 -
arch/arm/include/asm/arch-davinci/nand_defs.h | 38 ------------
arch/arm/include/asm/arch-keystone/nand_defs.h | 23 -------
arch/arm/include/asm/arch-tnetv107x/emif_defs.h | 1 -
arch/arm/include/asm/arch-tnetv107x/hardware.h | 2 +
arch/arm/include/asm/arch-tnetv107x/nand_defs.h | 23 -------
.../emif_defs.h => ti-common/davinci_nand.h} | 56 ++++++++++++-----
board/Barix/ipam390/ipam390.c | 2 +-
board/ait/cam_enc_4xx/cam_enc_4xx.c | 2 +-
board/davinci/da8xxevm/da830evm.c | 3 +-
board/davinci/da8xxevm/da850evm.c | 2 +-
board/davinci/dm355evm/dm355evm.c | 3 +-
board/davinci/dm355leopard/dm355leopard.c | 2 +-
board/davinci/dm365evm/dm365evm.c | 3 +-
board/davinci/dm6467evm/dm6467evm.c | 3 +-
board/davinci/ea20/ea20.c | 2 +-
board/davinci/sonata/sonata.c | 2 +-
board/enbw/enbw_cmc/enbw_cmc.c | 2 +-
board/omicron/calimain/calimain.c | 2 +-
board/ti/k2hk_evm/board.c | 1 -
board/ti/tnetv107xevm/sdb_board.c | 2 +-
drivers/mtd/nand/davinci_nand.c | 3 +-
include/configs/davinci_dm6467evm.h | 2 +
include/configs/k2hk_evm.h | 2 +
include/configs/tnetv107x_evm.h | 2 +
28 files changed, 65 insertions(+), 195 deletions(-)
delete mode 100644 arch/arm/include/asm/arch-davinci/emif_defs.h
delete mode 100644 arch/arm/include/asm/arch-davinci/nand_defs.h
delete mode 100644 arch/arm/include/asm/arch-keystone/nand_defs.h
delete mode 100644 arch/arm/include/asm/arch-tnetv107x/emif_defs.h
delete mode 100644 arch/arm/include/asm/arch-tnetv107x/nand_defs.h
rename arch/arm/include/asm/{arch-keystone/emif_defs.h => ti-common/davinci_nand.h} (55%)arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1 -1
@@ -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 )
arch/arm/cpu/armv7/keystone/aemif.c +1 -1
@@ -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)
arch/arm/include/asm/arch-davinci/emif_defs.h deleted +0 -72
72 lines not on this page · raw message
arch/arm/include/asm/arch-davinci/hardware.h +0 -1
@@ -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>
arch/arm/include/asm/arch-davinci/nand_defs.h deleted +0 -38
@@ -1,38 +0,0 @@ -/* -* Copyright (C) 2007 Sergey Kubushyn <[email protected]> -* -* 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
arch/arm/include/asm/arch-keystone/nand_defs.h deleted +0 -23
@@ -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 <[email protected]> -* -* 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
arch/arm/include/asm/arch-tnetv107x/emif_defs.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm/arch-davinci/emif_defs.h>
arch/arm/include/asm/arch-tnetv107x/hardware.h +2 -0
@@ -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 */
arch/arm/include/asm/arch-tnetv107x/nand_defs.h deleted +0 -23
@@ -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
arch/arm/include/asm/ti-common/davinci_nand.h renamed from arch/arm/include/asm/arch-keystone/emif_defs.h +40 -16
81 lines not on this page · raw message
board/Barix/ipam390/ipam390.c +1 -1
@@ -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>
board/ait/cam_enc_4xx/cam_enc_4xx.c +1 -1
@@ -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>
board/davinci/da8xxevm/da830evm.c +1 -2
@@ -25,12 +25,11 @@#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
board/davinci/da8xxevm/da850evm.c +1 -1
@@ -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>
board/davinci/dm355evm/dm355evm.c +1 -2
@@ -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>
board/davinci/dm355leopard/dm355leopard.c +1 -1
@@ -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>
board/davinci/dm365evm/dm365evm.c +1 -2
@@ -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>
board/davinci/dm6467evm/dm6467evm.c +2 -1
@@ -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 ;
board/davinci/ea20/ea20.c +1 -1
@@ -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>
board/davinci/sonata/sonata.c +1 -1
@@ -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>
board/enbw/enbw_cmc/enbw_cmc.c +1 -1
@@ -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>
board/omicron/calimain/calimain.c +1 -1
@@ -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>
board/ti/k2hk_evm/board.c +0 -1
@@ -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>
board/ti/tnetv107xevm/sdb_board.c +1 -1
@@ -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 ;
drivers/mtd/nand/davinci_nand.c +1 -2
@@ -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
include/configs/davinci_dm6467evm.h +2 -0
@@ -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
include/configs/k2hk_evm.h +2 -0
@@ -136,6 +136,8 @@#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, }
include/configs/tnetv107x_evm.h +2 -0
@@ -62,6 +62,8 @@#define CONFIG_SYS_NO_FLASH #define CONFIG_ENV_IS_IN_NAND #define CONFIG_NAND_DAVINCI +#define CONFIG_SYS_NAND_MASK_CLE 0x4000 +#define CONFIG_SYS_NAND_MASK_ALE 0x2000#define CONFIG_ENV_SIZE (SZ_128K)#define CONFIG_SYS_NAND_HW_ECC #define CONFIG_SYS_NAND_1BIT_ECC
Signature · 1 line
1.8.3.2
PATCH v3 1/1 mtd: nand: davinci: add header file for driver definitions
Quoted 6 lines · Ivan
The definitions inside
emif_defs.hconcern davinci nand driver and should be in it's header. So create header file for davinci nand driver and move definitions fromemif_defs.handnand_defs.hto it.Acked-by Vitaly Andrianov <[email protected]>Signed-off-by Ivan Khoronzhuk <[email protected]>
Fixed a few more bits of davinci fallout and applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140619/cbba1f7c/attachment.pgp>
PATCH v3 1/1 mtd: nand: davinci: add header file for driver definitions
Quoted 11 lines · Tom Rini
Quoted 6 lines · Ivan
The definitions inside
emif_defs.hconcern davinci nand driver and should be in it's header. So create header file for davinci nand driver and move definitions fromemif_defs.handnand_defs.hto it.Acked-by Vitaly Andrianov <[email protected]>Signed-off-by Ivan Khoronzhuk <[email protected]>Fixed a few more bits of davinci fallout and applied to u-boot-ti/master, thanks!
Thanks
Signature · 2 lines
Regards, Ivan Khoronzhuk