Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / board / Arcturus / ucp1020 / ucp1020.c
index 00bda7a4fc7a458828b7223523484555cfb9a21a..240e80413792b4f08e1b6b971ea00bb517ff1b85 100644 (file)
@@ -1,17 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- *           http://www.arcturusnetworks.com/products/ucp1020/
+ * Copyright 2013-2019 Arcturus Networks, Inc.
+ *           https://www.arcturusnetworks.com/products/ucp1020/
  *           by Oleksandr G Zhadan et al.
  * based on board/freescale/p1_p2_rdb_pc/spl.c
  * original copyright follows:
  * Copyright 2013 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <hwconfig.h>
+#include <image.h>
+#include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <miiphy.h>
@@ -109,7 +112,9 @@ int checkboard(void)
 {
        printf("Board: %s\n", CONFIG_BOARDNAME_LOCAL);
        board_gpio_init();
+#ifdef CONFIG_MMC
        printf("SD/MMC: 4-bit Mode\n");
+#endif
 
        return 0;
 }
@@ -194,7 +199,9 @@ int last_stage_init(void)
        static char newkernelargs[256];
        static u8 id1[16];
        static u8 id2;
+#ifdef CONFIG_MMC
        struct mmc *mmc;
+#endif
        char *sval, *kval;
 
        if (i2c_read(CONFIG_SYS_I2C_IDT6V49205B, 7, 1, &id1[0], 2) < 0) {
@@ -216,6 +223,7 @@ int last_stage_init(void)
 
        kval = env_get("kernelargs");
 
+#ifdef CONFIG_MMC
        mmc = find_mmc_device(0);
        if (mmc)
                if (!mmc_init(mmc)) {
@@ -235,6 +243,7 @@ int last_stage_init(void)
                                env_set("kernelargs", mmckargs);
                        }
                }
+#endif
        get_arc_info();
 
        if (kval) {