2 * Embest/Timll DevKit3250 board support
4 * Copyright (C) 2011 Vladimir Zapolskiy <vz@mleia.com>
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/sys_proto.h>
11 #include <asm/arch/cpu.h>
12 #include <asm/arch/emc.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 static struct emc_regs *emc = (struct emc_regs *)EMC_BASE;
18 int board_early_init_f(void)
20 lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
27 /* adress of boot parameters */
28 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
30 #ifdef CONFIG_SYS_FLASH_CFI
31 /* Use 16-bit memory interface for NOR Flash */
32 emc->stat[0].config = EMC_STAT_CONFIG_PB | EMC_STAT_CONFIG_16BIT;
34 /* Change the NOR timings to optimum value to get maximum bandwidth */
35 emc->stat[0].waitwen = EMC_STAT_WAITWEN(1);
36 emc->stat[0].waitoen = EMC_STAT_WAITOEN(1);
37 emc->stat[0].waitrd = EMC_STAT_WAITRD(12);
38 emc->stat[0].waitpage = EMC_STAT_WAITPAGE(12);
39 emc->stat[0].waitwr = EMC_STAT_WAITWR(5);
40 emc->stat[0].waitturn = EMC_STAT_WAITTURN(2);
48 gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
49 CONFIG_SYS_SDRAM_SIZE);