Re: [U-Boot] [PATCH 4/4] Support NAND and OneNAND memories on the OMAP3 EVM.

Dear Josh Karabin,
In message <dc17cf9cca7ecf905d67dfa04deb6536608c9cf0.1243367498.git.gkarabi n@vocollect.com> you wrote:
This change detects the boot configuration of an OMAP3 device, and uses that information on OMAP3 EVM builds to support NAND or OneNAND.
Signed-off-by: Josh Karabin gkarabin@vocollect.com
board/omap3/evm/evm.c | 24 +++++++++++ board/omap3/evm/evm.h | 4 +- cpu/arm_cortexa8/omap3/mem.c | 71 ++++++++++++++++++++------------ include/asm-arm/arch-omap3/sys_proto.h | 2 +- include/configs/omap3_evm.h | 4 ++ 5 files changed, 76 insertions(+), 29 deletions(-)
diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c index c008c2e..e30e83f 100644 --- a/board/omap3/evm/evm.c +++ b/board/omap3/evm/evm.c @@ -34,6 +34,8 @@ #include <asm/arch/sys_proto.h> #include <i2c.h> #include <asm/mach-types.h> +#include <environment.h> +#include <command.h> #include "evm.h"
/* @@ -43,8 +45,30 @@ int board_init(void) { DECLARE_GLOBAL_DATA_PTR; +#if defined(CONFIG_ENV_IS_IN_ONENAND) && defined(CONFIG_ENV_IS_IN_NAND)
int flash_type;
cmd_tbl_t *cmdtp;
flash_type = gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
switch (flash_type) {
case PISMO1_NAND:
env_object_ptr = &env_object_nand;
onenand_disable_init();
cmdtp = find_cmd("onenand");
cmdtp->name = NULL;
break;
case PISMO1_ONENAND:
env_object_ptr = &env_object_onenand;
nand_disable_init();
cmdtp = find_cmd("nand");
cmdtp->name = NULL;
break;
}
In the end we will have tons of FOO_disable_init() functions for all kinds of FOO; Maybe we can just have one common disable_cmd() function and supply it with a parameter instead?
Best regards,
Wolfgang Denk
participants (1)
-
Wolfgang Denk