configs: Disable now unbuildable SPI options for boards
[platform/kernel/u-boot.git] / board / renesas / sh7757lcr / sh7757lcr.c
index 0a04a9d..3222701 100644 (file)
@@ -1,10 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2011  Renesas Solutions Corp.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <environment.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -30,6 +30,7 @@ static void init_gctrl(void)
 
 static int init_pcie_bridge_from_spi(void *buf, size_t size)
 {
+#ifdef CONFIG_DEPRECATED
        struct spi_flash *spi;
        int ret;
        unsigned long pcie_addr;
@@ -54,6 +55,10 @@ static int init_pcie_bridge_from_spi(void *buf, size_t size)
        spi_flash_free(spi);
 
        return 0;
+#else
+       printf("No SPI support so no PCIe support\n");
+       return 1;
+#endif
 }
 
 static void init_pcie_bridge(void)
@@ -231,6 +236,7 @@ int board_mmc_init(bd_t *bis)
 
 static int get_sh_eth_mac_raw(unsigned char *buf, int size)
 {
+#ifdef CONFIG_DEPRECATED
        struct spi_flash *spi;
        int ret;
 
@@ -247,6 +253,7 @@ static int get_sh_eth_mac_raw(unsigned char *buf, int size)
                return 1;
        }
        spi_flash_free(spi);
+#endif
 
        return 0;
 }
@@ -278,10 +285,10 @@ static void init_ethernet_mac(void)
        for (i = 0; i < SH7757LCR_ETHERNET_NUM_CH; i++) {
                get_sh_eth_mac(i, mac_string, buf);
                if (i == 0)
-                       setenv("ethaddr", mac_string);
+                       env_set("ethaddr", mac_string);
                else {
                        sprintf(env_string, "eth%daddr", i);
-                       setenv(env_string, mac_string);
+                       env_set(env_string, mac_string);
                }
 
                set_mac_to_sh_eth_register(i, mac_string);
@@ -291,7 +298,7 @@ static void init_ethernet_mac(void)
        for (i = 0; i < SH7757LCR_GIGA_ETHERNET_NUM_CH; i++) {
                get_sh_eth_mac(i + SH7757LCR_ETHERNET_NUM_CH, mac_string, buf);
                sprintf(env_string, "eth%daddr", i + SH7757LCR_ETHERNET_NUM_CH);
-               setenv(env_string, mac_string);
+               env_set(env_string, mac_string);
 
                set_mac_to_sh_giga_eth_register(i, mac_string);
        }
@@ -352,6 +359,7 @@ U_BOOT_CMD(
        "enable SH-G200 bus (disable PCIe-G200)"
 );
 
+#ifdef CONFIG_DEPRECATED
 int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        int i, ret;
@@ -418,3 +426,4 @@ U_BOOT_CMD(
        "write MAC address for ETHERC/GETHERC",
        "[ETHERC ch0] [ETHERC ch1] [GETHERC ch0] [GETHERC ch1]\n"
 );
+#endif