summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorJason Wang <Qingpei.Wang@amd.com>2008-11-28 21:36:51 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-11-28 21:36:51 +0000
commita3f04be761d45aed2f6113eb2a6d08679370f546 (patch)
treeb1e437eb9e184676bc4ca62472bfb103ca4d2196 /flashrom.c
parent7f30022fb0fb62a484514e50d5b3f15157a5885d (diff)
downloadast2050-flashrom-a3f04be761d45aed2f6113eb2a6d08679370f546.zip
ast2050-flashrom-a3f04be761d45aed2f6113eb2a6d08679370f546.tar.gz
Add support for the AMD/ATI SB600 southbridge SPI functionality
This has been tested by Uwe Hermann on an RS690/SB600 board. Corresponding to flashrom svn r351 and coreboot v2 svn r3779. Signed-off-by: Jason Wang <Qingpei.Wang@amd.com> Reviewed-by: Joe Bao <zheng.bao@amd.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/flashrom.c b/flashrom.c
index 4f1b488..9357d04 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -463,7 +463,7 @@ int main(int argc, char *argv[])
perror(filename);
exit(1);
}
- printf("Force reading flash...");
+ printf("Force reading flash... ");
if (!flashes[0]->read)
memcpy(buf, (const char *)flashes[0]->virtual_memory, size);
else
@@ -476,7 +476,7 @@ int main(int argc, char *argv[])
fwrite(buf, sizeof(char), size, image);
fclose(image);
- printf("done\n");
+ printf("done.\n");
free(buf);
exit(0);
}
@@ -533,19 +533,20 @@ int main(int argc, char *argv[])
buf = (uint8_t *) calloc(size, sizeof(char));
if (erase_it) {
- printf("Erasing flash chip.\n");
+ printf("Erasing flash chip... ");
if (!flash->erase) {
fprintf(stderr, "Error: flashrom has no erase function for this flash chip.\n");
return 1;
}
flash->erase(flash);
+ printf("done.\n");
exit(0);
} else if (read_it) {
if ((image = fopen(filename, "w")) == NULL) {
perror(filename);
exit(1);
}
- printf("Reading Flash...");
+ printf("Reading flash... ");
if (flash->read == NULL)
memcpy(buf, (const char *)flash->virtual_memory, size);
else
@@ -557,7 +558,7 @@ int main(int argc, char *argv[])
fwrite(buf, sizeof(char), size, image);
fclose(image);
- printf("done\n");
+ printf("done.\n");
} else {
struct stat image_stat;
OpenPOWER on IntegriCloud