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 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/imx-regs.h>
14 DECLARE_GLOBAL_DATA_PTR;
18 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
19 struct system_control_regs *sc_regs =
20 (struct system_control_regs *)IMX_SYSTEM_CTL_BASE;
23 gd->bd->bi_arch_number = MACH_TYPE_IMX27LITE;
24 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
26 #ifdef CONFIG_MXC_UART
27 mx27_uart1_init_pins();
31 imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31));
32 gpio_set_value(GPIO_PORTC | 31, 1);
35 #if defined(CONFIG_MAGNESIUM)
42 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
44 * set in FMCR NF_FMS Bit(5) to 1
45 * (NAND Flash with 2 Kbyte page size)
47 writel(readl(&sc_regs->fmcr) | (1 << 5), &sc_regs->fmcr);
54 /* dram_init must store complete ramsize in gd->ram_size */
55 gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
60 void dram_init_banksize(void)
62 gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
63 gd->bd->bi_dram[0].size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
65 #if CONFIG_NR_DRAM_BANKS > 1
66 gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
67 gd->bd->bi_dram[1].size = get_ram_size((void *)PHYS_SDRAM_2,
75 puts(CONFIG_BOARDNAME);