3 * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com.
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/stv0991_periph.h>
11 #include <asm/arch/stv0991_defs.h>
12 #include <asm/arch/hardware.h>
13 #include <asm/arch/gpio.h>
17 DECLARE_GLOBAL_DATA_PTR;
19 struct gpio_regs *const gpioa_regs =
20 (struct gpio_regs *) GPIOA_BASE_ADDR;
22 #ifdef CONFIG_SHOW_BOOT_PROGRESS
23 void show_boot_progress(int progress)
25 printf("%i\n", progress);
29 void enable_eth_phy(void)
31 /* Set GPIOA_06 pad HIGH (Appli board)*/
32 writel(readl(&gpioa_regs->dir) | 0x40, &gpioa_regs->dir);
33 writel(readl(&gpioa_regs->data) | 0x40, &gpioa_regs->data);
35 int board_eth_enable(void)
37 stv0991_pinmux_config(ETH_GPIOB_10_31_C_0_4);
38 clock_setup(ETH_CLOCK_CFG);
44 * Miscellaneous platform dependent initialisations
52 int board_uart_init(void)
54 stv0991_pinmux_config(UART_GPIOC_30_31);
55 clock_setup(UART_CLOCK_CFG);
59 #ifdef CONFIG_BOARD_EARLY_INIT_F
60 int board_early_init_f(void)
69 gd->ram_size = PHYS_SDRAM_1_SIZE;
73 void dram_init_banksize(void)
75 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
76 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
80 int board_eth_init(bd_t *bis)
84 #if defined(CONFIG_DESIGNWARE_ETH)
85 u32 interface = PHY_INTERFACE_MODE_MII;
86 if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0)