Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: wpce775x.c

Issue 6897014: Do not call EC programmer shutdown functions explicitly. (Closed) Base URL: svn://coreboot.org/flashrom/trunk
Patch Set: call shutdown function for internal programmer explicitly Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« mec1308.c ('K') | « programmer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: wpce775x.c
diff --git a/wpce775x.c b/wpce775x.c
index f394e64b6fb8d132bd9468233a905c2fc648850f..7bdae6236d83d4eed03ce8b8bfdd6f3851138178 100644
--- a/wpce775x.c
+++ b/wpce775x.c
@@ -52,6 +52,8 @@
#include "spi.h"
#include "writeprotect.h"
+void wpce775x_shutdown(void *);
Stefan Reinauer 2011/04/27 20:34:05 delete this.
dhendrix 2011/04/27 21:15:05 Done.
+
/**
* Definition of WPCE775X WCB (Write Command Buffer), as known as Shared Access
* Window 2.
@@ -592,6 +594,9 @@ int wpce775x_spi_common_init(void)
/* TODO: set fwh_idsel of chipset.
Currently, we employ "-p internal:fwh_idsel=0x0000223e". */
+ if (register_shutdown(wpce775x_shutdown, NULL))
+ return 1;
+
/* Enter flash update mode unconditionally. This is required even
for reading. */
if (EnterFlashUpdate()) return 1;
@@ -599,13 +604,12 @@ int wpce775x_spi_common_init(void)
spi_controller = SPI_CONTROLLER_WPCE775X;
msg_pdbg("%s(): successfully initialized wpce775x\n", __func__);
return 0;
-
}
-int wpce775x_shutdown(void)
+void wpce775x_shutdown(void *data)
Stefan Reinauer 2011/04/27 20:34:05 static and move before register
dhendrix 2011/04/27 21:15:05 Done.
{
if (spi_controller != SPI_CONTROLLER_WPCE775X)
- return 0;
+ return;
msg_pdbg("%s(): firmware %s\n", __func__,
firmware_changed ? "changed" : "not changed");
@@ -624,8 +628,6 @@ int wpce775x_shutdown(void)
free(initflash_cfg);
else
msg_perr("%s(): No initflash_cfg to free?!?\n", __func__);
-
- return 0;
}
/* Called by internal_init() */
« mec1308.c ('K') | « programmer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698