projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fd62f1
)
mtd: nand: mtk-ecc: also parse nand-ecc-engine if available
author
Chuanhong Guo
<gch981213@gmail.com>
Sun, 24 Apr 2022 03:25:25 +0000
(11:25 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Wed, 27 Apr 2022 16:12:43 +0000
(18:12 +0200)
The recently added ECC engine support introduced a generic property
named nand-ecc-engine for ecc engine phandle. This patch adds support
for this new property.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20220424032527.673605-4-gch981213@gmail.com
drivers/mtd/nand/ecc-mtk.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/ecc-mtk.c
b/drivers/mtd/nand/ecc-mtk.c
index
491c2d6
..
02c1377
100644
(file)
--- a/
drivers/mtd/nand/ecc-mtk.c
+++ b/
drivers/mtd/nand/ecc-mtk.c
@@
-278,7
+278,10
@@
struct mtk_ecc *of_mtk_ecc_get(struct device_node *of_node)
struct mtk_ecc *ecc = NULL;
struct device_node *np;
- np = of_parse_phandle(of_node, "ecc-engine", 0);
+ np = of_parse_phandle(of_node, "nand-ecc-engine", 0);
+ /* for backward compatibility */
+ if (!np)
+ np = of_parse_phandle(of_node, "ecc-engine", 0);
if (np) {
ecc = mtk_ecc_get(np);
of_node_put(np);