lantiq: make m25p80 work again
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 12 Feb 2015 11:15:56 +0000 (11:15 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 12 Feb 2015 11:15:56 +0000 (11:15 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44421 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/lantiq/config-3.18
target/linux/lantiq/patches-3.18/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch

index f5220ce..148d104 100644 (file)
@@ -102,7 +102,9 @@ CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_JEDECPROBE=y
 CONFIG_MTD_LANTIQ=y
+CONFIG_MTD_M25P80=y
 # CONFIG_MTD_NAND_XWAY is not set
+CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_UIMAGE_SPLIT=y
 CONFIG_NEED_DMA_MAP_STATE=y
index 04a858f..98fe4c2 100644 (file)
@@ -14,7 +14,15 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -198,6 +198,10 @@ static int m25p_probe(struct spi_device
+@@ -19,6 +19,7 @@
+ #include <linux/errno.h>
+ #include <linux/module.h>
+ #include <linux/device.h>
++#include <linux/of.h>
+ #include <linux/mtd/mtd.h>
+ #include <linux/mtd/partitions.h>
+@@ -198,6 +199,10 @@
        enum read_mode mode = SPI_NOR_NORMAL;
        char *flash_name = NULL;
        int ret;
@@ -25,7 +33,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
        data = dev_get_platdata(&spi->dev);
  
-@@ -229,6 +233,8 @@ static int m25p_probe(struct spi_device
+@@ -229,6 +234,8 @@
  
        if (data && data->name)
                flash->mtd.name = data->name;