diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2004-09-30 16:37:01 +0000 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2004-09-30 16:37:01 +0000 |
commit | 1f4d653d8cb34ad17de722eef45bc9db9bbb1aa3 (patch) | |
tree | 41b598f0e40964f48d3a66944954b452d37496da /jedec.c | |
parent | 9ffaf0b42308d26cfc7bf2711ea1c662c3093e0d (diff) | |
download | flashrom-1f4d653d8cb34ad17de722eef45bc9db9bbb1aa3.tar.gz flashrom-1f4d653d8cb34ad17de722eef45bc9db9bbb1aa3.tar.bz2 flashrom-1f4d653d8cb34ad17de722eef45bc9db9bbb1aa3.zip |
Support for sst firmware hub
Corresponding to flashrom svn r25 and coreboot v2 svn r1651.
Diffstat (limited to 'jedec.c')
-rw-r--r-- | jedec.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -89,6 +89,35 @@ int erase_sector_jedec(volatile unsigned char *bios, unsigned int page) return (0); } +int erase_block_jedec(volatile unsigned char *bios, unsigned int block) +{ + volatile unsigned char *Temp; + + /* Issue the Sector Erase command */ + Temp = bios + 0x5555; /* set up address to be BASE:5555h */ + *Temp = 0xAA; /* write data 0xAA to the address */ + myusec_delay(10); + Temp = bios + 0x2AAA; /* set up address to be BASE:2AAAh */ + *Temp = 0x55; /* write data 0x55 to the address */ + myusec_delay(10); + Temp = bios + 0x5555; /* set up address to be BASE:5555h */ + *Temp = 0x80; /* write data 0x80 to the address */ + myusec_delay(10); + Temp = bios + 0x5555; /* set up address to be BASE:5555h */ + *Temp = 0xAA; /* write data 0xAA to the address */ + myusec_delay(10); + Temp = bios + 0x2AAA; /* set up address to be BASE:2AAAh */ + *Temp = 0x55; /* write data 0x55 to the address */ + myusec_delay(10); + Temp = bios + block; /* set up address to be the current sector */ + *Temp = 0x50; /* write data 0x30 to the address */ + myusec_delay(10); + + /* wait for Toggle bit ready */ + toggle_ready_jedec(bios); + + return (0); +} int erase_chip_jedec(struct flashchip *flash) { |