diff options
Diffstat (limited to 'drivers/mtd/chips/cfi_probe.c')
-rw-r--r-- | drivers/mtd/chips/cfi_probe.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c index f651b6ef1c5d..a4463a91ce31 100644 --- a/drivers/mtd/chips/cfi_probe.c +++ b/drivers/mtd/chips/cfi_probe.c | |||
@@ -39,7 +39,7 @@ struct mtd_info *cfi_probe(struct map_info *map); | |||
39 | #define xip_allowed(base, map) \ | 39 | #define xip_allowed(base, map) \ |
40 | do { \ | 40 | do { \ |
41 | (void) map_read(map, base); \ | 41 | (void) map_read(map, base); \ |
42 | asm volatile (".rep 8; nop; .endr"); \ | 42 | xip_iprefetch(); \ |
43 | local_irq_enable(); \ | 43 | local_irq_enable(); \ |
44 | } while (0) | 44 | } while (0) |
45 | 45 | ||
@@ -232,6 +232,11 @@ static int __xipram cfi_chip_setup(struct map_info *map, | |||
232 | cfi->mfr = cfi_read_query16(map, base); | 232 | cfi->mfr = cfi_read_query16(map, base); |
233 | cfi->id = cfi_read_query16(map, base + ofs_factor); | 233 | cfi->id = cfi_read_query16(map, base + ofs_factor); |
234 | 234 | ||
235 | /* Get AMD/Spansion extended JEDEC ID */ | ||
236 | if (cfi->mfr == CFI_MFR_AMD && (cfi->id & 0xff) == 0x7e) | ||
237 | cfi->id = cfi_read_query(map, base + 0xe * ofs_factor) << 8 | | ||
238 | cfi_read_query(map, base + 0xf * ofs_factor); | ||
239 | |||
235 | /* Put it back into Read Mode */ | 240 | /* Put it back into Read Mode */ |
236 | cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); | 241 | cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); |
237 | /* ... even if it's an Intel chip */ | 242 | /* ... even if it's an Intel chip */ |