summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2021-04-15 22:12:54 +0300
committerRichard Weinberger <richard@nod.at>2021-04-15 22:12:54 +0300
commit203ba0f64eefd0b751c1f34189f4fb1b21182b94 (patch)
treec4b189c9e904b9a6835bd98cc89309631c715277 /drivers/mtd
parent28f0be44b263ca4b59ea63c801db3830e65fbe99 (diff)
parentf3907773d60229afa8e6c0a3ee5085715192a9cb (diff)
downloadlinux-203ba0f64eefd0b751c1f34189f4fb1b21182b94.tar.xz
Merge tag 'cfi/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next
CFI changes Just a couple of fixes for v5.13-rc1 * Disable broken buffered writes for CFI chips within ID 0x2201 * Address a Coverity report for unused value
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 6f6b0265c22d..c5c9a4c3b027 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -272,6 +272,10 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
{
struct map_info *map = mtd->priv;
struct cfi_private *cfi = map->fldrv_priv;
+
+ if (cfi->mfr == CFI_MFR_AMD && cfi->id == 0x2201)
+ return;
+
if (cfi->cfiq->BufWriteTimeoutTyp) {
pr_debug("Using buffer write method\n");
mtd->_write = cfi_amdstd_write_buffers;
@@ -1650,7 +1654,7 @@ static int __xipram do_write_oneword_once(struct map_info *map,
unsigned long adr, map_word datum,
int mode, struct cfi_private *cfi)
{
- unsigned long timeo = jiffies + HZ;
+ unsigned long timeo;
/*
* We use a 1ms + 1 jiffies generic timeout for writes (most devices
* have a max write time of a few hundreds usec). However, we should