]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
fpga: Use enum for bitstream command types
authorMichal Simek <michal.simek@xilinx.com>
Fri, 6 Jan 2017 10:20:54 +0000 (11:20 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 10 Jan 2017 09:21:59 +0000 (10:21 +0100)
Using enum simplify handling of different bitstream command
types.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
cmd/fpga.c

index 8956eb1b654adf4caef2681b8f8a6b93e1245583..016349f5608695ebdd6ec2f48bad36f018a35278 100644 (file)
 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: