2 * Copyright (C) 2013 Samsung Electronics
4 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/pinmux.h>
11 #include <asm/arch/dwmmc.h>
12 #include <asm/arch/power.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 #ifdef CONFIG_USB_EHCI_EXYNOS
17 int board_usb_init(int index, enum usb_init_type init)
19 /* Configure gpios for usb 3503 hub:
20 * disconnect, toggle reset and connect
22 gpio_request(EXYNOS5_GPIO_D17, "usb_connect");
23 gpio_request(EXYNOS5_GPIO_X35, "usb_reset");
24 gpio_direction_output(EXYNOS5_GPIO_D17, 0);
25 gpio_direction_output(EXYNOS5_GPIO_X35, 0);
27 gpio_direction_output(EXYNOS5_GPIO_X35, 1);
28 gpio_direction_output(EXYNOS5_GPIO_D17, 1);
36 gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
45 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
46 addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
47 gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE);
52 int power_init_board(void)
58 int dram_init_banksize(void)
63 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
64 addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
65 size = get_ram_size((long *)addr, SDRAM_BANK_SIZE);
67 gd->bd->bi_dram[i].start = addr;
68 gd->bd->bi_dram[i].size = size;
74 #ifdef CONFIG_GENERIC_MMC
75 int board_mmc_init(bd_t *bis)
78 /* dwmmc initializattion for available channels */
79 ret = exynos_dwmmc_init(gd->fdt_blob);
81 debug("dwmmc init failed\n");
87 static int board_uart_init(void)
91 for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) {
92 err = exynos_pinmux_config(uart_id, PINMUX_FLAG_NONE);
94 debug("UART%d not configured\n",
95 (uart_id - PERIPH_ID_UART0));
102 #ifdef CONFIG_BOARD_EARLY_INIT_F
103 int board_early_init_f(void)
107 err = board_uart_init();
109 debug("UART init failed\n");
116 #ifdef CONFIG_DISPLAY_BOARDINFO
119 printf("\nBoard: Arndale\n");
125 #ifdef CONFIG_S5P_PA_SYSRAM
126 void smp_set_core_boot_addr(unsigned long addr, int corenr)
128 writel(addr, CONFIG_S5P_PA_SYSRAM);
130 /* make sure this write is really executed */
131 __asm__ volatile ("dsb\n");