SPDX: Convert all of our single license tags to Linux Kernel style
[oweals/u-boot.git] / board / gateworks / gw_ventana / gw_ventana_spl.c
index 69a638d71d8ca7904314a36cb50208b7fee1a2fc..a6ac546e9599cc03d8aac142a76bdb98cb8a210c 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2014 Gateworks Corporation
  * Author: Tim Harvey <tharvey@gateworks.com>
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <common.h>
@@ -21,8 +20,6 @@
 #include "gsc.h"
 #include "common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define RTT_NOM_120OHM /* use 120ohm Rtt_nom vs 60ohm (lower power) */
 #define GSC_EEPROM_DDR_SIZE    0x2B    /* enum (512,1024,2048) MB */
 #define GSC_EEPROM_DDR_WIDTH   0x2D    /* enum (32,64) bit */
@@ -583,17 +580,6 @@ static void ccgr_init(void)
        writel(0x000003FF, &ccm->CCGR6);
 }
 
-static void gpr_init(void)
-{
-       struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
-
-       /* enable AXI cache for VDOA/VPU/IPU */
-       writel(0xF00000CF, &iomux->gpr[4]);
-       /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
-       writel(0x007F007F, &iomux->gpr[6]);
-       writel(0x007F007F, &iomux->gpr[7]);
-}
-
 /*
  * called from C runtime startup code (arch/arm/lib/crt0.S:_main)
  * - we have a stack and a place to store GD, both in SRAM
@@ -637,9 +623,6 @@ void board_init_f(ulong dummy)
        spl_dram_init(8 << ventana_info.sdram_width,
                      16 << ventana_info.sdram_size,
                      board_model);
-
-       /* Clear the BSS. */
-       memset(__bss_start, 0, __bss_end - __bss_start);
 }
 
 void board_boot_order(u32 *spl_boot_list)
@@ -690,9 +673,9 @@ int spl_start_uboot(void)
        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)
+       env_load();
+       debug("boot_os=%s\n", env_get("boot_os"));
+       if (env_get_yesno("boot_os") == 1)
                ret = 0;
 #else
        /* use i2c-0:0x50:0x00 for falcon boot mode (0=linux, else uboot) */