From f2df1ae3fe8d44d51bd7218a9da9134b83c7531e Mon Sep 17 00:00:00 2001 From: Gernot Hoyler Date: Thu, 2 Sep 2010 17:27:20 +0200 Subject: mtd: m25p80: Add support for two new Spansion SPI devices (S25FL-K) This patch adds support for Spansion S25FL016K and S25FL064K SPI flash. It has been tested with physical devices. Note that both parts exhibit a Winbond manufacturer ID so they might also be added to that section. Signed-off-by: Gernot Hoyler Signed-off-by: David Woodhouse --- drivers/mtd/devices/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 6f512b5..1f0f703 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -666,6 +666,8 @@ static const struct spi_device_id m25p_ids[] = { { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, { "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, 0) }, { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, 0) }, + { "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K) }, + { "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) }, /* SST -- large erase sizes are "overlays", "sectors" are 4K */ { "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024, 8, SECT_4K) }, -- cgit v1.1 From d2ac467a108400ff1ae682a423c7d41265e62d47 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 30 Aug 2010 13:00:48 +0200 Subject: mtd: m25p80: Add support for the Winbond W25Q64 This patch adds support for the Winbond W25Q64 serial flash. Signed-off-by: Thierry Reding Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/devices/m25p80.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 1f0f703..b6fd7c2 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -716,6 +716,7 @@ static const struct spi_device_id m25p_ids[] = { { "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) }, { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) }, { "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) }, + { "w25q64", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) }, /* Catalyst / On Semiconductor -- non-JEDEC */ { "cat25c11", CAT25_INFO( 16, 8, 16, 1) }, -- cgit v1.1 From d86fbdb8ed0ac957693ff475cca076021677166a Mon Sep 17 00:00:00 2001 From: David Jander Date: Thu, 30 Sep 2010 13:26:02 +0200 Subject: mtd: m25p80.c: Add support for S25FL032P spi-nor flash devices. Signed-off-by: David Jander Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/devices/m25p80.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index b6fd7c2..7e0edd4 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -661,6 +661,7 @@ static const struct spi_device_id m25p_ids[] = { { "s25sl008a", INFO(0x010213, 0, 64 * 1024, 16, 0) }, { "s25sl016a", INFO(0x010214, 0, 64 * 1024, 32, 0) }, { "s25sl032a", INFO(0x010215, 0, 64 * 1024, 64, 0) }, + { "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, SECT_4K) }, { "s25sl064a", INFO(0x010216, 0, 64 * 1024, 128, 0) }, { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) }, { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, -- cgit v1.1 From 1cd844fe43cb6464b34dea504930c1a15e4ad38d Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 20 Oct 2010 10:39:22 -0700 Subject: mtd: phram: use KBUILD_MODNAME Use the more standard #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt No change in output strings. Signed-off-by: Joe Perches Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/devices/phram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index 1696bbe..5239328 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -15,7 +15,7 @@ * phram=swap,64Mi,128Mi phram=test,900Mi,1Mi */ -#define pr_fmt(fmt) "phram: " fmt +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include -- cgit v1.1 From 89a82280a8e632b7a5b0ce70dd5bccfa2d3bc2c5 Mon Sep 17 00:00:00 2001 From: Nicolas Kaiser Date: Fri, 22 Oct 2010 12:47:24 +0200 Subject: block2mtd: dubious assignment When block2mtd_erase fails, a duplicated assignment instantly changes instr->state from MTD_ERASE_FAILED to MTD_ERASE_DONE. It looks to me like this might not be intended, or is it? Signed-off-by: Nicolas Kaiser Acked-By: Joern Engel Signed-off-by: David Woodhouse --- drivers/mtd/devices/block2mtd.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 9365186..2cf0cc6 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -91,7 +91,6 @@ static int block2mtd_erase(struct mtd_info *mtd, struct erase_info *instr) } else instr->state = MTD_ERASE_DONE; - instr->state = MTD_ERASE_DONE; mtd_erase_callback(instr); return err; } -- cgit v1.1 From 40847437f15221b5822ba70550e8b9fcccfb9bb3 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Fri, 29 Oct 2010 21:04:19 -0700 Subject: mtd: fix build error in m25p80.c While building an x86 distro kernel, I hit the following: Kernel: arch/x86/boot/bzImage is ready (#7) ERROR: "of_mtd_parse_partitions" [drivers/mtd/devices/m25p80.ko] undefined! of_mtd_parse_partitions is defined with MTD_OF_PARTS, and that's only built on PPC and microblaze. The code in question should be wrapped w/ a stricter #ifdef. Signed-off-by: Andres Salomon Acked-by: Grant Likely Signed-off-by: David Woodhouse --- drivers/mtd/devices/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 669d2b7..bf5a002 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -928,7 +928,7 @@ static int __devinit m25p_probe(struct spi_device *spi) nr_parts = data->nr_parts; } -#ifdef CONFIG_OF +#ifdef CONFIG_MTD_OF_PARTS if (nr_parts <= 0 && spi->dev.of_node) { nr_parts = of_mtd_parse_partitions(&spi->dev, spi->dev.of_node, &parts); -- cgit v1.1