linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] m25p80 Quad/Dual updates
@ 2014-01-21 12:59 Geert Uytterhoeven
  2014-01-21 12:59 ` [PATCH 1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2014-01-21 12:59 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris
  Cc: Marek Vasut, Sourav Poddar, linux-mtd, linux-spi

	Hi,

This patch series allows to really use Quad and Dual SPI Read Tranfers
with the m25p80 driver:
    [1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
    [2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers
    [3/4] mtd: m25p80: Add dual read support
    [4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and
	  s25fl512s

Patch [2/4] is a bug fix.
Patches [3/4] and [4/4] may be considered of limited use (why use Dual
transfers if you have Quad transfers?), but
  1. not all Quad-capable devices may be connected using 6 wires,
  2. it allows to test Dual SPI transfers in SPI master drivers.

This was tested with a preliminary version of the Renesas QSPI driver and a
Spansion s25fl512s SPI FLASH.

Thanks for your comments!

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
  2014-01-21 12:59 [PATCH 0/4] m25p80 Quad/Dual updates Geert Uytterhoeven
@ 2014-01-21 12:59 ` Geert Uytterhoeven
       [not found]   ` <1390309159-19643-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-01-21 12:59 ` [PATCH 2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Geert Uytterhoeven @ 2014-01-21 12:59 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris
  Cc: Marek Vasut, Sourav Poddar, linux-mtd, Geert Uytterhoeven,
	linux-spi

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Spansion s25fl512s supports Quad SPI transfers, hence set the
M25P80_QUAD_READ flag.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 drivers/mtd/devices/m25p80.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index d0f6475504f5..320c6a308630 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -943,7 +943,7 @@ static const struct spi_device_id m25p_ids[] = {
 	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
 	{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
 	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, M25P80_QUAD_READ) },
-	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, 0) },
+	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, M25P80_QUAD_READ) },
 	{ "s70fl01gs",  INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
 	{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024,  64, 0) },
 	{ "s25sl12801", INFO(0x012018, 0x0301,  64 * 1024, 256, 0) },
-- 
1.7.9.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers
  2014-01-21 12:59 [PATCH 0/4] m25p80 Quad/Dual updates Geert Uytterhoeven
  2014-01-21 12:59 ` [PATCH 1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s Geert Uytterhoeven
@ 2014-01-21 12:59 ` Geert Uytterhoeven
       [not found]   ` <1390309159-19643-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-01-21 12:59 ` [PATCH 3/4] mtd: m25p80: Add dual read support Geert Uytterhoeven
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Geert Uytterhoeven @ 2014-01-21 12:59 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris
  Cc: Marek Vasut, Sourav Poddar, linux-mtd, Geert Uytterhoeven,
	linux-spi

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

When using the Quad Read opcode, SPI masters still use Single SPI
transfers, as spi_transfer.rx_nbits defaults to SPI_NBITS_SINGLE.
Use SPI_NBITS_QUAD to fix this.

While an earlier version of commit 3487a63955c34ea508bcf4ca5131ddd953876e2d
("drivers: mtd: m25p80: add quad read support") did this correctly, it was
forgotten in the version that got merged.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 drivers/mtd/devices/m25p80.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 320c6a308630..ad1913909702 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -489,6 +489,16 @@ static inline int m25p80_dummy_cycles_read(struct m25p *flash)
 	}
 }
 
+static inline unsigned int m25p80_rx_nbits(const struct m25p *flash)
+{
+	switch (flash->flash_read) {
+	case M25P80_QUAD:
+		return 4;
+	default:
+		return 0;
+	}
+}
+
 /*
  * Read an address range from the flash chip.  The address range
  * may be any size provided it is within the physical boundaries.
@@ -519,6 +529,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
 	spi_message_add_tail(&t[0], &m);
 
 	t[1].rx_buf = buf;
+	t[1].rx_nbits = m25p80_rx_nbits(flash);
 	t[1].len = len;
 	spi_message_add_tail(&t[1], &m);
 
-- 
1.7.9.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/4] mtd: m25p80: Add dual read support
  2014-01-21 12:59 [PATCH 0/4] m25p80 Quad/Dual updates Geert Uytterhoeven
  2014-01-21 12:59 ` [PATCH 1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s Geert Uytterhoeven
  2014-01-21 12:59 ` [PATCH 2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers Geert Uytterhoeven
@ 2014-01-21 12:59 ` Geert Uytterhoeven
       [not found]   ` <1390309159-19643-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-01-21 12:59 ` [PATCH 4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s Geert Uytterhoeven
       [not found] ` <1390309159-19643-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  4 siblings, 1 reply; 14+ messages in thread
From: Geert Uytterhoeven @ 2014-01-21 12:59 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris
  Cc: Marek Vasut, Sourav Poddar, linux-mtd, Geert Uytterhoeven,
	linux-spi

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Add support for Dual SPI read transfers, which is supported by some
Spansion SPI FLASHes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 drivers/mtd/devices/m25p80.c |   23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index ad1913909702..73bf661100f7 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -41,7 +41,8 @@
 #define	OPCODE_WRSR		0x01	/* Write status register 1 byte */
 #define	OPCODE_NORM_READ	0x03	/* Read data bytes (low frequency) */
 #define	OPCODE_FAST_READ	0x0b	/* Read data bytes (high frequency) */
-#define	OPCODE_QUAD_READ        0x6b    /* Read data bytes */
+#define	OPCODE_DUAL_READ        0x3b    /* Read data bytes (Dual SPI) */
+#define	OPCODE_QUAD_READ        0x6b    /* Read data bytes (Quad SPI) */
 #define	OPCODE_PP		0x02	/* Page program (up to 256 bytes) */
 #define	OPCODE_BE_4K		0x20	/* Erase 4KiB block */
 #define	OPCODE_BE_4K_PMC	0xd7	/* Erase 4KiB block on PMC chips */
@@ -54,7 +55,8 @@
 /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
 #define	OPCODE_NORM_READ_4B	0x13	/* Read data bytes (low frequency) */
 #define	OPCODE_FAST_READ_4B	0x0c	/* Read data bytes (high frequency) */
-#define	OPCODE_QUAD_READ_4B	0x6c    /* Read data bytes */
+#define	OPCODE_DUAL_READ_4B	0x3c    /* Read data bytes (Dual SPI) */
+#define	OPCODE_QUAD_READ_4B	0x6c    /* Read data bytes (Quad SPI) */
 #define	OPCODE_PP_4B		0x12	/* Page program (up to 256 bytes) */
 #define	OPCODE_SE_4B		0xdc	/* Sector erase (usually 64KiB) */
 
@@ -95,6 +97,7 @@
 enum read_type {
 	M25P80_NORMAL = 0,
 	M25P80_FAST,
+	M25P80_DUAL,
 	M25P80_QUAD,
 };
 
@@ -479,6 +482,7 @@ static inline int m25p80_dummy_cycles_read(struct m25p *flash)
 {
 	switch (flash->flash_read) {
 	case M25P80_FAST:
+	case M25P80_DUAL:
 	case M25P80_QUAD:
 		return 1;
 	case M25P80_NORMAL:
@@ -492,6 +496,8 @@ static inline int m25p80_dummy_cycles_read(struct m25p *flash)
 static inline unsigned int m25p80_rx_nbits(const struct m25p *flash)
 {
 	switch (flash->flash_read) {
+	case M25P80_DUAL:
+		return 2;
 	case M25P80_QUAD:
 		return 4;
 	default:
@@ -855,7 +861,8 @@ struct flash_info {
 #define	SST_WRITE	0x04		/* use SST byte programming */
 #define	M25P_NO_FR	0x08		/* Can't do fastread */
 #define	SECT_4K_PMC	0x10		/* OPCODE_BE_4K_PMC works uniformly */
-#define	M25P80_QUAD_READ	0x20    /* Flash supports Quad Read */
+#define	M25P80_DUAL_READ	0x20    /* Flash supports Dual Read */
+#define	M25P80_QUAD_READ	0x40    /* Flash supports Quad Read */
 };
 
 #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags)	\
@@ -1226,7 +1233,7 @@ static int m25p_probe(struct spi_device *spi)
 	if (info->flags & M25P_NO_FR)
 		flash->flash_read = M25P80_NORMAL;
 
-	/* Quad-read mode takes precedence over fast/normal */
+	/* Quad/Dual-read mode takes precedence over fast/normal */
 	if (spi->mode & SPI_RX_QUAD && info->flags & M25P80_QUAD_READ) {
 		ret = set_quad_mode(flash, info->jedec_id);
 		if (ret) {
@@ -1234,6 +1241,8 @@ static int m25p_probe(struct spi_device *spi)
 			return ret;
 		}
 		flash->flash_read = M25P80_QUAD;
+	} else if (spi->mode & SPI_RX_DUAL && info->flags & M25P80_DUAL_READ) {
+		flash->flash_read = M25P80_DUAL;
 	}
 
 	/* Default commands */
@@ -1241,6 +1250,9 @@ static int m25p_probe(struct spi_device *spi)
 	case M25P80_QUAD:
 		flash->read_opcode = OPCODE_QUAD_READ;
 		break;
+	case M25P80_DUAL:
+		flash->read_opcode = OPCODE_DUAL_READ;
+		break;
 	case M25P80_FAST:
 		flash->read_opcode = OPCODE_FAST_READ;
 		break;
@@ -1265,6 +1277,9 @@ static int m25p_probe(struct spi_device *spi)
 			case M25P80_QUAD:
 				flash->read_opcode = OPCODE_QUAD_READ_4B;
 				break;
+			case M25P80_DUAL:
+				flash->read_opcode = OPCODE_DUAL_READ_4B;
+				break;
 			case M25P80_FAST:
 				flash->read_opcode = OPCODE_FAST_READ_4B;
 				break;
-- 
1.7.9.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s
  2014-01-21 12:59 [PATCH 0/4] m25p80 Quad/Dual updates Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2014-01-21 12:59 ` [PATCH 3/4] mtd: m25p80: Add dual read support Geert Uytterhoeven
@ 2014-01-21 12:59 ` Geert Uytterhoeven
       [not found]   ` <1390309159-19643-5-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
       [not found] ` <1390309159-19643-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  4 siblings, 1 reply; 14+ messages in thread
From: Geert Uytterhoeven @ 2014-01-21 12:59 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris
  Cc: Marek Vasut, Sourav Poddar, linux-mtd, Geert Uytterhoeven,
	linux-spi

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set the
M25P80_DUAL_READ flag.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 drivers/mtd/devices/m25p80.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 73bf661100f7..f0871a2e449d 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -960,8 +960,8 @@ static const struct spi_device_id m25p_ids[] = {
 	{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, 0) },
 	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
 	{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
-	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, M25P80_QUAD_READ) },
-	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, M25P80_QUAD_READ) },
+	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, M25P80_DUAL_READ | M25P80_QUAD_READ) },
+	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, M25P80_DUAL_READ | M25P80_QUAD_READ) },
 	{ "s70fl01gs",  INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
 	{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024,  64, 0) },
 	{ "s25sl12801", INFO(0x012018, 0x0301,  64 * 1024, 256, 0) },
-- 
1.7.9.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
       [not found]   ` <1390309159-19643-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-01-21 15:13     ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2014-01-21 15:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Brian Norris, Sourav Poddar,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Tuesday, January 21, 2014 at 01:59:16 PM, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> 
> Spansion s25fl512s supports Quad SPI transfers, hence set the
> M25P80_QUAD_READ flag.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
>  drivers/mtd/devices/m25p80.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index d0f6475504f5..320c6a308630 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -943,7 +943,7 @@ static const struct spi_device_id m25p_ids[] = {
>  	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
>  	{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
>  	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, 
M25P80_QUAD_READ)
> }, -	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, 0) },
> +	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, 
M25P80_QUAD_READ)
> }, { "s70fl01gs",  INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
>  	{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024,  64, 0) },
>  	{ "s25sl12801", INFO(0x012018, 0x0301,  64 * 1024, 256, 0) },

Sure, the thing does support it, so why not.

Acked-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers
       [not found]   ` <1390309159-19643-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-01-21 15:18     ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2014-01-21 15:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Brian Norris, Sourav Poddar,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Tuesday, January 21, 2014 at 01:59:17 PM, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> 
> When using the Quad Read opcode, SPI masters still use Single SPI
> transfers, as spi_transfer.rx_nbits defaults to SPI_NBITS_SINGLE.
> Use SPI_NBITS_QUAD to fix this.
> 
> While an earlier version of commit 3487a63955c34ea508bcf4ca5131ddd953876e2d
> ("drivers: mtd: m25p80: add quad read support") did this correctly, it was
> forgotten in the version that got merged.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
>  drivers/mtd/devices/m25p80.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index 320c6a308630..ad1913909702 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -489,6 +489,16 @@ static inline int m25p80_dummy_cycles_read(struct m25p
> *flash) }
>  }
> 
> +static inline unsigned int m25p80_rx_nbits(const struct m25p *flash)
> +{
> +	switch (flash->flash_read) {
> +	case M25P80_QUAD:
> +		return 4;
> +	default:
> +		return 0;
> +	}
> +}
> +
>  /*
>   * Read an address range from the flash chip.  The address range
>   * may be any size provided it is within the physical boundaries.
> @@ -519,6 +529,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t
> from, size_t len, spi_message_add_tail(&t[0], &m);
> 
>  	t[1].rx_buf = buf;
> +	t[1].rx_nbits = m25p80_rx_nbits(flash);
>  	t[1].len = len;
>  	spi_message_add_tail(&t[1], &m);

Indeed.

Acked-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] mtd: m25p80: Add dual read support
       [not found]   ` <1390309159-19643-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-01-21 15:42     ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2014-01-21 15:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Brian Norris, Sourav Poddar,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Tuesday, January 21, 2014 at 01:59:18 PM, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> 
> Add support for Dual SPI read transfers, which is supported by some
> Spansion SPI FLASHes.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>

I don't see any obvious issue:

Acked-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s
       [not found]   ` <1390309159-19643-5-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-01-21 15:42     ` Marek Vasut
       [not found]       ` <201401211642.55461.marex-ynQEQJNshbs@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2014-01-21 15:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Brian Norris, Sourav Poddar,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Tuesday, January 21, 2014 at 01:59:19 PM, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> 
> Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set the
> M25P80_DUAL_READ flag.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
>  drivers/mtd/devices/m25p80.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index 73bf661100f7..f0871a2e449d 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -960,8 +960,8 @@ static const struct spi_device_id m25p_ids[] = {
>  	{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, 0) },
>  	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
>  	{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
> -	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, 
M25P80_QUAD_READ)
> }, -	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256,
> M25P80_QUAD_READ) }, +	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024,
> 512, M25P80_DUAL_READ | M25P80_QUAD_READ) }, +	{ "s25fl512s", 
> INFO(0x010220, 0x4d00, 256 * 1024, 256, M25P80_DUAL_READ |
> M25P80_QUAD_READ) }, { "s70fl01gs",  INFO(0x010221, 0x4d00, 256 * 1024,
> 256, 0) },
>  	{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024,  64, 0) },
>  	{ "s25sl12801", INFO(0x012018, 0x0301,  64 * 1024, 256, 0) },

Why don't you lump this together with 1/4 ? :)

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s
       [not found]       ` <201401211642.55461.marex-ynQEQJNshbs@public.gmane.org>
@ 2014-01-21 15:58         ` Geert Uytterhoeven
       [not found]           ` <CAMuHMdVMDO9nKQPgNwz47H2mK6kKreNYiyn-AFOB2KryRpSgoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Geert Uytterhoeven @ 2014-01-21 15:58 UTC (permalink / raw)
  To: Marek Vasut
  Cc: David Woodhouse, Brian Norris, Sourav Poddar, MTD Maling List,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Tue, Jan 21, 2014 at 4:42 PM, Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> wrote:
>> Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set the
>> M25P80_DUAL_READ flag.

> Why don't you lump this together with 1/4 ? :)

Because I don't want to delay Quad support for s25fl512s by bike-shedding
about the need for Dual support.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s
       [not found]           ` <CAMuHMdVMDO9nKQPgNwz47H2mK6kKreNYiyn-AFOB2KryRpSgoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-01-21 16:10             ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2014-01-21 16:10 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Brian Norris, Sourav Poddar, MTD Maling List,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Tuesday, January 21, 2014 at 04:58:59 PM, Geert Uytterhoeven wrote:
> On Tue, Jan 21, 2014 at 4:42 PM, Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> wrote:
> >> Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set
> >> the M25P80_DUAL_READ flag.
> > 
> > Why don't you lump this together with 1/4 ? :)
> 
> Because I don't want to delay Quad support for s25fl512s by bike-shedding
> about the need for Dual support.
> 
> Gr{oetje,eeting}s,

OK, gotcha. Either way is fine with me here.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/4] m25p80 Quad/Dual updates
       [not found] ` <1390309159-19643-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-01-23  2:01   ` Huang Shijie
       [not found]     ` <20140123020153.GA6229-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
  2014-01-28  5:26   ` Brian Norris
  1 sibling, 1 reply; 14+ messages in thread
From: Huang Shijie @ 2014-01-23  2:01 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Sourav Poddar,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

On Tue, Jan 21, 2014 at 01:59:15PM +0100, Geert Uytterhoeven wrote:
Hi Brian:
  should I rebase the SPI-NOR framework on this patch set?

  thanks
  Huang Shijie


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/4] m25p80 Quad/Dual updates
       [not found]     ` <20140123020153.GA6229-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
@ 2014-01-25  9:06       ` Brian Norris
  0 siblings, 0 replies; 14+ messages in thread
From: Brian Norris @ 2014-01-25  9:06 UTC (permalink / raw)
  To: Huang Shijie
  Cc: Geert Uytterhoeven, David Woodhouse, Marek Vasut, Sourav Poddar,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

On Thu, Jan 23, 2014 at 10:01:56AM +0800, Huang Shijie wrote:
> On Tue, Jan 21, 2014 at 01:59:15PM +0100, Geert Uytterhoeven wrote:
> Hi Brian:
>   should I rebase the SPI-NOR framework on this patch set?

Probably, but I would wait a bit.

I will probably try to take the first two patches of Geert's patch set
for 3.14, as they are a trivial improvement and a bugfix to other queued
material, while the rest will likely wait. And I still don't think we've
taken a close enough look at your existing series for it to be worth an
additional patch submission just yet. But it's up to you.

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/4] m25p80 Quad/Dual updates
       [not found] ` <1390309159-19643-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-01-23  2:01   ` [PATCH 0/4] m25p80 Quad/Dual updates Huang Shijie
@ 2014-01-28  5:26   ` Brian Norris
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Norris @ 2014-01-28  5:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Woodhouse, Sourav Poddar, Marek Vasut,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

On Tue, Jan 21, 2014 at 01:59:15PM +0100, Geert Uytterhoeven wrote:
> This patch series allows to really use Quad and Dual SPI Read Tranfers
> with the m25p80 driver:
>     [1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
>     [2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers

Pushed 1 and 2 to l2-mtd.git/master and will submit for 3.14-rc1, as
they are trivial extensions/bugfixes for stuff we have queued now.

>     [3/4] mtd: m25p80: Add dual read support
>     [4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and
> 	  s25fl512s

Patches 3 and 4 are queued in l2-mtd.git/next and should go in next
merge window.

> Patch [2/4] is a bug fix.
> Patches [3/4] and [4/4] may be considered of limited use (why use Dual
> transfers if you have Quad transfers?), but
>   1. not all Quad-capable devices may be connected using 6 wires,
>   2. it allows to test Dual SPI transfers in SPI master drivers.

Reason 1 is especially good. Thanks for the patches.

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-01-28  5:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 12:59 [PATCH 0/4] m25p80 Quad/Dual updates Geert Uytterhoeven
2014-01-21 12:59 ` [PATCH 1/4] mtd: m25p80: Enable Quad SPI read transfers for s25fl512s Geert Uytterhoeven
     [not found]   ` <1390309159-19643-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-01-21 15:13     ` Marek Vasut
2014-01-21 12:59 ` [PATCH 2/4] mtd: m25p80: Set rx_nbits for Quad SPI transfers Geert Uytterhoeven
     [not found]   ` <1390309159-19643-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-01-21 15:18     ` Marek Vasut
2014-01-21 12:59 ` [PATCH 3/4] mtd: m25p80: Add dual read support Geert Uytterhoeven
     [not found]   ` <1390309159-19643-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-01-21 15:42     ` Marek Vasut
2014-01-21 12:59 ` [PATCH 4/4] mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s Geert Uytterhoeven
     [not found]   ` <1390309159-19643-5-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-01-21 15:42     ` Marek Vasut
     [not found]       ` <201401211642.55461.marex-ynQEQJNshbs@public.gmane.org>
2014-01-21 15:58         ` Geert Uytterhoeven
     [not found]           ` <CAMuHMdVMDO9nKQPgNwz47H2mK6kKreNYiyn-AFOB2KryRpSgoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-21 16:10             ` Marek Vasut
     [not found] ` <1390309159-19643-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-01-23  2:01   ` [PATCH 0/4] m25p80 Quad/Dual updates Huang Shijie
     [not found]     ` <20140123020153.GA6229-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2014-01-25  9:06       ` Brian Norris
2014-01-28  5:26   ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).