diff mbox

[1/2] mtd: m25p80: Revive dual read support

Message ID 1398170732-19773-1-git-send-email-geert+renesas@glider.be (mailing list archive)
State Not Applicable
Headers show

Commit Message

Geert Uytterhoeven April 22, 2014, 12:45 p.m. UTC
Commit 03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
nor framework") accidentally removed support for Dual SPI read transfers.
Add it back.

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

Comments

Huang Shijie April 22, 2014, 3:48 p.m. UTC | #1
On Tue, Apr 22, 2014 at 02:45:31PM +0200, Geert Uytterhoeven wrote:
> Commit 03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
> nor framework") accidentally removed support for Dual SPI read transfers.
> Add it back.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/mtd/devices/m25p80.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index 1557d8f672c1..ed7e0a1bed3c 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -221,6 +221,8 @@ static int m25p_probe(struct spi_device *spi)
>  
>  	if (spi->mode & SPI_RX_QUAD)
>  		mode = SPI_NOR_QUAD;
> +	else if (spi->mode & SPI_RX_DUAL)
> +		mode = SPI_NOR_DUAL;
>  	ret = spi_nor_scan(nor, spi_get_device_id(spi), mode);
>  	if (ret)
>  		return ret;
sorry for the mistake.

Acked-by: Huang Shijie <shijie8@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Brian Norris May 12, 2014, 8:21 p.m. UTC | #2
On Tue, Apr 22, 2014 at 02:45:31PM +0200, Geert Uytterhoeven wrote:
> Commit 03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
> nor framework") accidentally removed support for Dual SPI read transfers.
> Add it back.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Pushed to l2-mtd.git. Thanks!

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

Patch

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 1557d8f672c1..ed7e0a1bed3c 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -221,6 +221,8 @@  static int m25p_probe(struct spi_device *spi)
 
 	if (spi->mode & SPI_RX_QUAD)
 		mode = SPI_NOR_QUAD;
+	else if (spi->mode & SPI_RX_DUAL)
+		mode = SPI_NOR_DUAL;
 	ret = spi_nor_scan(nor, spi_get_device_id(spi), mode);
 	if (ret)
 		return ret;