From ee4f3e2765a1c65c9861c5d2cf2e6feb84b90bd8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 30 Mar 2009 18:58:39 +0200 Subject: [PATCH] davinci: move nand driver to drivers/mtd/nand Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/arm926ejs/davinci/Makefile | 2 +- drivers/mtd/nand/Makefile | 1 + .../davinci/nand.c => drivers/mtd/nand/davinci_nand.c | 9 --------- include/configs/davinci_dvevm.h | 1 + include/configs/davinci_schmoogie.h | 1 + include/configs/davinci_sffsdr.h | 1 + include/configs/davinci_sonata.h | 1 + 7 files changed, 6 insertions(+), 10 deletions(-) rename cpu/arm926ejs/davinci/nand.c => drivers/mtd/nand/davinci_nand.c (98%) diff --git a/cpu/arm926ejs/davinci/Makefile b/cpu/arm926ejs/davinci/Makefile index 0f77f402ed..53f77428e6 100644 --- a/cpu/arm926ejs/davinci/Makefile +++ b/cpu/arm926ejs/davinci/Makefile @@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a -COBJS = timer.o ether.o lxt972.o dp83848.o i2c.o nand.o +COBJS = timer.o ether.o lxt972.o dp83848.o i2c.o SOBJS = lowlevel_init.o reset.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 03b0028e7c..258ee252ad 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -37,6 +37,7 @@ endif COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o +COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o diff --git a/cpu/arm926ejs/davinci/nand.c b/drivers/mtd/nand/davinci_nand.c similarity index 98% rename from cpu/arm926ejs/davinci/nand.c rename to drivers/mtd/nand/davinci_nand.c index 014e2b0c11..a974667dc9 100644 --- a/cpu/arm926ejs/davinci/nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -43,10 +43,6 @@ #include #include - -#ifdef CONFIG_SYS_USE_NAND -#if !defined(CONFIG_NAND_LEGACY) - #include #include #include @@ -468,8 +464,3 @@ int board_nand_init(struct nand_chip *nand) return(0); } - -#else -#error "U-Boot legacy NAND support not available for DaVinci chips" -#endif -#endif /* CONFIG_SYS_USE_NAND */ diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h index 667c0d882e..b43beaa03e 100644 --- a/include/configs/davinci_dvevm.h +++ b/include/configs/davinci_dvevm.h @@ -112,6 +112,7 @@ /* Flash & Environment */ /*=====================*/ #ifdef CONFIG_SYS_USE_NAND +#define CONFIG_NAND_DAVINCI #undef CONFIG_ENV_IS_IN_FLASH #define CONFIG_SYS_NO_FLASH #define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ diff --git a/include/configs/davinci_schmoogie.h b/include/configs/davinci_schmoogie.h index 22d3808a3d..2c97a00167 100644 --- a/include/configs/davinci_schmoogie.h +++ b/include/configs/davinci_schmoogie.h @@ -81,6 +81,7 @@ /*=====================*/ #undef CONFIG_ENV_IS_IN_FLASH #define CONFIG_SYS_NO_FLASH +#define CONFIG_NAND_DAVINCI #define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ #define CONFIG_ENV_SECT_SIZE 2048 /* Env sector Size */ #define CONFIG_ENV_SIZE SZ_128K diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h index 875bab6f7d..9354c2ffb0 100644 --- a/include/configs/davinci_sffsdr.h +++ b/include/configs/davinci_sffsdr.h @@ -77,6 +77,7 @@ /* Flash & Environment */ #undef CONFIG_ENV_IS_IN_FLASH #define CONFIG_SYS_NO_FLASH +#define CONFIG_NAND_DAVINCI #define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ #define CONFIG_ENV_SECT_SIZE 2048 /* Env sector Size */ #define CONFIG_ENV_SIZE SZ_128K diff --git a/include/configs/davinci_sonata.h b/include/configs/davinci_sonata.h index 47ab27a870..0865d0d33b 100644 --- a/include/configs/davinci_sonata.h +++ b/include/configs/davinci_sonata.h @@ -112,6 +112,7 @@ /* Flash & Environment */ /*=====================*/ #ifdef CONFIG_SYS_USE_NAND +#define CONFIG_NAND_DAVINCI #undef CONFIG_ENV_IS_IN_FLASH #define CONFIG_SYS_NO_FLASH #define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ -- 2.39.5