/* Called by nand_init_chip to initialize the board specific functions  */
int board_nand_init(struct nand_chip *nand)
/* Called by nand_init_chip to initialize the board specific functions  */
int board_nand_init(struct nand_chip *nand)
{
	struct misc_regs *const misc_regs_p =
	    (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
	if (!(readl(&misc_regs_p->auto_cfg_reg) & MISC_NANDDIS))
		return spear_nand_init(nand);
	return -1;
}