summaryrefslogtreecommitdiffstats
path: root/82802ab.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2003-09-12 22:41:53 +0000
committerRonald G. Minnich <rminnich@gmail.com>2003-09-12 22:41:53 +0000
commiteaab50bb32edfe419eb472eacfdc82cbc3ecae8c (patch)
tree4ddad443cb40d4f090ba476bb48ddd47b98790a6 /82802ab.c
parentceec420c3db6c20c4b882e8bf3ad113db7fcd2de (diff)
downloadast2050-flashrom-eaab50bb32edfe419eb472eacfdc82cbc3ecae8c.zip
ast2050-flashrom-eaab50bb32edfe419eb472eacfdc82cbc3ecae8c.tar.gz
Changes from NIKI
Corresponding to coreboot v1 svn r873.
Diffstat (limited to '82802ab.c')
-rw-r--r--82802ab.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/82802ab.c b/82802ab.c
index b41efcc..c818e92 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -30,6 +30,7 @@
#include <sys/io.h>
#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
#include "flash.h"
#include "82802ab.h"
@@ -145,11 +146,11 @@ int erase_82802ab_block(struct flashchip *flash, int offset)
status = wait_82802ab(flash->virt_addr);
//print_82802ab_status(status);
printf("DONE BLOCK 0x%x\n", offset);
+ return(0);
}
int erase_82802ab (struct flashchip * flash)
{
int i;
- volatile unsigned char * bios = flash->virt_addr;
unsigned int total_size = flash->total_size * 1024;
printf("total_size is %d; flash->page_size is %d\n",
@@ -157,6 +158,7 @@ int erase_82802ab (struct flashchip * flash)
for(i = 0; i < total_size; i += flash->page_size)
erase_82802ab_block(flash, i);
printf("DONE ERASE\n");
+ return(0);
}
void write_page_82802ab (volatile char * bios, char * src, volatile char * dst,
@@ -173,7 +175,7 @@ void write_page_82802ab (volatile char * bios, char * src, volatile char * dst,
}
-int write_82802ab (struct flashchip * flash, char * buf)
+int write_82802ab (struct flashchip * flash, unsigned char * buf)
{
int i;
int total_size = flash->total_size *1024, page_size = flash->page_size;
@@ -193,4 +195,5 @@ int write_82802ab (struct flashchip * flash, char * buf)
}
printf("\n");
protect_82802ab (bios);
+ return(0);
}
OpenPOWER on IntegriCloud