diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-09-11 09:59:27 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-09-11 09:59:27 +0200 |
commit | 5480ac32171ab0e38c48c9f585fa650c7867f6a1 (patch) | |
tree | 6672a47e3675e7e79fd0fbf9b491045230b24eed /board/samsung/arndale/arndale.c | |
parent | 68e1747f9c0506159e8ecc9a4feb58e9c65a7b39 (diff) | |
parent | 5c18a1cf3e56e0177388258696be4a17a672e9d0 (diff) | |
download | u-boot-imx-5480ac32171ab0e38c48c9f585fa650c7867f6a1.zip u-boot-imx-5480ac32171ab0e38c48c9f585fa650c7867f6a1.tar.gz u-boot-imx-5480ac32171ab0e38c48c9f585fa650c7867f6a1.tar.bz2 |
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Conflicts:
tools/Makefile
Diffstat (limited to 'board/samsung/arndale/arndale.c')
-rw-r--r-- | board/samsung/arndale/arndale.c | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c new file mode 100644 index 0000000..052fecd --- /dev/null +++ b/board/samsung/arndale/arndale.c @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2013 Samsung Electronics + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <asm/arch/pinmux.h> +#include <asm/arch/dwmmc.h> +#include <asm/arch/power.h> + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); + return 0; +} + +int dram_init(void) +{ + int i; + u32 addr; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); + gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE); + } + return 0; +} + +int power_init_board(void) +{ + set_ps_hold_ctrl(); + return 0; +} + +void dram_init_banksize(void) +{ + int i; + u32 addr, size; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); + size = get_ram_size((long *)addr, SDRAM_BANK_SIZE); + + gd->bd->bi_dram[i].start = addr; + gd->bd->bi_dram[i].size = size; + } +} + +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init(bd_t *bis) +{ + int ret; + /* dwmmc initializattion for available channels */ + ret = exynos_dwmmc_init(gd->fdt_blob); + if (ret) + debug("dwmmc init failed\n"); + + return ret; +} +#endif + +static int board_uart_init(void) +{ + int err = 0, uart_id; + + for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) { + err = exynos_pinmux_config(uart_id, PINMUX_FLAG_NONE); + if (err) { + debug("UART%d not configured\n", + (uart_id - PERIPH_ID_UART0)); + return err; + } + } + return err; +} + +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f(void) +{ + int err; + + err = board_uart_init(); + if (err) { + debug("UART init failed\n"); + return err; + } + return err; +} +#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard(void) +{ + printf("\nBoard: Arndale\n"); + + return 0; +} +#endif |