Exemple #1
0
/*
 * Board-specific NAND initialization.
 * We use a "generic" STM function stm_default_board_nand_init() to do it.
 * However, we can easily override anything locally, if required.
 */
extern int board_nand_init(struct nand_chip * const nand)
{
#if defined(CONFIG_SYS_ST40_NAND_USE_BIT_BANGING)	/* use the S/W "bit-banging" driver */
	stm_default_board_nand_init(nand, mb837_cmd_ctrl, mb837_device_ready);
#else						/* else, use a H/W driver */
	stm_default_board_nand_init(nand, NULL, NULL);
#endif /* CONFIG_SYS_ST40_NAND_USE_BIT_BANGING */

	/*
	 * Only enable the following to use a (volatile) RAM-based
	 * (not NAND-resident) Bad Block Table (BBT).
	 * This is *not* recommended! A NAND-resident BBT is recommended.
	 */
#if 0
	nand->options &= ~NAND_USE_FLASH_BBT;
#endif

	return 0;
}
/*
 * Board-specific NAND initialization.
 * We use a "generic" STM function stm_default_board_nand_init() to do it.
 * However, we can easily override anything locally, if required.
 */
extern int board_nand_init(struct nand_chip * const nand)
{
#if defined(CFG_NAND_FLEX_MODE)	/* for STM "flex-mode" */
	stm_default_board_nand_init(nand, NULL, NULL);
#else				/* for "bit-banging" */
	stm_default_board_nand_init(nand, b2037_hwcontrol, b2037_device_ready);
#endif

	/*
	 * Only enable the following to use a (volatile) RAM-based
	 * (not NAND-resident) Bad Block Table (BBT).
	 * This is *not* recommended! A NAND-resident BBT is recommended.
	 */
#if 0
	nand->options &= ~NAND_USE_FLASH_BBT;
#endif

	return 0;
}
Exemple #3
0
/*
 * Board-specific NAND initialization.
 * We use a "generic" STM function stm_default_board_nand_init() to do it.
 * However, we can easily override anything locally, if required.
 */
extern int board_nand_init(struct nand_chip * const nand)
{
		/* initialize for "bit-banging" */
	stm_default_board_nand_init(nand, mb618_cmd_ctrl, NULL);

	nand->chip_delay = 25;

	/*
	 * Only enable the following to use a (volatile) RAM-based
	 * (not NAND-resident) Bad Block Table (BBT).
	 * This is *not* recommended! A NAND-resident BBT is recommended.
	 */
#if 0
	nand->options &= ~NAND_USE_FLASH_BBT;
#endif

	return 0;
}