kernel: update kernel 4.9 to version 4.9.91
[openwrt/staging/wigyori.git] / target / linux / layerscape / patches-4.9 / 402-mtd-support-layerscape.patch
index e45d2635fd1ebc18d5979dcbc7304679cb784380..6b3485700a5e7c78b5c3daa78952d8cb55303a94 100644 (file)
@@ -1,9 +1,9 @@
-From c0e4767d3b26f21e5043fe2d15a24a1958de766e Mon Sep 17 00:00:00 2001
+From d9d0181f74146507026c31cccd52dda27ec3d966 Mon Sep 17 00:00:00 2001
 From: Yangbo Lu <yangbo.lu@nxp.com>
-Date: Mon, 25 Sep 2017 10:17:28 +0800
-Subject: [PATCH] mtd: support layerscape
+Date: Wed, 17 Jan 2018 14:57:31 +0800
+Subject: [PATCH 06/30] mtd: support layerscape
 
-This is a integrated patch for layerscape ifc-nor-nand support.
+This is an integrated patch for layerscape ifc-nor-nand support.
 
 Signed-off-by: Alison Wang <b18965@freescale.com>
 Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
@@ -17,8 +17,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  include/linux/fsl_ifc.h         |   7 ++
  6 files changed, 280 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
-index 4b4c0c3c..820f5590 100644
 --- a/drivers/memory/Kconfig
 +++ b/drivers/memory/Kconfig
 @@ -115,7 +115,7 @@ config FSL_CORENET_CF
@@ -30,8 +28,6 @@ index 4b4c0c3c..820f5590 100644
  
  config JZ4780_NEMC
        bool "Ingenic JZ4780 SoC NEMC driver"
-diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c
-index 1b182b11..10d2a5f8 100644
 --- a/drivers/memory/fsl_ifc.c
 +++ b/drivers/memory/fsl_ifc.c
 @@ -24,6 +24,7 @@
@@ -51,7 +47,7 @@ index 1b182b11..10d2a5f8 100644
  
  /*
   * convert_ifc_address - convert the base address
-@@ -311,6 +314,261 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
+@@ -311,6 +314,261 @@ err:
        return ret;
  }
  
@@ -313,7 +309,7 @@ index 1b182b11..10d2a5f8 100644
  static const struct of_device_id fsl_ifc_match[] = {
        {
                .compatible = "fsl,ifc",
-@@ -318,10 +576,15 @@ static const struct of_device_id fsl_ifc_match[] = {
+@@ -318,10 +576,15 @@ static const struct of_device_id fsl_ifc
        {},
  };
  
@@ -329,8 +325,6 @@ index 1b182b11..10d2a5f8 100644
        },
        .probe       = fsl_ifc_ctrl_probe,
        .remove      = fsl_ifc_ctrl_remove,
-diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
-index 11d63046..38b90301 100644
 --- a/drivers/mtd/maps/physmap_of.c
 +++ b/drivers/mtd/maps/physmap_of.c
 @@ -20,6 +20,7 @@
@@ -341,7 +335,7 @@ index 11d63046..38b90301 100644
  #include <linux/of.h>
  #include <linux/of_address.h>
  #include <linux/of_platform.h>
-@@ -209,6 +210,9 @@ static int of_flash_probe(struct platform_device *dev)
+@@ -209,6 +210,9 @@ static int of_flash_probe(struct platfor
                        return err;
                }
  
@@ -351,8 +345,6 @@ index 11d63046..38b90301 100644
                err = -ENOMEM;
                info->list[i].map.virt = ioremap(info->list[i].map.phys,
                                                 info->list[i].map.size);
-diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
-index b254090b..961f1aa1 100644
 --- a/drivers/mtd/nand/Kconfig
 +++ b/drivers/mtd/nand/Kconfig
 @@ -438,7 +438,7 @@ config MTD_NAND_FSL_ELBC
@@ -364,11 +356,9 @@ index b254090b..961f1aa1 100644
        select FSL_IFC
        select MEMORY
        help
-diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
-index d1570f51..785e9ee0 100644
 --- a/drivers/mtd/nand/fsl_ifc_nand.c
 +++ b/drivers/mtd/nand/fsl_ifc_nand.c
-@@ -904,9 +904,12 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
+@@ -898,7 +898,7 @@ static int fsl_ifc_chip_init(struct fsl_
                chip->ecc.algo = NAND_ECC_HAMMING;
        }
  
@@ -376,14 +366,7 @@ index d1570f51..785e9ee0 100644
 +      if (ctrl->version >= FSL_IFC_VERSION_1_1_0)
                fsl_ifc_sram_init(priv);
  
-+      if (ctrl->version >= FSL_IFC_VERSION_2_0_0)
-+              priv->bufnum_mask = (priv->bufnum_mask * 2) + 1;
-+
-       return 0;
- }
-diff --git a/include/linux/fsl_ifc.h b/include/linux/fsl_ifc.h
-index c332f0a4..a41d21b6 100644
+       /*
 --- a/include/linux/fsl_ifc.h
 +++ b/include/linux/fsl_ifc.h
 @@ -274,6 +274,8 @@
@@ -395,7 +378,7 @@ index c332f0a4..a41d21b6 100644
  /* Addressing Mode-ROW0+n/COL0 */
  #define IFC_NAND_NCFGR_ADDR_MODE_RC0  0x00000000
  /* Addressing Mode-ROW0+n/COL0+n */
-@@ -861,6 +863,11 @@ struct fsl_ifc_ctrl {
+@@ -857,6 +859,11 @@ struct fsl_ifc_ctrl {
        u32 nand_stat;
        wait_queue_head_t nand_wait;
        bool little_endian;
@@ -407,6 +390,3 @@ index c332f0a4..a41d21b6 100644
  };
  
  extern struct fsl_ifc_ctrl *fsl_ifc_ctrl_dev;
--- 
-2.14.1
-