}
if (argc > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
cmd = argv[1];
}
if (argc != 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (!is_match_magic()) {
printf("Please read the EEPROM ('read_eeprom') and/or initialize the EEPROM ('initialize') first.\n");
return 0;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/**
return be.pcb_revision;
}
+
+#ifndef CONFIG_SPL_BUILD
+
+#ifdef CONFIG_SYS_LONGHELP
+static char booti_help_text[] =
+ "- displays memory copy of EEPROM\n"
+ "mac read_eeprom - reads EEPROM into memory\n"
+ "mac initialize - initializes memory copy with magic number\n"
+ "mac write_eeprom - writes the EEPROM from memory\n"
+ "mac manuf_test_status [unknown|pass|fail] - sets test status in memory\n"
+ "mac_address <addr> - sets MAC address in memory\n"
+ "mac pcb_revision <rev> - sets PCB revision in memory\n"
+ "mac bom_variant <var> - sets BOM variant in memory\n"
+ "mac bom_revision <rev> - sets BOM revision in memory\n";
+#else
+ "";
+#endif
+
+U_BOOT_CMD(
+ mac, 3, 1, do_mac,
+ "display and program the board revision and MAC address in EEPROM",
+ booti_help_text);
+
+#endif /* CONFIG_SPL_BUILD */