[05/11] mtd: nand: Export symbol nand_decode_ext_id

Message ID 20220714075131.411548-5-michael@amarulasolutions.com
State New
Headers show
Series
  • [01/11] mtd: nand: Get rid of busw parameter
Related show

Commit Message

Michael Nazzareno Trimarchi July 14, 2022, 7:51 a.m. UTC
In preparation of moving specific nand support that are not jedec
or onfi

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 drivers/mtd/nand/raw/nand_base.c | 3 ++-
 include/linux/mtd/rawnand.h      | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Dario Binacchi July 14, 2022, 1:21 p.m. UTC | #1
Hi Michael,

On Thu, Jul 14, 2022 at 9:51 AM Michael Trimarchi
<michael@amarulasolutions.com> wrote:
>
> In preparation of moving specific nand support that are not jedec
> or onfi
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  drivers/mtd/nand/raw/nand_base.c | 3 ++-
>  include/linux/mtd/rawnand.h      | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
> index be1a6738c1..fa9ffb56fd 100644
> --- a/drivers/mtd/nand/raw/nand_base.c
> +++ b/drivers/mtd/nand/raw/nand_base.c
> @@ -4152,7 +4152,7 @@ static int nand_get_bits_per_cell(u8 cellinfo)
>   * chip. The rest of the parameters must be decoded according to generic or
>   * manufacturer-specific "extended ID" decoding patterns.
>   */
> -static void nand_decode_ext_id(struct nand_chip *chip)
> +void nand_decode_ext_id(struct nand_chip *chip)
>  {
>         struct mtd_info *mtd = &chip->mtd;
>         int extid, id_len;
> @@ -4278,6 +4278,7 @@ static void nand_decode_ext_id(struct nand_chip *chip)
>
>         }
>  }
> +EXPORT_SYMBOL_GPL(nand_decode_ext_id);
>
>  /*
>   * Manufacturer detection. Only used when the NAND is not ONFI or JEDEC
> diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
> index d8141cb4d1..8fb2a43296 100644
> --- a/include/linux/mtd/rawnand.h
> +++ b/include/linux/mtd/rawnand.h
> @@ -1374,4 +1374,7 @@ int nand_read_data_op(struct nand_chip *chip, void *buf, unsigned int len,
>  int nand_write_data_op(struct nand_chip *chip, const void *buf,
>                        unsigned int len, bool force_8bit);
>
> +/* Default extended ID decoding function */
> +void nand_decode_ext_id(struct nand_chip *chip);
> +
>  #endif /* __LINUX_MTD_RAWNAND_H */
> --
> 2.34.1
>

Looks good to me.

Dario

Patch

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index be1a6738c1..fa9ffb56fd 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4152,7 +4152,7 @@  static int nand_get_bits_per_cell(u8 cellinfo)
  * chip. The rest of the parameters must be decoded according to generic or
  * manufacturer-specific "extended ID" decoding patterns.
  */
-static void nand_decode_ext_id(struct nand_chip *chip)
+void nand_decode_ext_id(struct nand_chip *chip)
 {
 	struct mtd_info *mtd = &chip->mtd;
 	int extid, id_len;
@@ -4278,6 +4278,7 @@  static void nand_decode_ext_id(struct nand_chip *chip)
 
 	}
 }
+EXPORT_SYMBOL_GPL(nand_decode_ext_id);
 
 /*
  * Manufacturer detection. Only used when the NAND is not ONFI or JEDEC
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index d8141cb4d1..8fb2a43296 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -1374,4 +1374,7 @@  int nand_read_data_op(struct nand_chip *chip, void *buf, unsigned int len,
 int nand_write_data_op(struct nand_chip *chip, const void *buf,
 		       unsigned int len, bool force_8bit);
 
+/* Default extended ID decoding function */
+void nand_decode_ext_id(struct nand_chip *chip);
+
 #endif /* __LINUX_MTD_RAWNAND_H */