+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2013 SAMSUNG Electronics
* Rajeshwari Shinde <rajeshwari.s@samsung.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
return 0;
}
-void dram_init_banksize(void)
+int dram_init_banksize(void)
{
unsigned int i;
unsigned long addr, size;
gd->bd->bi_dram[i].start = addr;
gd->bd->bi_dram[i].size = size;
}
+
+ return 0;
}
static int board_uart_init(void)
board_i2c_init(gd->fdt_blob);
#endif
-#if defined(CONFIG_EXYNOS_FB)
- /*
- * board_init_f(arch/arm/lib/board.c) calls lcd_setmem() which needs
- * panel_info.vl_col, panel_info.vl_row and panel_info.vl_bpix,
- * to reserve frame-buffer memory at a very early stage. So, we need
- * to fill panel_info.vl_col, panel_info.vl_row and panel_info.vl_bpix
- * before lcd_setmem() is called.
- */
- err = exynos_lcd_early_init(gd->fdt_blob);
- if (err) {
- debug("LCD early init failed\n");
- return err;
- }
-#endif
-
return exynos_early_init_f();
}
#endif
return 0;
}
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
static int init_mmc(void)
{
-#ifdef CONFIG_SDHCI
+#ifdef CONFIG_MMC_SDHCI
return exynos_mmc_init(gd->fdt_blob);
#else
return 0;
static int init_dwmmc(void)
{
-#ifdef CONFIG_DWMMC
+#ifdef CONFIG_MMC_DW
return exynos_dwmmc_init(gd->fdt_blob);
#else
return 0;
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
- stdio_print_current_devices();
+ struct udevice *dev;
+ int ret;
- if (cros_ec_get_error()) {
+ stdio_print_current_devices();
+ ret = uclass_first_device_err(UCLASS_CROS_EC, &dev);
+ if (ret && ret != -ENODEV) {
/* Force console on */
gd->flags &= ~GD_FLG_SILENT;
- printf("cros-ec communications failure %d\n",
- cros_ec_get_error());
+ printf("cros-ec communications failure %d\n", ret);
puts("\nPlease reset with Power+Refresh\n\n");
panic("Cannot init cros-ec device");
return -1;
if (node < 0)
return;
- gpio_request_by_name_nodev(gd->fdt_blob, node, "reset-gpio", 0, &gpio,
- GPIOD_IS_OUT);
+ gpio_request_by_name_nodev(offset_to_ofnode(node), "reset-gpio", 0,
+ &gpio, GPIOD_IS_OUT);
if (dm_gpio_is_valid(&gpio)) {
/*