armv8: lx2160a: add MMU table entries for PCIe
[oweals/u-boot.git] / arch / arm / mach-rockchip / rk3036-board.c
index b63f9c0dde67ab9da93903e78782858cf498f859..e6ea0e9a6ae520b4018457e5377f25a0048ad152 100644 (file)
@@ -1,34 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2015 Rockchip Electronics Co., Ltd
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
 #include <ram.h>
-#include <asm/io.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/periph.h>
 #include <asm/gpio.h>
+#include <asm/io.h>
+#include <asm/arch-rockchip/clock.h>
+#include <asm/arch-rockchip/periph.h>
+#include <asm/arch-rockchip/grf_rk3036.h>
+#include <asm/arch-rockchip/boot_mode.h>
+#include <asm/arch-rockchip/sdram_rk3036.h>
 #include <dm/pinctrl.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+__weak int rk_board_late_init(void)
+{
+       return 0;
+}
+
+int board_late_init(void)
+{
+       setup_boot_mode();
+
+       return rk_board_late_init();
+}
+
 int board_init(void)
 {
        return 0;
 }
 
+#if !CONFIG_IS_ENABLED(RAM)
+/*
+ * When CONFIG_RAM is enabled, the dram_init() function is implemented
+ * in sdram_common.c.
+ */
 int dram_init(void)
 {
        gd->ram_size = sdram_size();
 
        return 0;
 }
+#endif
 
-#ifndef CONFIG_SYS_DCACHE_OFF
+#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 void enable_caches(void)
 {
        /* Enable D-cache. I-cache is already enabled in start.S */