* [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
[not found] ` <1460750052-16285-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-04-15 19:54 ` Rafał Miłecki
[not found] ` <1460750052-16285-12-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2016-04-15 19:54 UTC (permalink / raw)
To: Boris Brezillon
Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Rafał Miłecki, Rob Herring, Frank Rowand, Grant Likely,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, open list
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
[not found] ` <1460750052-16285-12-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-04-16 8:00 ` Boris Brezillon
2016-04-16 8:01 ` Boris Brezillon
0 siblings, 1 reply; 5+ messages in thread
From: Boris Brezillon @ 2016-04-16 8:00 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
Frank Rowand, Grant Likely,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, open list
On Fri, 15 Apr 2016 21:54:11 +0200
Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
2016-04-16 8:00 ` Boris Brezillon
@ 2016-04-16 8:01 ` Boris Brezillon
0 siblings, 0 replies; 5+ messages in thread
From: Boris Brezillon @ 2016-04-16 8:01 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
Frank Rowand, Grant Likely,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, open list
On Sat, 16 Apr 2016 10:00:43 +0200
Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> On Fri, 15 Apr 2016 21:54:11 +0200
> Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V2 10/11] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
[not found] ` <1460913104-27388-1-git-send-email-zajec5@gmail.com>
@ 2016-04-17 17:11 ` Rafał Miłecki
[not found] ` <1460926387-9563-1-git-send-email-zajec5@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2016-04-17 17:11 UTC (permalink / raw)
To: Boris Brezillon
Cc: linux-mtd, Rafał Miłecki, Rob Herring, Frank Rowand,
Grant Likely, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V3 10/11] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
[not found] ` <1460926387-9563-1-git-send-email-zajec5@gmail.com>
@ 2016-04-17 20:53 ` Rafał Miłecki
0 siblings, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2016-04-17 20:53 UTC (permalink / raw)
To: Boris Brezillon
Cc: linux-mtd, Rafał Miłecki, Rob Herring, Frank Rowand,
Grant Likely, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-17 20:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1460750052-16285-1-git-send-email-zajec5@gmail.com>
[not found] ` <1460750052-16285-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-15 19:54 ` [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping Rafał Miłecki
[not found] ` <1460750052-16285-12-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-16 8:00 ` Boris Brezillon
2016-04-16 8:01 ` Boris Brezillon
[not found] ` <1460913104-27388-1-git-send-email-zajec5@gmail.com>
2016-04-17 17:11 ` [PATCH V2 10/11] " Rafał Miłecki
[not found] ` <1460926387-9563-1-git-send-email-zajec5@gmail.com>
2016-04-17 20:53 ` [PATCH V3 " Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).