diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2011-02-26 12:16:43 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2011-02-26 12:16:43 (GMT) |
commit | edb45850f53478c7779484105c30f8df0a3a3782 (patch) | |
tree | 26e758b463e03475be4d214aeb17c6517b01a83e /linux-2.4.x/drivers/mtd/chips/jedec_probe.c | |
parent | ba6dc76a789f33fc999bbd24fe8af5b856f90085 (diff) | |
download | openipcam-edb45850f53478c7779484105c30f8df0a3a3782.zip openipcam-edb45850f53478c7779484105c30f8df0a3a3782.tar.gz openipcam-edb45850f53478c7779484105c30f8df0a3a3782.tar.bz2 |
2.4.20-uc0 uClinux patch added
Diffstat (limited to 'linux-2.4.x/drivers/mtd/chips/jedec_probe.c')
-rw-r--r-- | linux-2.4.x/drivers/mtd/chips/jedec_probe.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/linux-2.4.x/drivers/mtd/chips/jedec_probe.c b/linux-2.4.x/drivers/mtd/chips/jedec_probe.c index 64fac44..5058acf 100644 --- a/linux-2.4.x/drivers/mtd/chips/jedec_probe.c +++ b/linux-2.4.x/drivers/mtd/chips/jedec_probe.c @@ -42,6 +42,7 @@ /* Fujitsu */ #define MBM29LV160TE 0x22C4 #define MBM29LV160BE 0x2249 +#define MBM29LV800BA 0x225B /* ST - www.st.com */ #define M29W800T 0x00D7 @@ -248,6 +249,17 @@ static const struct amd_flash_info jedec_table[] = { ERASEINFO(0x08000,2), ERASEINFO(0x02000,8) } + }, { + mfr_id: MANUFACTURER_FUJITSU, + dev_id: MBM29LV800BA, + name: "Fujitsu MBM29LV800BA", + DevSize: SIZE_1MiB, + NumEraseRegions: 4, + regions: {ERASEINFO(0x04000,1), + ERASEINFO(0x02000,2), + ERASEINFO(0x08000,1), + ERASEINFO(0x10000,15), + } } }; @@ -293,6 +305,14 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, int i; int osf = cfi->interleave * cfi->device_type; int retried = 0; + int busmask; + + switch(map->buswidth) { + case 1: busmask = 0xff; break; + case 2: busmask = 0xffff; break; + case 4: busmask = 0xffffffff; break; + default: printk("Unknown buswidth in jedec_probe_chip\n"); return(0); + } if (!cfi->numchips) { switch (cfi->device_type) { @@ -336,8 +356,8 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, cfi->id = jedec_read_id(map, base, osf); for (i=0; i<sizeof(jedec_table)/sizeof(jedec_table[0]); i++) { - if (cfi->mfr == jedec_table[i].mfr_id && - cfi->id == jedec_table[i].dev_id) + if (cfi->mfr == (jedec_table[i].mfr_id&busmask) && + cfi->id == (jedec_table[i].dev_id&busmask)) return cfi_jedec_setup(cfi, i); } if (!retried++) { |