2 * Copyright (C) 2007 Sascha Hauer, Pengutronix
3 * Copyright (C) 2008,2009 Eric Jarrige <jorasse@users.sourceforge.net>
4 * Copyright (C) 2009 Ilya Yanok <yanok@emcraft.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #include <asm/arch/imx-regs.h>
28 DECLARE_GLOBAL_DATA_PTR;
32 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
33 struct system_control_regs *sc_regs =
34 (struct system_control_regs *)IMX_SYSTEM_CTL_BASE;
37 gd->bd->bi_arch_number = MACH_TYPE_IMX27LITE;
38 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
40 #ifdef CONFIG_MXC_UART
41 mx27_uart1_init_pins();
45 imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31));
46 gpio_set_value(GPIO_PORTC | 31, 1);
49 #if defined(CONFIG_MAGNESIUM)
56 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
58 * set in FMCR NF_FMS Bit(5) to 1
59 * (NAND Flash with 2 Kbyte page size)
61 writel(readl(&sc_regs->fmcr) | (1 << 5), &sc_regs->fmcr);
68 /* dram_init must store complete ramsize in gd->ram_size */
69 gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
74 void dram_init_banksize(void)
76 gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
77 gd->bd->bi_dram[0].size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
79 #if CONFIG_NR_DRAM_BANKS > 1
80 gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
81 gd->bd->bi_dram[1].size = get_ram_size((void *)PHYS_SDRAM_2,
89 puts(CONFIG_BOARDNAME);