]> git.sur5r.net Git - u-boot/blobdiff - cmd/fpga.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / cmd / fpga.c
index 8956eb1b654adf4caef2681b8f8a6b93e1245583..14ad4e52666abd4a0b1db6c5f99918f973cc1119 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000, 2001
  * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
 static int fpga_get_op(char *opstr);
 
 /* Local defines */
-#define FPGA_NONE   -1
-#define FPGA_INFO   0
-#define FPGA_LOAD   1
-#define FPGA_LOADB  2
-#define FPGA_DUMP   3
-#define FPGA_LOADMK 4
-#define FPGA_LOADP  5
-#define FPGA_LOADBP 6
-#define FPGA_LOADFS 7
+enum {
+       FPGA_NONE = -1,
+       FPGA_INFO,
+       FPGA_LOAD,
+       FPGA_LOADB,
+       FPGA_DUMP,
+       FPGA_LOADMK,
+       FPGA_LOADP,
+       FPGA_LOADBP,
+       FPGA_LOADFS,
+};
 
 /* ------------------------------------------------------------------------- */
 /* command form:
@@ -41,8 +42,8 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        int op, dev = FPGA_INVALID_DEVICE;
        size_t data_size = 0;
        void *fpga_data = NULL;
-       char *devstr = getenv("fpga");
-       char *datastr = getenv("fpgadata");
+       char *devstr = env_get("fpga");
+       char *datastr = env_get("fpgadata");
        int rc = FPGA_FAIL;
        int wrong_parms = 0;
 #if defined(CONFIG_FIT)