public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v2] powerpc/eeprom: cleanup mac command
Date: Wed, 10 Aug 2011 09:56:31 -0500	[thread overview]
Message-ID: <1312988191-26950-1-git-send-email-yorksun@freescale.com> (raw)

Change the help message to be more helpful. Print argument format.
Fix MAX_NUM_PORTS to comply with v1 NXID format.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 board/freescale/common/sys_eeprom.c |    2 +-
 common/cmd_mac.c                    |   29 +++++++++++++++++------------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index d2ed036..ebcdfd8 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -34,7 +34,7 @@
 #endif
 
 #ifdef CONFIG_SYS_I2C_EEPROM_NXID
-#define MAX_NUM_PORTS	23
+#define MAX_NUM_PORTS	31
 #define NXID_VERSION	1
 #endif
 
diff --git a/common/cmd_mac.c b/common/cmd_mac.c
index 1884c2a..bd9cc19 100644
--- a/common/cmd_mac.c
+++ b/common/cmd_mac.c
@@ -29,21 +29,26 @@ extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 U_BOOT_CMD(
 	mac, 3, 1,  do_mac,
 	"display and program the system ID and MAC addresses in EEPROM",
-	"[read|save|id|num|errata|date|ports|0|1|2|3|4|5|6|7]\n"
+	"without argument\n"
+	"    - show content of system ID and MAC addresses\n"
 	"read\n"
-	"    - show content of EEPROM\n"
+	"    - read EEPROM without showing\n"
 	"mac save\n"
 	"    - save to the EEPROM\n"
 	"mac id\n"
-	"    - program system id\n"
-	"mac num\n"
-	"    - program system serial number\n"
-	"mac errata\n"
-	"    - program errata data\n"
-	"mac date\n"
-	"    - program date\n"
-	"mac ports\n"
+	"    - program system id (fixed)\n"
+	"mac num <string>\n"
+	"    - program <string> as system serial number\n"
+	"mac errata <string>\n"
+	"    - program <string> as errata data\n"
+	"mac date <YYMMDDhhmmss>\n"
+	"    - program timestamp\n"
+	"mac ports <n>\n"
 	"    - program the number of ports\n"
-	"mac X\n"
-	"    - program the MAC address for port X [X=0...7]"
+	"mac <n> <XX:XX:XX:XX:XX:XX>\n"
+#ifdef CONFIG_SYS_I2C_EEPROM_NXID
+	"    - program the MAC address for port n [n=0...30]"
+#else
+	"    - program the MAC address for port n [n=0...7]"
+#endif
 );
-- 
1.7.0.4

             reply	other threads:[~2011-08-10 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 14:56 York Sun [this message]
2011-08-11  1:27 ` [U-Boot] [u-boot-release] [Patch v2] powerpc/eeprom: cleanup mac command Tabi Timur-B04825
2011-08-11  1:34   ` Mike Frysinger
2011-08-11 14:35   ` York Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312988191-26950-1-git-send-email-yorksun@freescale.com \
    --to=yorksun@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox