[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220409120819.3124209-4-gch981213@gmail.com>
Date: Sat, 9 Apr 2022 20:08:17 +0800
From: Chuanhong Guo <gch981213@...il.com>
To: linux-spi@...r.kernel.org
Cc: Chuanhong Guo <gch981213@...il.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Roger Quadros <rogerq@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Cai Huoqing <cai.huoqing@...ux.dev>,
Florian Fainelli <f.fainelli@...il.com>,
Colin Ian King <colin.king@...el.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Paul Cercueil <paul@...pouillou.net>,
Pratyush Yadav <p.yadav@...com>, Yu Kuai <yukuai3@...wei.com>,
devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED
DEVICE TREE BINDINGS),
linux-arm-kernel@...ts.infradead.org (moderated list:ARM/Mediatek SoC
support),
linux-mediatek@...ts.infradead.org (moderated list:ARM/Mediatek SoC
support), linux-kernel@...r.kernel.org (open list),
linux-mtd@...ts.infradead.org (open list:NAND FLASH SUBSYSTEM)
Subject: [PATCH v5 3/5] 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: Chuanhong Guo <gch981213@...il.com>
---
Change since v1:
new patch
Change in v2-v5: None
drivers/mtd/nand/ecc-mtk.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/ecc-mtk.c b/drivers/mtd/nand/ecc-mtk.c
index 74ddaa46ba7c..9f9b201fe706 100644
--- a/drivers/mtd/nand/ecc-mtk.c
+++ b/drivers/mtd/nand/ecc-mtk.c
@@ -279,7 +279,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);
--
2.35.1
Powered by blists - more mailing lists