3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <asm/arch/hardware.h>
22 #include <asm/arch/emif_defs.h>
23 #include <asm/arch/nand_defs.h>
24 #include "../common/misc.h"
26 DECLARE_GLOBAL_DATA_PTR;
30 gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DM365_EVM;
31 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
36 #ifdef CONFIG_NAND_DAVINCI
37 static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip)
39 struct nand_chip *this = mtd->priv;
40 u32 wbase = (u32) this->IO_ADDR_W;
41 u32 rbase = (u32) this->IO_ADDR_R;
44 __set_bit(14, &wbase);
45 __set_bit(14, &rbase);
47 __clear_bit(14, &wbase);
48 __clear_bit(14, &rbase);
50 this->IO_ADDR_W = (void *)wbase;
51 this->IO_ADDR_R = (void *)rbase;
54 int board_nand_init(struct nand_chip *nand)
56 davinci_nand_init(nand);
57 nand->select_chip = nand_dm365evm_select_chip;