1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2012 Atmel Corporation
4 * Copyright (C) 2019 Stefan Roese <sr@denx.de>
8 #include <debug_uart.h>
11 #include <asm/arch/at91_common.h>
12 #include <asm/arch/clk.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 static void at91_prepare_cpu_var(void)
18 env_set("cpu", get_cpu_name());
21 int board_late_init(void)
23 at91_prepare_cpu_var();
25 if (IS_ENABLED(CONFIG_LED))
31 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
32 void board_debug_uart_init(void)
34 at91_seriald_hw_init();
38 int board_early_init_f(void)
40 #ifdef CONFIG_DEBUG_UART
48 /* Address of boot parameters */
49 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
56 gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
57 CONFIG_SYS_SDRAM_SIZE);