kernel: m25p80: allow fallback from spi_flash_read to regular SPI transfer

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2018-02-23 17:33:21 +01:00
parent 25aaff9100
commit a49f6565b3
6 changed files with 79 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
@@ -243,6 +244,10 @@ static int m25p_probe(struct spi_device
@@ -245,6 +246,10 @@ static int m25p_probe(struct spi_device
};
char *flash_name;
int ret;
@@ -33,7 +33,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
data = dev_get_platdata(&spi->dev);
@@ -281,6 +286,8 @@ static int m25p_probe(struct spi_device
@@ -283,6 +288,8 @@ static int m25p_probe(struct spi_device
if (data && data->name)
nor->mtd.name = data->name;

View File

@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
@@ -198,6 +199,10 @@ static int m25p_probe(struct spi_device
@@ -200,6 +201,10 @@ static int m25p_probe(struct spi_device
enum read_mode mode = SPI_NOR_NORMAL;
char *flash_name;
int ret;
@@ -33,7 +33,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
data = dev_get_platdata(&spi->dev);
@@ -227,6 +232,8 @@ static int m25p_probe(struct spi_device
@@ -229,6 +234,8 @@ static int m25p_probe(struct spi_device
if (data && data->name)
nor->mtd.name = data->name;