Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380217 > unrolled thread

[PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping

Started byRafał Miłecki <zajec5@gmail.com>
First post2016-04-15 22:00 +0200
Last post2016-04-16 10:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping Rafał Miłecki <zajec5@gmail.com> - 2016-04-15 22:00 +0200
    Re: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as  "soft_bch" mapping Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-16 10:10 +0200
      Re: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as  "soft_bch" mapping Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-16 10:10 +0200

#1380217 — [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping

FromRafał Miłecki <zajec5@gmail.com>
Date2016-04-15 22:00 +0200
Subject[PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
Message-ID<roi4k-8kL-45@gated-at.bofh.it>
There isn't any difference between handling NAND_ECC_SOFT and
NAND_ECC_SOFT_BCH now. What matters is the new field called "algo".
Please note we're keeping backward DT compatibility. We are still
treating "soft_bch" value as the one setting Hamming algorithm, it's
just handled in of_get_nand_ecc_algo now.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 drivers/of/of_mtd.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c
index 15d056e..a70a38c 100644
--- a/drivers/of/of_mtd.c
+++ b/drivers/of/of_mtd.c
@@ -22,7 +22,6 @@ static const char *nand_ecc_modes[] = {
 	[NAND_ECC_HW]		= "hw",
 	[NAND_ECC_HW_SYNDROME]	= "hw_syndrome",
 	[NAND_ECC_HW_OOB_FIRST]	= "hw_oob_first",
-	[NAND_ECC_SOFT_BCH]	= "soft_bch",
 };
 
 /**
@@ -45,6 +44,14 @@ int of_get_nand_ecc_mode(struct device_node *np)
 		if (!strcasecmp(pm, nand_ecc_modes[i]))
 			return i;
 
+	/*
+	 * For backward compatibility we support few obsoleted values that don't
+	 * have their mappings into nand_ecc_modes_t anymore (they were merged
+	 * with other enums).
+	 */
+	if (!strcasecmp(pm, "soft_bch"))
+		return NAND_ECC_SOFT;
+
 	return -ENODEV;
 }
 EXPORT_SYMBOL_GPL(of_get_nand_ecc_mode);
-- 
1.8.4.5

[toc] | [next] | [standalone]


#1380505 — Re: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2016-04-16 10:10 +0200
SubjectRe: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
Message-ID<rotsK-p0-7@gated-at.bofh.it>
In reply to#1380217
On Fri, 15 Apr 2016 21:54:11 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:

> There isn't any difference between handling NAND_ECC_SOFT and
> NAND_ECC_SOFT_BCH now. What matters is the new field called "algo".
> Please note we're keeping backward DT compatibility. We are still
> treating "soft_bch" value as the one setting Hamming algorithm, it's
> just handled in of_get_nand_ecc_algo now.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>  drivers/of/of_mtd.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c

This series is getting rid of of_mtd{.c,.h}, so I'll move those changes
directly into nand_base.c when applying.

> index 15d056e..a70a38c 100644
> --- a/drivers/of/of_mtd.c
> +++ b/drivers/of/of_mtd.c
> @@ -22,7 +22,6 @@ static const char *nand_ecc_modes[] = {
>  	[NAND_ECC_HW]		= "hw",
>  	[NAND_ECC_HW_SYNDROME]	= "hw_syndrome",
>  	[NAND_ECC_HW_OOB_FIRST]	= "hw_oob_first",
> -	[NAND_ECC_SOFT_BCH]	= "soft_bch",
>  };
>  
>  /**
> @@ -45,6 +44,14 @@ int of_get_nand_ecc_mode(struct device_node *np)
>  		if (!strcasecmp(pm, nand_ecc_modes[i]))
>  			return i;
>  
> +	/*
> +	 * For backward compatibility we support few obsoleted values that don't
> +	 * have their mappings into nand_ecc_modes_t anymore (they were merged
> +	 * with other enums).
> +	 */
> +	if (!strcasecmp(pm, "soft_bch"))
> +		return NAND_ECC_SOFT;
> +
>  	return -ENODEV;
>  }
>  EXPORT_SYMBOL_GPL(of_get_nand_ecc_mode);



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1380506 — Re: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2016-04-16 10:10 +0200
SubjectRe: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
Message-ID<rotsK-p0-15@gated-at.bofh.it>
In reply to#1380505
On Sat, 16 Apr 2016 10:00:43 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Fri, 15 Apr 2016 21:54:11 +0200
> Rafał Miłecki <zajec5@gmail.com> wrote:
> 
> > There isn't any difference between handling NAND_ECC_SOFT and
> > NAND_ECC_SOFT_BCH now. What matters is the new field called "algo".
> > Please note we're keeping backward DT compatibility. We are still
> > treating "soft_bch" value as the one setting Hamming algorithm, it's
> > just handled in of_get_nand_ecc_algo now.
> > 
> > Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> > ---
> >  drivers/of/of_mtd.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c
> 
> This series is getting rid of of_mtd{.c,.h}, so I'll move those changes
> directly into nand_base.c when applying.

Oops, here is the link:
http://lkml.iu.edu/hypermail/linux/kernel/1604.0/00298.html

> 
> > index 15d056e..a70a38c 100644
> > --- a/drivers/of/of_mtd.c
> > +++ b/drivers/of/of_mtd.c
> > @@ -22,7 +22,6 @@ static const char *nand_ecc_modes[] = {
> >  	[NAND_ECC_HW]		= "hw",
> >  	[NAND_ECC_HW_SYNDROME]	= "hw_syndrome",
> >  	[NAND_ECC_HW_OOB_FIRST]	= "hw_oob_first",
> > -	[NAND_ECC_SOFT_BCH]	= "soft_bch",
> >  };
> >  
> >  /**
> > @@ -45,6 +44,14 @@ int of_get_nand_ecc_mode(struct device_node *np)
> >  		if (!strcasecmp(pm, nand_ecc_modes[i]))
> >  			return i;
> >  
> > +	/*
> > +	 * For backward compatibility we support few obsoleted values that don't
> > +	 * have their mappings into nand_ecc_modes_t anymore (they were merged
> > +	 * with other enums).
> > +	 */
> > +	if (!strcasecmp(pm, "soft_bch"))
> > +		return NAND_ECC_SOFT;
> > +
> >  	return -ENODEV;
> >  }
> >  EXPORT_SYMBOL_GPL(of_get_nand_ecc_mode);
> 
> 
> 



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web