Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3104928pxb; Mon, 4 Apr 2022 07:56:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbC11y+2DyyPB9fpiF8XZfiiwWfO/PH0ondmaGKIz0tSTWKIRpEQ/2XAfmz/rECCdwCAm5 X-Received: by 2002:a05:6402:42d4:b0:412:c26b:789 with SMTP id i20-20020a05640242d400b00412c26b0789mr521651edc.232.1649084175852; Mon, 04 Apr 2022 07:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649084175; cv=none; d=google.com; s=arc-20160816; b=oxq7/nrHuck9ITOPSvEC5eAceizs0Jz0RN3X6CM9+jGt+bgCwN7vq/1Fx7olkGID18 +L87RSe+VbqhqQNTpaeSEj59/1vYXfRXFF1mk1hVvt8PcViVQIfbtHpMw5TIaWTpLmCL fjfUr151AZ7D8ggvq+LjtHdUntRZzTBtuMYdE7IX9v2cV65dbme0eaNBht/vY0mSwWMP B1nPoQbc3Y0+bPku6YLzbRab0zBs+E9mom70xBErmI+opSHd8HENkXg8bIrr9nNe92p3 Gx4k9Zd+cEm618FzR3/TPjKe5Qu4PNr3/zQRYUfPzbbvsTpRVOyP3AiyUULSsTAnezax Hy9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tr9MXM2WGjlcOGtwp7Avizlxz3VlU8PL1ya73J3s4Ig=; b=b8sTpQRRDmamcdKyFk80IQlnu5sGztTkkGNiHfggfQjilsgjS6ewyG7laPmVosYHcy zluTbi7TriV7pfKvKYVviDDYwx6VfUMXRHfzk4cPa8lnsduSZYNZYC5ub43qu3jFjIkb +k70hZqtPmxs7w1Ej5hu66E+XdkbuuT0gwkeHNpZfwhMbAQApVmp/IClOfXpVKgs7b9m 7uT7pMU2amxTnciwxEQDU+qsHf+Ck7ZSk8uZVyAe/oZCxnRaRbNxji3QxgsEvSmyRi/E 5bIyiaOhrA1MADIWkCCluL97jv+ylQULdgLfEGKYx/HCwltH7gbYe5EOmnum6p0IFhet OGvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Xf91QF0i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a056402511300b00418c2b5bdddsi7107851edd.191.2022.04.04.07.55.49; Mon, 04 Apr 2022 07:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Xf91QF0i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351048AbiDDNVB (ORCPT + 99 others); Mon, 4 Apr 2022 09:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350689AbiDDNU7 (ORCPT ); Mon, 4 Apr 2022 09:20:59 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD99A3D1F9; Mon, 4 Apr 2022 06:19:02 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id n9so3439297plc.4; Mon, 04 Apr 2022 06:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tr9MXM2WGjlcOGtwp7Avizlxz3VlU8PL1ya73J3s4Ig=; b=Xf91QF0idYVwUahX8ttAZz14sSrH+eixEI3rSHYsili6Ih/R7nHWcCRBZxB9N5ECth RMptGkG0Ph1znURnR7mrrPpbijT4ZSnkpAz4zN0FEbMh5OBFK26CExBjTnO+tEzmm/1y ZzeVY792mP60j7vxBOwsGntJ0SMV649Vb/aobHBVLbQxL5OeDq1v25qlEWmAQkfs09A5 dKu4orpVuYkFl87bvFkrymuNEOQcsOFItsGjK9AA56iGyDP4f+qJxaDf7qcERdQ5ESsD Z1XCF341CYv3nlKNgo0unN0VwdfRVf6D5thUKlWPnj8bQOgXcZjZwzJRRb/FHmXwQJh/ Av8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tr9MXM2WGjlcOGtwp7Avizlxz3VlU8PL1ya73J3s4Ig=; b=31vatTs+2DE5UonsEp3tzuJxmZpY0j/3m5/MXqJTrPBMEFzNoV8srALQ0eJKNuK2wd 4On1hUCyBZ/BNHvqw0017CAQ5njo5ekguWDiAk5hCmJC+fOVUS6ccwN5jtKe5WUKyG7d y9wV2+stvOXtjygV7qoj87wLcBDr9zT4gTq0gKEz+0dKL8vN8ZvJ6zon6GiVnRaJdYTR EQs1BykaynDYNsqyVaXfTC63mkkcpCqAhKzaLO2khHj/nSLWzv+mtNc8dfusWEy2EDTM d07yylIq9XsecjGjl07YAgex+3o/7OIIwaFrMG9AqDLkeTvOf8vHhWm10+tgJaudYoiN +mmg== X-Gm-Message-State: AOAM53235pMs2qnnPOY9VYC/vrFfQ5BPAmMjBPPUfHmaBQ2HFXBkABKU jb+maDvW1JV+KuiAa9e/z5RLJXCsXRYJeUMZqV0= X-Received: by 2002:a17:902:c643:b0:156:b53e:60e1 with SMTP id s3-20020a170902c64300b00156b53e60e1mr2434713pls.43.1649078341990; Mon, 04 Apr 2022 06:19:01 -0700 (PDT) Received: from guoguo-omen.lan ([2401:c080:1400:4da2:b701:47d5:9291:4cf9]) by smtp.gmail.com with ESMTPSA id q13-20020a056a00088d00b004e1bea9c582sm12475705pfj.43.2022.04.04.06.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 06:19:01 -0700 (PDT) From: Chuanhong Guo To: linux-spi@vger.kernel.org Cc: Chuanhong Guo , Mark Brown , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Roger Quadros , Thomas Bogendoerfer , Cai Huoqing , Florian Fainelli , Colin Ian King , Wolfram Sang , Paul Cercueil , Pratyush Yadav , Yu Kuai , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-kernel@vger.kernel.org (open list), linux-mtd@lists.infradead.org (open list:NAND FLASH SUBSYSTEM) Subject: [PATCH v3 3/5] mtd: nand: mtk-ecc: also parse nand-ecc-engine if available Date: Mon, 4 Apr 2022 21:18:16 +0800 Message-Id: <20220404131818.1817794-4-gch981213@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220404131818.1817794-1-gch981213@gmail.com> References: <20220404131818.1817794-1-gch981213@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Change since v1: new patch Change since v2: 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