void board_nand_init(void) { struct ebi2cr_regs *ebi2_regs; if (board_id() != BOARD_ID_PROTO_0_2_NAND) return; ebi2_regs = (struct ebi2cr_regs *) EBI2CR_BASE; nand_clock_config(); configure_nand_gpio(); /* NAND Flash is connected to CS0 */ clrsetbits_le32(&ebi2_regs->chip_select_cfg0, CS0_CFG_MASK, CS0_CFG_SERIAL_FLASH_DEVICE); }
void board_nand_init(void) { struct ebi2cr_regs *ebi2_regs; extern int ipq_spi_init(void); if ((gboard_param->flashdesc == ONLY_NAND) || (gboard_param->flashdesc == NAND_NOR)) { ebi2_regs = (struct ebi2cr_regs *) EBI2CR_BASE; nand_clock_config(); configure_nand_gpio(); /* NAND Flash is connected to CS0 */ clrsetbits_le32(&ebi2_regs->chip_select_cfg0, CS0_CFG_MASK, CS0_CFG_SERIAL_FLASH_DEVICE); ipq_nand_init(IPQ_NAND_LAYOUT_LINUX); } ipq_spi_init(); }