@@ -867,10 +867,20 @@ static int __xipram chip_good(struct map_info *map, struct flchip *chip,
return chip_check(map, chip, addr, &expected);
}
+static bool __xipram cfi_use_chip_ready_for_write(struct map_info *map)
+{
+ struct cfi_private *cfi = map->fldrv_priv;
+
+ return cfi->mfr == CFI_MFR_AMD && cfi->id == S29GL064N_MN12;
+}
+
static int __xipram chip_good_for_write(struct map_info *map,
struct flchip *chip, unsigned long addr,
map_word expected)
{
+ if (cfi_use_chip_ready_for_write(map))
+ return chip_ready(map, chip, addr);
+
return chip_good(map, chip, addr, expected);
}