summaryrefslogtreecommitdiffstats
path: root/pm49fl004.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai.lu@amd.com>2004-10-20 05:07:16 +0000
committerYinghai Lu <yinghai.lu@amd.com>2004-10-20 05:07:16 +0000
commitad8ffd2e7646b8d5a5c08cab9252f69f1156a6fe (patch)
tree2a0aebcb02121bb88c07d6ba4f0ff07e77de54d4 /pm49fl004.c
parent1f4d653d8cb34ad17de722eef45bc9db9bbb1aa3 (diff)
downloadast2050-flashrom-ad8ffd2e7646b8d5a5c08cab9252f69f1156a6fe.zip
ast2050-flashrom-ad8ffd2e7646b8d5a5c08cab9252f69f1156a6fe.tar.gz
Tyan update to work with new CPU Config
Corresponding to flashrom svn r26 and coreboot v2 svn r1693.
Diffstat (limited to 'pm49fl004.c')
-rw-r--r--pm49fl004.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pm49fl004.c b/pm49fl004.c
index cbb1f7e..a3f42fa 100644
--- a/pm49fl004.c
+++ b/pm49fl004.c
@@ -3,6 +3,7 @@
*
*
* Copyright 2004 Tyan Corporation
+ * yhlu yhlu@tyan.com add exclude range
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,15 +56,21 @@ static __inline__ int erase_block_49fl004(volatile unsigned char *bios,
return (0);
}
+
+extern int exclude_start_page, exclude_end_page;
+
int write_49fl004(struct flashchip *flash, unsigned char *buf)
{
int i;
int total_size = flash->total_size * 1024, page_size =
flash->page_size;
volatile char *bios = flash->virt_addr;
-
+
printf("Programming Page: ");
for (i = 0; i < total_size / page_size; i++) {
+ if( (i>=exclude_start_page) && (i<exclude_end_page))
+ continue;
+
/* erase the page before programming */
erase_block_49fl004(bios, i * page_size);
OpenPOWER on IntegriCloud