Commit 4c5bf4b5 authored by Chuanhong Guo's avatar Chuanhong Guo Committed by Miquel Raynal

mtd: nand: mtk-ecc: also parse nand-ecc-engine if available

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: default avatarChuanhong Guo <gch981213@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220424032527.673605-4-gch981213@gmail.com
parent 4fd62f15
...@@ -278,6 +278,9 @@ struct mtk_ecc *of_mtk_ecc_get(struct device_node *of_node) ...@@ -278,6 +278,9 @@ struct mtk_ecc *of_mtk_ecc_get(struct device_node *of_node)
struct mtk_ecc *ecc = NULL; struct mtk_ecc *ecc = NULL;
struct device_node *np; struct device_node *np;
np = of_parse_phandle(of_node, "nand-ecc-engine", 0);
/* for backward compatibility */
if (!np)
np = of_parse_phandle(of_node, "ecc-engine", 0); np = of_parse_phandle(of_node, "ecc-engine", 0);
if (np) { if (np) {
ecc = mtk_ecc_get(np); ecc = mtk_ecc_get(np);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment