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>
16 #include <dm/platdata.h>
17 #include <dm/platform_data/serial_pl01x.h>
19 DECLARE_GLOBAL_DATA_PTR;
21 struct gpio_regs *const gpioa_regs =
22 (struct gpio_regs *) GPIOA_BASE_ADDR;
24 static const struct pl01x_serial_platdata serial_platdata = {
30 U_BOOT_DEVICE(stv09911_serials) = {
31 .name = "serial_pl01x",
32 .platdata = &serial_platdata,
35 #ifdef CONFIG_SHOW_BOOT_PROGRESS
36 void show_boot_progress(int progress)
38 printf("%i\n", progress);
42 void enable_eth_phy(void)
44 /* Set GPIOA_06 pad HIGH (Appli board)*/
45 writel(readl(&gpioa_regs->dir) | 0x40, &gpioa_regs->dir);
46 writel(readl(&gpioa_regs->data) | 0x40, &gpioa_regs->data);
48 int board_eth_enable(void)
50 stv0991_pinmux_config(ETH_GPIOB_10_31_C_0_4);
51 clock_setup(ETH_CLOCK_CFG);
57 * Miscellaneous platform dependent initialisations
65 int board_uart_init(void)
67 stv0991_pinmux_config(UART_GPIOC_30_31);
68 clock_setup(UART_CLOCK_CFG);
72 #ifdef CONFIG_BOARD_EARLY_INIT_F
73 int board_early_init_f(void)
82 gd->ram_size = PHYS_SDRAM_1_SIZE;
86 void dram_init_banksize(void)
88 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
89 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
93 int board_eth_init(bd_t *bis)
97 #if defined(CONFIG_DESIGNWARE_ETH)
98 u32 interface = PHY_INTERFACE_MODE_MII;
99 if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0)