Vikas Manocha | 33913c5 | 2014-11-18 10:42:22 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * (C) Copyright 2014 |
| 3 | * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com. |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <miiphy.h> |
| 10 | #include <asm/arch/stv0991_periph.h> |
| 11 | #include <asm/arch/stv0991_defs.h> |
| 12 | |
| 13 | DECLARE_GLOBAL_DATA_PTR; |
| 14 | |
| 15 | #ifdef CONFIG_SHOW_BOOT_PROGRESS |
| 16 | void show_boot_progress(int progress) |
| 17 | { |
| 18 | printf("%i\n", progress); |
| 19 | } |
| 20 | #endif |
| 21 | |
| 22 | /* |
| 23 | * Miscellaneous platform dependent initialisations |
| 24 | */ |
| 25 | int board_init(void) |
| 26 | { |
| 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | int board_uart_init(void) |
| 31 | { |
| 32 | stv0991_pinmux_config(UART_GPIOC_30_31); |
| 33 | clock_setup(UART_CLOCK_CFG); |
| 34 | return 0; |
| 35 | } |
| 36 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
| 37 | int board_early_init_f(void) |
| 38 | { |
| 39 | board_uart_init(); |
| 40 | return 0; |
| 41 | } |
| 42 | #endif |
| 43 | |
| 44 | int dram_init(void) |
| 45 | { |
| 46 | gd->ram_size = PHYS_SDRAM_1_SIZE; |
| 47 | return 0; |
| 48 | } |
| 49 | |
| 50 | void dram_init_banksize(void) |
| 51 | { |
| 52 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 53 | gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; |
| 54 | } |