X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fgateworks%2Fgw_ventana%2Fgw_ventana_spl.c;h=d4418e554c4aac209a37126d4e6b73b009ea6c0c;hb=4d80051b63ff54f6b6f90fceb92cf87ab3401ecb;hp=79cb5943d0ef38c932aa49b9fc78df81838066ac;hpb=0e6b7a28243175ae0874d53b6e6e4eff8548d71f;p=oweals%2Fu-boot.git diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index 79cb5943d0..d4418e554c 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "gsc.h" @@ -514,10 +515,8 @@ void board_init_f(ulong dummy) setup_iomux_gpio(board_model, &ventana_info); /* provide some some default: 32bit 128MB */ - if (GW_UNKNOWN == board_model) { - ventana_info.sdram_width = 2; - ventana_info.sdram_size = 3; - } + if (GW_UNKNOWN == board_model) + hang(); /* configure MMDC for SDRAM width/size and per-model calibration */ spl_dram_init(8 << ventana_info.sdram_width, @@ -551,7 +550,29 @@ void spl_board_init(void) default: puts("Unknown boot device\n"); } + + /* PMIC init */ + setup_pmic(); +} + +#ifdef CONFIG_SPL_OS_BOOT +/* return 1 if we wish to boot to uboot vs os (falcon mode) */ +int spl_start_uboot(void) +{ + int ret = 1; + + debug("%s\n", __func__); +#ifdef CONFIG_SPL_ENV_SUPPORT + env_init(); + env_relocate_spec(); + debug("boot_os=%s\n", getenv("boot_os")); + if (getenv_yesno("boot_os") == 1) + ret = 0; +#endif + debug("%s booting %s\n", __func__, ret ? "uboot" : "linux"); + return ret; } +#endif void reset_cpu(ulong addr) {