diff options
author | Ollie Lho <ollie@sis.com.tw> | 2004-12-07 17:19:04 +0000 |
---|---|---|
committer | Ollie Lho <ollie@sis.com.tw> | 2004-12-07 17:19:04 +0000 |
commit | d11f36180814c45b82142b168c95c6515278a926 (patch) | |
tree | 4ba8e20b6ff46368133403fe87aa91565d9499da | |
parent | 98bea8aba5a1dad1abc2b1d191f873e1d45d5b50 (diff) | |
download | flashrom-d11f36180814c45b82142b168c95c6515278a926.tar.gz flashrom-d11f36180814c45b82142b168c95c6515278a926.tar.bz2 flashrom-d11f36180814c45b82142b168c95c6515278a926.zip |
Enable LPC decoding for 1 MB more addresss, for supporting SST49LF00xA/B
Corresponding to flashrom svn r28 and coreboot v2 svn r1813.
-rw-r--r-- | flash_enable.c | 5 | ||||
-rw-r--r-- | flash_rom.c | 14 | ||||
-rw-r--r-- | sst_fwhub.c | 1 |
3 files changed, 8 insertions, 12 deletions
diff --git a/flash_enable.c b/flash_enable.c index 7bb20c4e..6a784344 100644 --- a/flash_enable.c +++ b/flash_enable.c @@ -224,10 +224,9 @@ static int enable_flash_amd8111(struct pci_dev *dev, char *name) * that it is hard to argue that we should quit at this point. */ - //dump_pci_device(dev); - + /* enable decoding at 0xffb00000 to 0xffffffff */ old = pci_read_byte(dev, 0x43); - new = old | 0x80; + new = old | 0xC0; if (new != old) { pci_write_byte(dev, 0x43, new); if (pci_read_byte(dev, 0x43) != new) { diff --git a/flash_rom.c b/flash_rom.c index ff99cb0b..c01f5314 100644 --- a/flash_rom.c +++ b/flash_rom.c @@ -51,7 +51,6 @@ #include "sst_fwhub.h" struct flashchip flashchips[] = { -#if 1 {"Am29F040B", AMD_ID, AM_29F040B, NULL, 512, 64 * 1024, probe_29f040b, erase_29f040b, write_29f040b, NULL}, {"At29C040A", ATMEL_ID, AT_29C040A, NULL, 512, 256, @@ -70,18 +69,16 @@ struct flashchip flashchips[] = { probe_jedec, erase_chip_jedec, write_49lf040,NULL}, {"SST49LF080A", SST_ID, SST_49LF080A, NULL, 1024, 4096, probe_jedec, erase_chip_jedec, write_49lf040,NULL}, - {"SST49LF002A", SST_ID, SST_49LF002A, NULL, 256, 4096, + {"SST49LF002A/B", SST_ID, SST_49LF002A, NULL, 256, 16 * 1024, probe_sst_fwhub, erase_sst_fwhub, write_sst_fwhub, NULL}, - {"SST49LF003A", SST_ID, SST_49LF003A, NULL, 384, 4096, + {"SST49LF003A/B", SST_ID, SST_49LF003A, NULL, 384, 64 * 1024, probe_sst_fwhub, erase_sst_fwhub, write_sst_fwhub,NULL}, - {"SST49LF004A", SST_ID, SST_49LF004A, NULL, 512, 4096, + {"SST49LF004A/B", SST_ID, SST_49LF004A, NULL, 512, 64 * 1024, probe_sst_fwhub, erase_sst_fwhub, write_sst_fwhub,NULL}, - {"SST49LF008A", SST_ID, SST_49LF008A, NULL, 1024, 4096, + {"SST49LF008A", SST_ID, SST_49LF008A, NULL, 1024, 64 * 1024 , probe_sst_fwhub, erase_sst_fwhub, write_sst_fwhub, NULL}, -#endif {"Pm49FL004", PMC_ID, PMC_49FL004, NULL, 512, 64 * 1024, probe_jedec, erase_chip_jedec, write_49fl004,NULL}, -#if 1 {"W29C011", WINBOND_ID, W_29C011, NULL, 128, 128, probe_jedec, erase_chip_jedec, write_jedec, NULL}, {"W29C020C", WINBOND_ID, W_29C020C, NULL, 256, 128, @@ -98,7 +95,6 @@ struct flashchip flashchips[] = { MSYSTEMS_ID, MSYSTEMS_MD2802, NULL, 8, 8 * 1024, probe_md2802, erase_md2802, write_md2802, read_md2802}, -#endif {NULL,} }; @@ -318,7 +314,7 @@ int main(int argc, char *argv[]) } if (exclude_end_position - exclude_start_position > 0) - memcpy(buf+exclude_start_position, + memcpy(buf+exclude_start_position, (const char *) flash->virt_addr+exclude_start_position, exclude_end_position-exclude_start_position); diff --git a/sst_fwhub.c b/sst_fwhub.c index 909e3941..71f5d338 100644 --- a/sst_fwhub.c +++ b/sst_fwhub.c @@ -80,6 +80,7 @@ int probe_sst_fwhub(struct flashchip *flash) myusec_delay(10); // we need to mmap the write-protect space. + printf("mapping control register at %x\n", 0 - 0x400000 -size); bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED, flash->fd_mem, (off_t) (0 - 0x400000 - size)); if (bios == MAP_FAILED) { |