diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2006-03-16 16:46:19 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2006-03-16 16:46:19 +0000 |
commit | 99349a52d6a33b0e25892fccd13cdaa3a32908fd (patch) | |
tree | d7a061dbbc1419d79d89e022d2e427ec84900586 | |
parent | d918daa85827b2446c3f98c61632add86b40f3df (diff) | |
download | flashrom-99349a52d6a33b0e25892fccd13cdaa3a32908fd.tar.gz flashrom-99349a52d6a33b0e25892fccd13cdaa3a32908fd.tar.bz2 flashrom-99349a52d6a33b0e25892fccd13cdaa3a32908fd.zip |
Make am29f040b driver more solid by printing every 4096th flash address
This fixes the timing when flashing over a serial console.
Corresponding to flashrom svn r46 and coreboot v2 svn r2204.
-rw-r--r-- | am29f040b.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/am29f040b.c b/am29f040b.c index f67127d4..7b82331a 100644 --- a/am29f040b.c +++ b/am29f040b.c @@ -54,8 +54,9 @@ static __inline__ int write_sector_29f040b(volatile uint8_t *bios, int i; for (i = 0; i < page_size; i++) { - printf("0x%08lx", - (unsigned long) dst - (unsigned long) bios); + if( (i & 0xfff) == 0xfff ) + printf("0x%08lx", (unsigned long) dst - + (unsigned long) bios); *(bios + 0x555) = 0xAA; *(bios + 0x2AA) = 0x55; @@ -65,7 +66,8 @@ static __inline__ int write_sector_29f040b(volatile uint8_t *bios, /* wait for Toggle bit ready */ toggle_ready_jedec(bios); - printf("\b\b\b\b\b\b\b\b\b\b"); + if( (i & 0xfff) == 0xfff ) + printf("\b\b\b\b\b\b\b\b\b\b"); } return (0); @@ -118,7 +120,7 @@ int write_29f040b(struct flashchip *flash, uint8_t *buf) flash->page_size; volatile uint8_t *bios = flash->virt_addr; - printf("Programming Page: "); + printf("Programming page "); for (i = 0; i < total_size / page_size; i++) { /* erase the page before programming */ erase_sector_29f040b(bios, i * page_size); |