]> git.sur5r.net Git - u-boot/blobdiff - board/samsung/common/board.c
Merge git://git.denx.de/u-boot-usb
[u-boot] / board / samsung / common / board.c
index 97950fa1920e0765b8031ac2066f5804c0b50402..1a4e8c9c99a1d6520cb824052cd19f004ccc0760 100644 (file)
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
 #include <asm/arch/system.h>
-#include <power/pmic.h>
 #include <asm/arch/sromc.h>
 #include <lcd.h>
+#include <i2c.h>
+#include <usb.h>
+#include <dwc3-uboot.h>
 #include <samsung/misc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -82,7 +84,13 @@ int board_init(void)
        }
        boot_temp_check();
 #endif
+#ifdef CONFIG_TZSW_RESERVED_DRAM_SIZE
+       /* The last few MB of memory can be reserved for secure firmware */
+       ulong size = CONFIG_TZSW_RESERVED_DRAM_SIZE;
 
+       gd->ram_size -= size;
+       gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= size;
+#endif
        return exynos_init();
 }
 
@@ -162,7 +170,7 @@ int board_early_init_f(void)
 }
 #endif
 
-#if defined(CONFIG_POWER)
+#if defined(CONFIG_POWER) || defined(CONFIG_DM_PMIC)
 int power_init_board(void)
 {
        set_ps_hold_ctrl();
@@ -323,18 +331,6 @@ int board_late_init(void)
 }
 #endif
 
-int arch_early_init_r(void)
-{
-#ifdef CONFIG_CROS_EC
-       if (cros_ec_board_init()) {
-               printf("%s: Failed to init EC\n", __func__);
-               return 0;
-       }
-#endif
-
-       return 0;
-}
-
 #ifdef CONFIG_MISC_INIT_R
 int misc_init_r(void)
 {
@@ -380,3 +376,11 @@ void reset_misc(void)
                dm_gpio_set_value(&gpio, 1);
        }
 }
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+#ifdef CONFIG_USB_DWC3
+       dwc3_uboot_exit(index);
+#endif
+       return 0;
+}