[coreboot] [flashrom] r535 - trunk

svn at coreboot.org svn at coreboot.org
Tue May 19 16:14:21 CEST 2009


Author: uwe
Date: 2009-05-19 16:14:21 +0200 (Tue, 19 May 2009)
New Revision: 535

Modified:
   trunk/README
   trunk/flashrom.8
   trunk/flashrom.c
   trunk/nic3com.c
Log:
Documentation improvements and small code/whitespace fixes (trivial).

Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>



Modified: trunk/README
===================================================================
--- trunk/README	2009-05-18 22:27:53 UTC (rev 534)
+++ trunk/README	2009-05-19 14:14:21 UTC (rev 535)
@@ -3,7 +3,10 @@
 -------------------------------------------------------------------------------
 
 flashrom is a utility for reading, writing, verifying and erasing flash ROM
-chips. It's often used to flash BIOS/coreboot/firmware images.
+chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system
+using a supported mainboard, but it also supports flashing of network
+cards (NICs), SATA controller cards, and other external devices which can
+program flash chips.
 
 It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
 TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
@@ -80,7 +83,7 @@
 ---------------------------------------------
 
 Please check the output of 'flashrom -L' for the list of supported
-flash chips, chipsets/southbridges, and mainboards.
+flash chips, chipsets/southbridges, mainboards, and flash programmers.
 
 See also http://coreboot.org/Flashrom for more details.
 

Modified: trunk/flashrom.8
===================================================================
--- trunk/flashrom.8	2009-05-18 22:27:53 UTC (rev 534)
+++ trunk/flashrom.8	2009-05-19 14:14:21 UTC (rev 535)
@@ -132,11 +132,18 @@
 .sp
 .BR "* internal" " (default, for in-system flashing in the mainboard)"
 .sp
+.BR "* dummy" " (just prints all operations and accesses)"
+.sp
 .BR "* nic3com" " (for flash ROMs on 3COM network cards)"
 .sp
-If you have multiple supported NICs in your system, you must use
-.B "flashrom -p nic3com=bb:dd.f"
-to explicitly select one of them, where
+.BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)"
+.sp
+If you have multiple supported PCI cards which can program flash chips
+(NICs, SATA/IDE controllers, etc.) in your system, you must use the
+.B "flashrom -p xxxx=bb:dd.f"
+syntax to explicitly select one of them, where
+.B xxxx
+is the name of the programmer
 .B bb
 is the PCI bus number,
 .B dd
@@ -147,9 +154,9 @@
 Example:
 .B "flashrom -p nic3com=05:04.0"
 .sp
-.BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controller cards)"
-.sp
-.BR "* dummy" " (just prints all operations and accesses)"
+Currently the following programmers support this mechanism:
+.BR nic3com ,
+.BR satasii .
 .TP
 .B "\-h, \-\-help"
 Show a help text and exit.

Modified: trunk/flashrom.c
===================================================================
--- trunk/flashrom.c	2009-05-18 22:27:53 UTC (rev 534)
+++ trunk/flashrom.c	2009-05-19 14:14:21 UTC (rev 535)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2000 Silicon Integrated System Corporation
  * Copyright (C) 2004 Tyan Corp <yhlu at tyan.com>
- * Copyright (C) 2005-2008 coresystems GmbH 
+ * Copyright (C) 2005-2008 coresystems GmbH
  * Copyright (C) 2008,2009 Carl-Daniel Hailfinger
  *
  * This program is free software; you can redistribute it and/or modify
@@ -367,13 +367,15 @@
 
 void usage(const char *name)
 {
-	printf("usage: %s [-rwvEVfLhR] [-c chipname] [-s exclude_start]\n",
+	printf("usage: %s [-EVfLhR] [-r file] [-w file] [-v file] [-c chipname] [-s addr]\n"
+	       "       [-e addr] [-m [vendor:]part] [-l file] [-i image] [-p programmer] [file]",
 	       name);
-	printf("       [-e exclude_end] [-m [vendor:]part] [-l file.layout] [-i imagename] [file]\n");
-	printf("Please  note that the command line interface for flashrom will "
-		"change before flashrom 1.0. Do not use flashrom in scripts or "
-		"other automated tools without checking that your flashrom "
+
+	printf("\n\nPlease note that the command line interface for flashrom will "
+		"change before flashrom 1.0.\nDo not use flashrom in scripts or "
+		"other automated tools without checking that your flashrom\n"
 		"version won't interpret them in a totally different way.\n\n");
+
 	printf
 	    ("   -r | --read:                      read flash and save into file\n"
 	     "   -w | --write:                     write file into flash\n"
@@ -389,9 +391,10 @@
 	     "   -i | --image <name>:              only flash image name from flash layout\n"
 	     "   -L | --list-supported:            print supported devices\n"
 	     "   -p | --programmer <name>:         specify the programmer device\n"
+	     "                                     (internal, dummy, nic3com, satasii)\n"
 	     "   -h | --help:                      print this help text\n"
 	     "   -R | --version:                   print the version (release)\n"
-	     "\n" " If no file is specified, then all that happens"
+	     "\nIf no file is specified, then all that happens"
 	     " is that flash info is dumped.\n\n");
 	exit(1);
 }

Modified: trunk/nic3com.c
===================================================================
--- trunk/nic3com.c	2009-05-18 22:27:53 UTC (rev 534)
+++ trunk/nic3com.c	2009-05-19 14:14:21 UTC (rev 535)
@@ -110,10 +110,6 @@
 
 uint8_t nic3com_chip_readb(const chipaddr addr)
 {
-	uint8_t val;
-
 	OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR);
-	val = INB(io_base_addr + BIOS_ROM_DATA);
-
-	return val;
+	return INB(io_base_addr + BIOS_ROM_DATA);
 }





More information about the coreboot mailing list