Commit 558ee873 authored by Marek Vasut's avatar Marek Vasut

mxssb: Make use of the CPU enum

Use enum of list of CPU types to improve the typing of the variable.
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
parent f2d11fed
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
#include "mxssb.h" #include "mxssb.h"
enum { enum sb_target_cpu {
CPU_UNKNOWN,
CPU_MX23, CPU_MX23,
CPU_MX28, CPU_MX28,
}; };
...@@ -64,7 +65,7 @@ struct sb_section_ctx { ...@@ -64,7 +65,7 @@ struct sb_section_ctx {
}; };
struct sb_image_ctx { struct sb_image_ctx {
int target_cpu; enum sb_target_cpu target_cpu;
int verbose_boot; int verbose_boot;
struct sb_section_ctx *sect; struct sb_section_ctx *sect;
...@@ -960,7 +961,7 @@ int main(int argc, char **argv) ...@@ -960,7 +961,7 @@ int main(int argc, char **argv)
struct sb_image_ctx ctx; struct sb_image_ctx ctx;
memset(&ctx, 0, sizeof(ctx)); memset(&ctx, 0, sizeof(ctx));
ctx.target_cpu = -1; ctx.target_cpu = CPU_UNKNOWN;
while ((opt = getopt(argc, argv, "c:s:u:o:vh")) != -1) { while ((opt = getopt(argc, argv, "c:s:u:o:vh")) != -1) {
switch (opt) { switch (opt) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment