X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fsamsung%2Fcommon%2Fboard.c;h=1a4e8c9c99a1d6520cb824052cd19f004ccc0760;hb=2911bd1858d11308164b0b33de4ea0e8994d3edf;hp=da2245ff9d6c21aa1a6ae05fcaa590564069acf2;hpb=eca99c02566534940b95ee77b6ea1f098da93adc;p=oweals%2Fu-boot.git diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index da2245ff9d..1a4e8c9c99 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -21,9 +21,11 @@ #include #include #include -#include #include #include +#include +#include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -82,13 +84,19 @@ 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(); } int dram_init(void) { - int i; + unsigned int i; u32 addr; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { @@ -100,7 +108,7 @@ int dram_init(void) void dram_init_banksize(void) { - int i; + unsigned int i; u32 addr, size; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { @@ -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,24 +331,9 @@ 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) { -#ifdef CONFIG_SET_DFU_ALT_INFO - set_dfu_alt_info(); -#endif #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG set_board_info(); #endif @@ -383,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; +}