diff -urN linux-2.4.19/drivers/mtd/chips/jedec_probe.c linux.orig/drivers/mtd/chips/jedec_probe.c --- linux-2.4.19/drivers/mtd/chips/jedec_probe.c Mon Sep 30 09:50:46 2002 +++ linux.orig/drivers/mtd/chips/jedec_probe.c Mon Sep 30 10:04:06 2002 @@ -29,6 +29,7 @@ #define MANUFACTURER_ST 0x0020 #define MANUFACTURER_SST 0x00BF #define MANUFACTURER_TOSHIBA 0x0098 +#define MANUFACTURER_SHARP 0x00B0 /* AMD */ @@ -110,6 +111,9 @@ #define TC58FVT641 0x0093 #define TC58FVB641 0x0095 +/* Sharp */ +#define LH28F320BJE_PBTL90 0x00E3 + struct amd_flash_info { const __u16 mfr_id; @@ -796,6 +800,16 @@ NumEraseRegions: 1, regions: {ERASEINFO(0x01000,64), } + }, { + mfr_id: MANUFACTURER_SHARP, + dev_id: LH28F320BJE_PBTL90, + name: "Sharp LH28F320BJE-PBTL90", + DevSize: SIZE_4MiB, + CmdSet: P_ID_INTEL_STD, + NumEraseRegions: 2, + regions: {ERASEINFO(0x02000,8), + ERASEINFO(0x10000,63) + } } }; @@ -840,6 +854,17 @@ * this should be safe. */ cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); + + /* Fixup for sharp LH28F320BJE-PBTL90 */ + /* Found by tryle and error for sum unkown reason if you send then 0xF0 they go + into a bizzare state and they Need this sequence to actualy reset them + (Boris Itkis 9-11-2002) */ + if((cfi->mfr==MANUFACTURER_SHARP)&&(cfi->id==LH28F320BJE_PBTL90)) + { + cfi_read(map, base); + cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); + cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); + } } static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)