Re: [PATCH 47/88] mtd: Drop unused fsmc_nand driver

2023-02-22 Thread Patrick DELAUNAY

Hi,

On 1/23/23 22:59, Simon Glass wrote:

This is not used since this commit:

570c3dcfc15 arm: Remove spear600 boards and the rest of SPEAr support

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass 
---

  drivers/mtd/nand/raw/Makefile|   1 -
  drivers/mtd/nand/raw/fsmc_nand.c | 470 ---
  include/linux/mtd/fsmc_nand.h|  84 --
  3 files changed, 555 deletions(-)
  delete mode 100644 drivers/mtd/nand/raw/fsmc_nand.c
  delete mode 100644 include/linux/mtd/fsmc_nand.h



For STMicroelectronics / SPEAr


Reviewed-by: Patrick Delaunay 

Thanks
Patrick



Re: [PATCH 47/88] mtd: Drop unused fsmc_nand driver

2023-01-24 Thread Michael Nazzareno Trimarchi
Hi

On Mon, Jan 23, 2023 at 11:03 PM Simon Glass  wrote:
>
> This is not used since this commit:
>
>570c3dcfc15 arm: Remove spear600 boards and the rest of SPEAr support
>
> Drop the driver and Kconfig option.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/mtd/nand/raw/Makefile|   1 -
>  drivers/mtd/nand/raw/fsmc_nand.c | 470 ---
>  include/linux/mtd/fsmc_nand.h|  84 --
>  3 files changed, 555 deletions(-)
>  delete mode 100644 drivers/mtd/nand/raw/fsmc_nand.c
>  delete mode 100644 include/linux/mtd/fsmc_nand.h
>
> diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile
> index e8764cf358b..f004eb39f3b 100644
> --- a/drivers/mtd/nand/raw/Makefile
> +++ b/drivers/mtd/nand/raw/Makefile
> @@ -56,7 +56,6 @@ obj-$(CONFIG_NAND_DENALI) += denali.o
>  obj-$(CONFIG_NAND_DENALI_DT) += denali_dt.o
>  obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
>  obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
> -obj-$(CONFIG_NAND_FSMC) += fsmc_nand.o
>  obj-$(CONFIG_NAND_KB9202) += kb9202_nand.o
>  obj-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
>  obj-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o
> diff --git a/drivers/mtd/nand/raw/fsmc_nand.c 
> b/drivers/mtd/nand/raw/fsmc_nand.c
> deleted file mode 100644
> index d795864949c..000
> --- a/drivers/mtd/nand/raw/fsmc_nand.c
> +++ /dev/null
> @@ -1,470 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0+
> -/*
> - * (C) Copyright 2010
> - * Vipin Kumar, STMicroelectronics, vipin.ku...@st.com.
> - *
> - * (C) Copyright 2012
> - * Amit Virdi, STMicroelectronics, amit.vi...@st.com.
> - */
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -static u32 fsmc_version;
> -static struct fsmc_regs *const fsmc_regs_p = (struct fsmc_regs *)
> -   CONFIG_SYS_FSMC_BASE;
> -
> -/*
> - * ECC4 and ECC1 have 13 bytes and 3 bytes of ecc respectively for 512 bytes 
> of
> - * data. ECC4 can correct up to 8 bits in 512 bytes of data while ECC1 can
> - * correct 1 bit in 512 bytes
> - */
> -
> -static struct nand_ecclayout fsmc_ecc4_lp_layout = {
> -   .eccbytes = 104,
> -   .eccpos = {  2,   3,   4,   5,   6,   7,   8,
> -   9,  10,  11,  12,  13,  14,
> -   18,  19,  20,  21,  22,  23,  24,
> -   25,  26,  27,  28,  29,  30,
> -   34,  35,  36,  37,  38,  39,  40,
> -   41,  42,  43,  44,  45,  46,
> -   50,  51,  52,  53,  54,  55,  56,
> -   57,  58,  59,  60,  61,  62,
> -   66,  67,  68,  69,  70,  71,  72,
> -   73,  74,  75,  76,  77,  78,
> -   82,  83,  84,  85,  86,  87,  88,
> -   89,  90,  91,  92,  93,  94,
> -   98,  99, 100, 101, 102, 103, 104,
> -   105, 106, 107, 108, 109, 110,
> -   114, 115, 116, 117, 118, 119, 120,
> -   121, 122, 123, 124, 125, 126
> -   },
> -   .oobfree = {
> -   {.offset = 15, .length = 3},
> -   {.offset = 31, .length = 3},
> -   {.offset = 47, .length = 3},
> -   {.offset = 63, .length = 3},
> -   {.offset = 79, .length = 3},
> -   {.offset = 95, .length = 3},
> -   {.offset = 111, .length = 3},
> -   {.offset = 127, .length = 1}
> -   }
> -};
> -
> -/*
> - * ECC4 layout for NAND of pagesize 4096 bytes & OOBsize 224 bytes. 13*8 
> bytes
> - * of OOB size is reserved for ECC, Byte no. 0 & 1 reserved for bad block & 
> 118
> - * bytes are free for use.
> - */
> -static struct nand_ecclayout fsmc_ecc4_224_layout = {
> -   .eccbytes = 104,
> -   .eccpos = {  2,   3,   4,   5,   6,   7,   8,
> -   9,  10,  11,  12,  13,  14,
> -   18,  19,  20,  21,  22,  23,  24,
> -   25,  26,  27,  28,  29,  30,
> -   34,  35,  36,  37,  38,  39,  40,
> -   41,  42,  43,  44,  45,  46,
> -   50,  51,  52,  53,  54,  55,  56,
> -   57,  58,  59,  60,  61,  62,
> -   66,  67,  68,  69,  70,  71,  72,
> -   73,  74,  75,  76,  77,  78,
> -   82,  83,  84,  85,  86,  87,  88,
> -   89,  90,  91,  92,  93,  94,
> -   98,  99, 100, 101, 102, 103, 104,
> -   105, 106, 107, 108, 109, 110,
> -   114, 115, 116, 117, 118, 119, 120,
> -   121, 122, 123, 124, 125, 126
> -   },
> -   .oobfree = {
> -   {.offset = 15, .length = 3},
> -   {.offset = 31, .length = 3},
> -   {.offset = 47, .length = 3},
> -   {.offset = 63, .length = 3},
> -   {.offset = 79, .length = 3},
> -   {.offset = 95, .length = 3},
> -   {.offset = 111, .length = 3},
> -   {.offset = 127, .length = 97}
> -   }
> -};
> -
> -/*
> - * ECC placement definitions in oobfree type format
> - * There are 13 

[PATCH 47/88] mtd: Drop unused fsmc_nand driver

2023-01-23 Thread Simon Glass
This is not used since this commit:

   570c3dcfc15 arm: Remove spear600 boards and the rest of SPEAr support

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass 
---

 drivers/mtd/nand/raw/Makefile|   1 -
 drivers/mtd/nand/raw/fsmc_nand.c | 470 ---
 include/linux/mtd/fsmc_nand.h|  84 --
 3 files changed, 555 deletions(-)
 delete mode 100644 drivers/mtd/nand/raw/fsmc_nand.c
 delete mode 100644 include/linux/mtd/fsmc_nand.h

diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile
index e8764cf358b..f004eb39f3b 100644
--- a/drivers/mtd/nand/raw/Makefile
+++ b/drivers/mtd/nand/raw/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_NAND_DENALI) += denali.o
 obj-$(CONFIG_NAND_DENALI_DT) += denali_dt.o
 obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
-obj-$(CONFIG_NAND_FSMC) += fsmc_nand.o
 obj-$(CONFIG_NAND_KB9202) += kb9202_nand.o
 obj-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
 obj-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o
diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
deleted file mode 100644
index d795864949c..000
--- a/drivers/mtd/nand/raw/fsmc_nand.c
+++ /dev/null
@@ -1,470 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2010
- * Vipin Kumar, STMicroelectronics, vipin.ku...@st.com.
- *
- * (C) Copyright 2012
- * Amit Virdi, STMicroelectronics, amit.vi...@st.com.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-static u32 fsmc_version;
-static struct fsmc_regs *const fsmc_regs_p = (struct fsmc_regs *)
-   CONFIG_SYS_FSMC_BASE;
-
-/*
- * ECC4 and ECC1 have 13 bytes and 3 bytes of ecc respectively for 512 bytes of
- * data. ECC4 can correct up to 8 bits in 512 bytes of data while ECC1 can
- * correct 1 bit in 512 bytes
- */
-
-static struct nand_ecclayout fsmc_ecc4_lp_layout = {
-   .eccbytes = 104,
-   .eccpos = {  2,   3,   4,   5,   6,   7,   8,
-   9,  10,  11,  12,  13,  14,
-   18,  19,  20,  21,  22,  23,  24,
-   25,  26,  27,  28,  29,  30,
-   34,  35,  36,  37,  38,  39,  40,
-   41,  42,  43,  44,  45,  46,
-   50,  51,  52,  53,  54,  55,  56,
-   57,  58,  59,  60,  61,  62,
-   66,  67,  68,  69,  70,  71,  72,
-   73,  74,  75,  76,  77,  78,
-   82,  83,  84,  85,  86,  87,  88,
-   89,  90,  91,  92,  93,  94,
-   98,  99, 100, 101, 102, 103, 104,
-   105, 106, 107, 108, 109, 110,
-   114, 115, 116, 117, 118, 119, 120,
-   121, 122, 123, 124, 125, 126
-   },
-   .oobfree = {
-   {.offset = 15, .length = 3},
-   {.offset = 31, .length = 3},
-   {.offset = 47, .length = 3},
-   {.offset = 63, .length = 3},
-   {.offset = 79, .length = 3},
-   {.offset = 95, .length = 3},
-   {.offset = 111, .length = 3},
-   {.offset = 127, .length = 1}
-   }
-};
-
-/*
- * ECC4 layout for NAND of pagesize 4096 bytes & OOBsize 224 bytes. 13*8 bytes
- * of OOB size is reserved for ECC, Byte no. 0 & 1 reserved for bad block & 118
- * bytes are free for use.
- */
-static struct nand_ecclayout fsmc_ecc4_224_layout = {
-   .eccbytes = 104,
-   .eccpos = {  2,   3,   4,   5,   6,   7,   8,
-   9,  10,  11,  12,  13,  14,
-   18,  19,  20,  21,  22,  23,  24,
-   25,  26,  27,  28,  29,  30,
-   34,  35,  36,  37,  38,  39,  40,
-   41,  42,  43,  44,  45,  46,
-   50,  51,  52,  53,  54,  55,  56,
-   57,  58,  59,  60,  61,  62,
-   66,  67,  68,  69,  70,  71,  72,
-   73,  74,  75,  76,  77,  78,
-   82,  83,  84,  85,  86,  87,  88,
-   89,  90,  91,  92,  93,  94,
-   98,  99, 100, 101, 102, 103, 104,
-   105, 106, 107, 108, 109, 110,
-   114, 115, 116, 117, 118, 119, 120,
-   121, 122, 123, 124, 125, 126
-   },
-   .oobfree = {
-   {.offset = 15, .length = 3},
-   {.offset = 31, .length = 3},
-   {.offset = 47, .length = 3},
-   {.offset = 63, .length = 3},
-   {.offset = 79, .length = 3},
-   {.offset = 95, .length = 3},
-   {.offset = 111, .length = 3},
-   {.offset = 127, .length = 97}
-   }
-};
-
-/*
- * ECC placement definitions in oobfree type format
- * There are 13 bytes of ecc for every 512 byte block and it has to be read
- * consecutively and immediately after the 512 byte data block for hardware to
- * generate the error bit offsets in 512 byte data
- * Managing the ecc bytes in the following way makes it easier for software to
- * read ecc bytes consecutive to data bytes. This way is