diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-02-06 10:06:44 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2017-02-06 10:08:39 +0100 |
commit | 2252627b0eff08f46f08c705ed3bf59ac335afae (patch) | |
tree | cfb052adab8bb44d53626a2cf8c598004bd465ac /target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch | |
parent | 75d48d80c7b6012bcc2efbc3d07a7be5aaaafcc6 (diff) | |
download | mtk-20170518-2252627b0eff08f46f08c705ed3bf59ac335afae.zip mtk-20170518-2252627b0eff08f46f08c705ed3bf59ac335afae.tar.gz mtk-20170518-2252627b0eff08f46f08c705ed3bf59ac335afae.tar.bz2 |
bcm53xx: add Linux 4.9 patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch')
-rw-r--r-- | target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch b/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch new file mode 100644 index 0000000..184d7a2 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch @@ -0,0 +1,34 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> +Subject: [PATCH] mtd: spi-nor: detect JEDEC incompatible w25q128 using 0x90 + command +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some w25q128 chipsets don't support RDID (0x9f) command, they reply with +0xff-s only. To suppose such flashes fallback to the 0x90 command. + +Signed-off-by: Rafał Miłecki <zajec5@gmail.com> +--- + +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -875,6 +875,18 @@ static const struct flash_info *spi_nor_ + } + dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %2x, %2x\n", + id[0], id[1], id[2]); ++ ++ tmp = nor->read_reg(nor, 0x90, id, SPI_NOR_MAX_ID_LEN); ++ if (tmp < 0) { ++ dev_dbg(nor->dev, " error %d reading JEDEC ID\n", tmp); ++ return ERR_PTR(tmp); ++ } ++ dev_info(nor->dev, "using Read Manufacturer / Device ID command (0x%02x) returned %02x %02x\n", ++ 0x90, id[0x03], id[0x04]); ++ if (id[0x03] == 0xef && id[0x04] == 0x17) { ++ return spi_nor_match_id("w25q128"); ++ } ++ + return ERR_PTR(-ENODEV); + } + |