summaryrefslogtreecommitdiffstats
path: root/flash_rom.c
diff options
context:
space:
mode:
authorDavid Hendricks <david.hendricks@gmail.com>2004-03-17 21:47:30 +0000
committerDavid Hendricks <david.hendricks@gmail.com>2004-03-17 21:47:30 +0000
commit3770a1132ee0e43836eb907229277506af05ebc8 (patch)
tree3cf282f6e3ef7a8758305844aeb3ed1ca29c29f7 /flash_rom.c
parent8ff8432ce6bfa12bd672da28dde19054dc12640a (diff)
downloadast2050-flashrom-3770a1132ee0e43836eb907229277506af05ebc8.zip
ast2050-flashrom-3770a1132ee0e43836eb907229277506af05ebc8.tar.gz
Add support for SST49LF040
Corresponding to flashrom svn r5 and coreboot v2 svn r1422.
Diffstat (limited to 'flash_rom.c')
-rw-r--r--flash_rom.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/flash_rom.c b/flash_rom.c
index b063b3c..b476d35 100644
--- a/flash_rom.c
+++ b/flash_rom.c
@@ -46,6 +46,7 @@
#include "sst28sf040.h"
#include "w49f002u.h"
#include "sst39sf020.h"
+#include "sst49lf040.h"
#include "pm49fl004.h"
#include "mx29f002.h"
@@ -65,6 +66,9 @@ struct flashchip flashchips[] = {
probe_39sf020, erase_39sf020, write_39sf020, NULL},
{"SST39VF020", SST_ID, SST_39VF020, NULL, 256, 4096,
probe_39sf020, erase_39sf020, write_39sf020, NULL},
+ {"SST49LF040", SST_ID, SST_49LF040, NULL, 512, 4096,
+ probe_49lf040, erase_49lf040, write_49lf040, NULL},
+
#endif
//By LYH begin
{"Pm49FL004", PMC_ID, PMC_49FL004, NULL, 512, 64*1024,
@@ -373,7 +377,8 @@ struct flashchip * probe_flash(struct flashchip * flash)
flash->total_size * 1024, (unsigned long)size);
}
bios = mmap (0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
- fd_mem, (off_t) (0-size));
+ //fd_mem, (off_t) (0x100000000-size));
+ fd_mem, (off_t) (0x0-size));
if (bios == MAP_FAILED) {
perror("Error MMAP /dev/mem");
exit(1);
OpenPOWER on IntegriCloud