xref: /openbmc/u-boot/cmd/mac.c (revision 407b5b956a2e0facf6668fc8b295f4be9205c83e)
1  // SPDX-License-Identifier: GPL-2.0+
2  /*
3   * Copyright 2006 Freescale Semiconductor
4   * York Sun (yorksun@freescale.com)
5   */
6  
7  #include <common.h>
8  #include <command.h>
9  
10  extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
11  
12  U_BOOT_CMD(
13  	mac, 3, 1,  do_mac,
14  	"display and program the system ID and MAC addresses in EEPROM",
15  	"[read|save|id|num|errata|date|ports|port_number]\n"
16  	"mac read\n"
17  	"    - read EEPROM content into memory data structure\n"
18  	"mac save\n"
19  	"    - save memory data structure to the EEPROM\n"
20  	"mac id\n"
21  	"    - program system id per hard coded value\n"
22  	"mac num string\n"
23  	"    - program system serial number to value string\n"
24  	"mac errata string\n"
25  	"    - program errata data to value string\n"
26  	"mac date YYMMDDhhmmss\n"
27  	"    - program date to string value YYMMDDhhmmss\n"
28  	"mac ports N\n"
29  	"    - program the number of network ports to integer N\n"
30  	"mac X string\n"
31  	"    - program MAC addr for port X [X=0,1..] to colon separated string"
32  );
33