diff options
author | Stefan Roese <sr@denx.de> | 2019-04-02 10:57:27 +0200 |
---|---|---|
committer | Eugen Hristev <eugen.hristev@microchip.com> | 2019-04-09 09:28:50 +0300 |
commit | a71e2f933bbd482b8c054dd40eddf43618e3d22a (patch) | |
tree | 375ab6ce118b12b7658e71f80bbf24bc1b741483 /board/gardena/smart-gateway-at91sam/board.c | |
parent | d4c8873f93e87e20b82034121ea7e75ba210d2d9 (diff) | |
download | u-boot-a71e2f933bbd482b8c054dd40eddf43618e3d22a.tar.gz u-boot-a71e2f933bbd482b8c054dd40eddf43618e3d22a.tar.xz u-boot-a71e2f933bbd482b8c054dd40eddf43618e3d22a.zip |
arm: at91: Add gardena-gateway-at91sam support
The GARDENA smart Gateway boards are equipped with an Atmel / Microchip
AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage.
This patch adds support for this board including SPL support. Therefore
the AT91Boostrap is not needed on this platform any more.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/gardena/smart-gateway-at91sam/board.c')
-rw-r--r-- | board/gardena/smart-gateway-at91sam/board.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/board/gardena/smart-gateway-at91sam/board.c b/board/gardena/smart-gateway-at91sam/board.c new file mode 100644 index 0000000000..6a1389eb05 --- /dev/null +++ b/board/gardena/smart-gateway-at91sam/board.c @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2012 Atmel Corporation + * Copyright (C) 2019 Stefan Roese <sr@denx.de> + */ + +#include <common.h> +#include <debug_uart.h> +#include <led.h> +#include <asm/arch/at91_common.h> +#include <asm/arch/clk.h> + +DECLARE_GLOBAL_DATA_PTR; + +static void at91_prepare_cpu_var(void) +{ + env_set("cpu", get_cpu_name()); +} + +int board_late_init(void) +{ + at91_prepare_cpu_var(); + + if (IS_ENABLED(CONFIG_LED)) + led_default_state(); + + return 0; +} + +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) +{ + at91_seriald_hw_init(); +} +#endif + +int board_early_init_f(void) +{ +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#endif + return 0; +} + +int board_init(void) +{ + /* Address of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + return 0; +} + +int dram_init(void) +{ + gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, + CONFIG_SYS_SDRAM_SIZE); + + return 0; +} |