On 08.10.2010 05:07, ron minnich wrote:
> Kinda fun.
>
> ---------- Forwarded message ----------
>
> Date: Thu, Oct 7, 2010 at 11:25 AM
> Subject: Dogbert's Blog: BIOS Password Backdoors in Laptops
> To: ron minnich <rminnich(a)gmail.com>
>
>
> Amusing, and potentially useful, too.
>
> http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html
>
Ooh nice! I really need to write a short tutorial on how to do password
recovery with flashrom if you can still boot the machine (i.e. only a
BIOS setting screen password) or if you can open the machine and access
the flash chip.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
I wanted to tag 0.9.3, but then I noticed that compilation was broken in
a few cases, and the README had insufficient information.
Fix that.
In detail:
CONFIG_BITBANG_SPI was not selected if CONFIG_NICINTEL_SPI was on by
default.
Wiki output was missing all flash chips if CONFIG_INTERNAL was not selected.
ft2232_spi used possibly negative indices in the toupper() function/array.
Software requirements on non-Linux/FreeBSD/OpenBSD operating systems
were missing.
Non-x86 compilation does not work with the default programmer set, so
list the make parameters which result in a working build.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Index: flashrom-compilefixes/Makefile
===================================================================
--- flashrom-compilefixes/Makefile (revision 1201)
+++ flashrom-compilefixes/Makefile (working copy)
@@ -115,21 +115,6 @@
# RayeR SPIPGM hardware support
CONFIG_RAYER_SPI ?= yes
-# Bitbanging SPI infrastructure, default off unless needed.
-ifeq ($(CONFIG_RAYER_SPI), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-ifeq ($(CONFIG_INTERNAL), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-ifeq ($(CONFIG_NICINTEL_SPI), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-CONFIG_BITBANG_SPI ?= no
-endif
-endif
-endif
-
# Always enable 3Com NICs for now.
CONFIG_NIC3COM ?= yes
@@ -170,7 +155,22 @@
# Disable wiki printing by default. It is only useful if you have wiki access.
CONFIG_PRINT_WIKI ?= no
+# Bitbanging SPI infrastructure, default off unless needed.
+ifeq ($(CONFIG_RAYER_SPI), yes)
+override CONFIG_BITBANG_SPI = yes
+else
ifeq ($(CONFIG_INTERNAL), yes)
+override CONFIG_BITBANG_SPI = yes
+else
+ifeq ($(CONFIG_NICINTEL_SPI), yes)
+override CONFIG_BITBANG_SPI = yes
+else
+CONFIG_BITBANG_SPI ?= no
+endif
+endif
+endif
+
+ifeq ($(CONFIG_INTERNAL), yes)
FEATURE_CFLAGS += -D'CONFIG_INTERNAL=1'
PROGRAMMER_OBJS += processor_enable.o chipset_enable.o board_enable.o cbtable.o dmi.o internal.o
# FIXME: The PROGRAMMER_OBJS below should only be included on x86.
Index: flashrom-compilefixes/print_wiki.c
===================================================================
--- flashrom-compilefixes/print_wiki.c (revision 1201)
+++ flashrom-compilefixes/print_wiki.c (working copy)
@@ -268,8 +268,8 @@
time_t t = time(NULL);
printf(wiki_header, ctime(&t), flashrom_version);
+ print_supported_chips_wiki(2);
#if CONFIG_INTERNAL == 1
- print_supported_chips_wiki(2);
print_supported_chipsets_wiki(3);
print_supported_boards_wiki();
#endif
Index: flashrom-compilefixes/ft2232_spi.c
===================================================================
--- flashrom-compilefixes/ft2232_spi.c (revision 1201)
+++ flashrom-compilefixes/ft2232_spi.c (working copy)
@@ -148,7 +148,7 @@
free(arg);
arg = extract_programmer_param("port");
if (arg) {
- switch (toupper(*arg)) {
+ switch (toupper((unsigned char)*arg)) {
case 'A':
ft2232_interface = INTERFACE_A;
break;
Index: flashrom-compilefixes/README
===================================================================
--- flashrom-compilefixes/README (revision 1201)
+++ flashrom-compilefixes/README (working copy)
@@ -60,6 +60,11 @@
* devel/gmake
* sysutils/pciutils
+On other operating systems, you need the following software:
+
+ * pciutils+libpci (if you want support for mainboard or PCI device flashing)
+ * libusb (if you want FT2232 or Dediprog support)
+
To compile on Linux, use:
make
@@ -111,6 +116,18 @@
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip and make sure
CWSDPMI.EXE is in the current directory.
+Processor architecture dependent features:
+
+ On non-x86 architectures you have to disable a few programmers because they
+ use port-based I/O which is not directly available on non-x86. Please add
+ CONFIG_RAYER_SPI=no CONFIG_NIC3COM=no CONFIG_ATAHPT=no CONFIG_NICREALTEK=no \
+ CONFIG_NICNATSEMI=no
+ as parameters to the "make" invocation.
+ Besides that, the internal programmer is only supported on x86 and MIPS. On
+ other architectures, please add
+ CONFIG_INTERNAL=no
+ as parameter to the "make" invocation.
+
Installation
------------
--
http://www.hailfinger.org/
A lot of messages sent to flashrom(a)flashrom.org just have »flashrom -V« as the subject rendering it in my opinion unusable.
Adding the board/device name to the subject would help a lot when skimming over the messages by the subject line or searching the messages just using the subject line.
• I did not add that note to outputs saying to report a bug to the mailing list.
• I do not know if the subject line can be created automatically in those message, so users just have to copy and paste them.
• I am not a native speaker, so I do not know if using plain »subject« instead of »subject line« would be enough and if the propositions I used are correct.
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
board_enable.c | 7 +++++--
chipset_enable.c | 7 +++++--
flashrom.c | 5 +++--
pcidev.c | 3 ++-
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/board_enable.c b/board_enable.c
index ae0fbfa..52052d3 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -430,7 +430,9 @@ int it8705f_write_enable(uint8_t port)
max_rom_decode.parallel = 1024 * 1024;
msg_pinfo("IT8705F with very unusual settings. Please "
"send the output of \"flashrom -V\" to \n"
- "flashrom(a)flashrom.org to help us finish "
+ "flashrom(a)flashrom.org with \n\n"
+ "IT8705: your board name: flashrom -V \n\n"
+ "as the subject to help us finish "
"support for your Super I/O. Thanks.\n");
ret = 1;
} else if (tmp & 0x08) {
@@ -1964,7 +1966,8 @@ int board_flash_enable(const char *vendor, const char *part)
board = NULL;
} else {
msg_pinfo("NOTE: Running an untested board enable procedure.\n"
- "Please report success/failure to flashrom(a)flashrom.org.\n");
+ "Please report success/failure to flashrom(a)flashrom.org \n"
+ "with your board name and SUCCESS or FAILURE in the subject.\n");
}
}
diff --git a/chipset_enable.c b/chipset_enable.c
index f191061..4549e52 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -923,7 +923,9 @@ static int enable_flash_mcp6x_7x(struct pci_dev *dev, const char *name)
}
out_msg:
msg_pinfo("Please send the output of \"flashrom -V\" to "
- "flashrom(a)flashrom.org to help us finish support for your "
+ "flashrom(a)flashrom.org with \n\n"
+ "your board name: flashrom -V \n\n"
+ "as the subject to help us finish support for your "
"chipset. Thanks.\n");
return ret;
@@ -1178,7 +1180,8 @@ int chipset_flash_enable(void)
if (ret != -2) {
msg_pinfo("WARNING: unexpected second chipset match: "
"\"%s %s\"\nignoring, please report lspci and "
- "board URL to flashrom(a)flashrom.org!\n",
+ "board URL to flashrom(a)flashrom.org "
+ "with your board name in the subject line!\n",
chipset_enables[i].vendor_name,
chipset_enables[i].device_name);
continue;
diff --git a/flashrom.c b/flashrom.c
index 45d086d..9dd1c48 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1290,7 +1290,7 @@ void emergency_help_message(void)
{
msg_gerr("Your flash chip is in an unknown state.\n"
"Get help on IRC at irc.freenode.net (channel #flashrom) or\n"
- "mail flashrom(a)flashrom.org!\n"
+ "mail flashrom(a)flashrom.org with your board name in the subject line!\n"
"-------------------------------------------------------------"
"------------------\n"
"DO NOT REBOOT OR POWEROFF!\n");
@@ -1430,7 +1430,8 @@ void check_chip_supported(struct flashchip *flash)
"output with the additional -V option for all "
"operations you tested (-V, -Vr,\n"
"-Vw, -VE), and mention which mainboard or "
- "programmer you tested.\n"
+ "programmer you tested. Please mention your board in "
+ "the subject line.\n"
"Thanks for your help!\n"
"===\n");
}
diff --git a/pcidev.c b/pcidev.c
index f7048e7..decf4e7 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -69,7 +69,8 @@ uint32_t pcidev_validate(struct pci_dev *dev, uint32_t bar,
msg_pinfo("===\nThis PCI device is UNTESTED. Please "
"report the 'flashrom -p xxxx' output \n"
"to flashrom(a)flashrom.org if it works "
- "for you. Thank you for your help!\n===\n");
+ "for you. Please add the name of your PCI device "
+ "to the subject. Thank you for your help!\n===\n");
}
return addr;
--
1.7.1
Author: hailfinger
Date: Fri Oct 8 13:03:02 2010
New Revision: 1202
URL: http://flashrom.org/trac/flashrom/changeset/1202
Log:
A lot of messages sent to flashrom(a)flashrom.org just have "flashrom -V"
as the subject.
Ask people to include more information in the subject line to make life
easier for developers/supporters.
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Modified:
trunk/board_enable.c
trunk/chipset_enable.c
trunk/flashrom.c
trunk/pcidev.c
Modified: trunk/board_enable.c
==============================================================================
--- trunk/board_enable.c Fri Oct 8 02:37:55 2010 (r1201)
+++ trunk/board_enable.c Fri Oct 8 13:03:02 2010 (r1202)
@@ -433,7 +433,9 @@
max_rom_decode.parallel = 1024 * 1024;
msg_pinfo("IT8705F with very unusual settings. Please "
"send the output of \"flashrom -V\" to \n"
- "flashrom(a)flashrom.org to help us finish "
+ "flashrom(a)flashrom.org with "
+ "IT8705: your board name: flashrom -V\n"
+ "as the subject to help us finish "
"support for your Super I/O. Thanks.\n");
ret = 1;
} else if (tmp & 0x08) {
@@ -2097,7 +2099,8 @@
board = NULL;
} else {
msg_pinfo("NOTE: Running an untested board enable procedure.\n"
- "Please report success/failure to flashrom(a)flashrom.org.\n");
+ "Please report success/failure to flashrom(a)flashrom.org\n"
+ "with your board name and SUCCESS or FAILURE in the subject.\n");
}
}
Modified: trunk/chipset_enable.c
==============================================================================
--- trunk/chipset_enable.c Fri Oct 8 02:37:55 2010 (r1201)
+++ trunk/chipset_enable.c Fri Oct 8 13:03:02 2010 (r1202)
@@ -939,7 +939,9 @@
}
out_msg:
msg_pinfo("Please send the output of \"flashrom -V\" to "
- "flashrom(a)flashrom.org to help us finish support for your "
+ "flashrom(a)flashrom.org with\n"
+ "your board name: flashrom -V as the subject to help us "
+ "finish support for your\n"
"chipset. Thanks.\n");
return ret;
@@ -1195,8 +1197,11 @@
continue;
if (ret != -2) {
msg_pinfo("WARNING: unexpected second chipset match: "
- "\"%s %s\"\nignoring, please report lspci and "
- "board URL to flashrom(a)flashrom.org!\n",
+ "\"%s %s\"\n"
+ "ignoring, please report lspci and board URL "
+ "to flashrom(a)flashrom.org\n"
+ "with 2CHIPSET: your board name in the "
+ "subject line.\n",
chipset_enables[i].vendor_name,
chipset_enables[i].device_name);
continue;
Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c Fri Oct 8 02:37:55 2010 (r1201)
+++ trunk/flashrom.c Fri Oct 8 13:03:02 2010 (r1202)
@@ -1314,7 +1314,8 @@
{
msg_gerr("Your flash chip is in an unknown state.\n"
"Get help on IRC at irc.freenode.net (channel #flashrom) or\n"
- "mail flashrom(a)flashrom.org!\n"
+ "mail flashrom(a)flashrom.org with FAILED: your board name in "
+ "the subject line!\n"
"-------------------------------------------------------------"
"------------------\n"
"DO NOT REBOOT OR POWEROFF!\n");
@@ -1496,8 +1497,8 @@
"operations you tested (-V, -Vr,\n"
"-Vw, -VE), and mention which mainboard or "
"programmer you tested.\n"
- "Thanks for your help!\n"
- "===\n");
+ "Please mention your board in the subject line. "
+ "Thanks for your help!\n");
}
}
Modified: trunk/pcidev.c
==============================================================================
--- trunk/pcidev.c Fri Oct 8 02:37:55 2010 (r1201)
+++ trunk/pcidev.c Fri Oct 8 13:03:02 2010 (r1202)
@@ -66,9 +66,11 @@
if (devs[i].status == NT) {
msg_pinfo("===\nThis PCI device is UNTESTED. Please "
- "report the 'flashrom -p xxxx' output \n"
- "to flashrom(a)flashrom.org if it works "
- "for you. Thank you for your help!\n===\n");
+ "report the 'flashrom -p xxxx' output \n"
+ "to flashrom(a)flashrom.org if it works "
+ "for you. Please add the name of your\n"
+ "PCI device to the subject. Thank you for "
+ "your help!\n===\n");
}
return addr;
Bugfix, 0.9.3 candidate.
SPI write status register (WRSR) may take longer than 100 ms, and it
makes sense to poll for completion in 10 ms steps.
This patch complements r1115.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Index: flashrom-wrsr_delay/spi25.c
===================================================================
--- flashrom-wrsr_delay/spi25.c (Revision 1184)
+++ flashrom-wrsr_delay/spi25.c (Arbeitskopie)
@@ -880,8 +880,14 @@
msg_cerr("%s failed during command execution\n",
__func__);
}
- /* WRSR performs a self-timed erase before the changes take effect. */
+ /* WRSR performs a self-timed erase before the changes take effect.
+ * This may take 50-85 ms in most cases, and some chips apparently
+ * allow running RDSR only once. Pick an initial delay of 100 ms,
+ * then wait in 10 ms steps.
+ */
programmer_delay(100 * 1000);
+ while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
+ programmer_delay(10 * 1000);
return result;
}
@@ -912,8 +918,14 @@
msg_cerr("%s failed during command execution\n",
__func__);
}
- /* WRSR performs a self-timed erase before the changes take effect. */
+ /* WRSR performs a self-timed erase before the changes take effect.
+ * This may take 50-85 ms in most cases, and some chips apparently
+ * allow running RDSR only once. Pick an initial delay of 100 ms,
+ * then wait in 10 ms steps.
+ */
programmer_delay(100 * 1000);
+ while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
+ programmer_delay(10 * 1000);
return result;
}
--
http://www.hailfinger.org/
Update the man page to have correct info for the upcoming release.
If you know of any features which are not mentioned in the man page,
please tell me.
If you know any major contributors who were forgotten, please tell me.
If you find any bugs, please tell me.
Should we mention all contributors with more than one patch? Should we
restrict the author list to those who have substantial amounts of code
in flashrom? Do we have to ask people if adding their email address to
the manpage is OK?
Should we mention the flashrom mailing list e-mail address in the man
page and kill all other email addresses?
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Index: flashrom-manpage/flashrom.8
===================================================================
--- flashrom-manpage/flashrom.8 (Revision 1194)
+++ flashrom-manpage/flashrom.8 (Arbeitskopie)
@@ -97,7 +97,7 @@
.sp
* Force chip read and pretend the chip is there.
.sp
-* Force chip access even if the chip is bigger than the maximum supported\
+* Force chip access even if the chip is bigger than the maximum supported \
size for the flash bus.
.sp
* Force erase even if erase is known bad.
@@ -169,6 +169,9 @@
.sp
.BR "* nicsmc1211" " (for flash ROMs on RTL8139-compatible SMC2 network cards)"
.sp
+.BR "* nicnatsemi" " (for flash ROMs on National Semiconductor DP838* network \
+cards)"
+.sp
.BR "* gfxnvidia" " (for flash ROMs on NVIDIA graphics cards)"
.sp
.BR "* drkaiser" " (for flash ROMs on Dr. Kaiser PC-Waechter PCI cards)"
@@ -187,6 +190,8 @@
.sp
.BR "* buspirate_spi" " (for SPI flash ROMs attached to a Bus Pirate)"
.sp
+.BR "* dediprog" " (for SPI flash ROMs attached to a Dediprog SF100)"
+.sp
.BR "* rayer_spi" " (for SPI flash ROMs attached to a RayeR parport \
based programmer)"
.sp
@@ -313,8 +318,8 @@
Example:
.B "flashrom \-p dummy:bus=lpc+fwh"
.TP
-.BR "nic3com" , " nicrealtek" , " nicsmc1211" , " gfxnvidia" , " satasii \
-" and " atahpt " programmers
+.BR "nic3com" , " nicrealtek" , " nicsmc1211" , " nicnatsemi" , " gfxnvidia\
+" , " satasii " and " atahpt " programmers
These programmers have an option to specify the PCI address of the card
your want to use, which must be specified if more than one card supported
by the selected programmer is installed in your system. The syntax is
@@ -396,6 +401,9 @@
.BR 30k ", " 125k ", " 250k ", " 1M ", " 2M ", " 2.6M ", " 4M ", " 8M
(in Hz). The default is the maximum frequency of 8 MHz.
.TP
+.BR "dediprog " programmer
+No parameters defined yet.
+.TP
.BR "rayer_spi " programmer
The default I/O base address used for the parallel port is 0x378 and you can use
the optional
@@ -484,28 +492,48 @@
.br
Please see the individual files.
.SH AUTHORS
+Andrew Morgan <ziltro(a)ziltro.com>
+.br
Carl-Daniel Hailfinger
.br
Claus Gindhart <claus.gindhart(a)kontron.com>
.br
+David Borg <borg.db(a)gmail.com>
+.br
+David Hendricks <dhendrix(a)google.com>
+.br
Dominik Geyer <dominik.geyer(a)kontron.com>
.br
Eric Biederman
.br
Giampiero Giancipoli <gianci(a)email.it>
.br
+Helge Wagner <helge.wagner(a)ge.com>
+.br
+Idwer Vollering <vidwer+flashrom(a)gmail.com>
+.br
Joe Bao <Zheng.Bao(a)amd.com>
.br
+Jörg Fischer <turboj(a)gmx.de>
+.br
+Joshua Roys <roysjosh(a)gmail.com>
+.br
Luc Verhaegen <libv(a)skynet.be>
.br
Li-Ta Lo
.br
Markus Boas <ryven(a)ryven.de>
.br
+Mattias Mattsson <vitplister(a)gmail.com>
+.br
Michael Karcher <flashrom(a)mkarcher.dialup.fu-berlin.de>
.br
Nikolay Petukhov <nikolay.petukhov(a)gmail.com>
.br
+Patrick Georgi <patrick.georgi(a)coresystems.de>
+.br
+Peter Lemenkov <lemenkov(a)gmail.com>
+.br
Peter Stuge <peter(a)stuge.se>
.br
Reinder E.N. de Haan <lb_reha(a)mveas.com>
@@ -520,6 +548,8 @@
.br
Stefan Wildemann <stefan.wildemann(a)kontron.com>
.br
+Stephan Guilloux <stephan.guilloux(a)free.fr>
+.br
Steven James <pyro(a)linuxlabs.com>
.br
Uwe Hermann <uwe(a)hermann-uwe.de>
--
http://www.hailfinger.org/
Author: hailfinger
Date: Fri Oct 8 02:37:55 2010
New Revision: 1201
URL: http://flashrom.org/trac/flashrom/changeset/1201
Log:
SPI write status register (WRSR) may take longer than 100 ms, and it
makes sense to poll for completion in 10 ms steps until 5 s are over.
This patch complements r1115.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Acked-by: Joshua Roys <roysjosh(a)gmail.com>
Modified:
trunk/flash.h
trunk/spi25.c
Modified: trunk/flash.h
==============================================================================
--- trunk/flash.h Fri Oct 8 00:21:45 2010 (r1200)
+++ trunk/flash.h Fri Oct 8 02:37:55 2010 (r1201)
@@ -35,6 +35,9 @@
#define ERROR_PTR ((void*)-1)
+/* Error codes */
+#define TIMEOUT_ERROR -101
+
typedef unsigned long chipaddr;
int register_shutdown(void (*function) (void *data), void *data);
Modified: trunk/spi25.c
==============================================================================
--- trunk/spi25.c Fri Oct 8 00:21:45 2010 (r1200)
+++ trunk/spi25.c Fri Oct 8 02:37:55 2010 (r1201)
@@ -856,6 +856,7 @@
static int spi_write_status_register_ewsr(struct flashchip *flash, int status)
{
int result;
+ int i = 0;
struct spi_command cmds[] = {
{
/* WRSR requires either EWSR or WREN depending on chip type. */
@@ -879,15 +880,31 @@
if (result) {
msg_cerr("%s failed during command execution\n",
__func__);
+ /* No point in waiting for the command to complete if execution
+ * failed.
+ */
+ return result;
}
- /* WRSR performs a self-timed erase before the changes take effect. */
+ /* WRSR performs a self-timed erase before the changes take effect.
+ * This may take 50-85 ms in most cases, and some chips apparently
+ * allow running RDSR only once. Therefore pick an initial delay of
+ * 100 ms, then wait in 10 ms steps until a total of 5 s have elapsed.
+ */
programmer_delay(100 * 1000);
- return result;
+ while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP) {
+ if (++i > 490) {
+ msg_cerr("Error: WIP bit after WRSR never cleared\n");
+ return TIMEOUT_ERROR;
+ }
+ programmer_delay(10 * 1000);
+ }
+ return 0;
}
static int spi_write_status_register_wren(struct flashchip *flash, int status)
{
int result;
+ int i = 0;
struct spi_command cmds[] = {
{
/* WRSR requires either EWSR or WREN depending on chip type. */
@@ -911,10 +928,25 @@
if (result) {
msg_cerr("%s failed during command execution\n",
__func__);
+ /* No point in waiting for the command to complete if execution
+ * failed.
+ */
+ return result;
}
- /* WRSR performs a self-timed erase before the changes take effect. */
+ /* WRSR performs a self-timed erase before the changes take effect.
+ * This may take 50-85 ms in most cases, and some chips apparently
+ * allow running RDSR only once. Therefore pick an initial delay of
+ * 100 ms, then wait in 10 ms steps until a total of 5 s have elapsed.
+ */
programmer_delay(100 * 1000);
- return result;
+ while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP) {
+ if (++i > 490) {
+ msg_cerr("Error: WIP bit after WRSR never cleared\n");
+ return TIMEOUT_ERROR;
+ }
+ programmer_delay(10 * 1000);
+ }
+ return 0;
}
static int spi_write_status_register(struct flashchip *flash, int status)