From patchwork Thu Mar 21 12:14:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang Yang X-Patchwork-Id: 10863407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3B851708 for ; Thu, 21 Mar 2019 12:15:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74A17299D5 for ; Thu, 21 Mar 2019 12:15:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 689482A0D0; Thu, 21 Mar 2019 12:15:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15BEE29DDC for ; Thu, 21 Mar 2019 12:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=T2XtNNIuMDNU6TMLIQPOABHjIkCQeE7SpodYU0YJ9EE=; b=hy18Yux7ztDkal sZ1jewAPzWcXUh4dW1rNreOalNqPLbbq9duRg8w/19zqipcHgLSaoGEGB7WWG7EragluwnMRVYN3u HCUHxVA2hIvIECWc4ivnS2cdWgfz44g7V1xz8lLXQ/dJO/BXP+XeCBkjOGhL6V97IM5qvJxEP1Vx9 X/pM1FzkRCL3map9Bc5DV5gTiZGmnJN6mZOpIuTVusrA0DLHTnxYbYDbD/jPrvosE9z3JNadlhyoe s8rBIbFubRhUvD+q9+/nnKgvBjDC/MgNgmhTqzDTA+UcSNTozhPTcIDxzy0xQVce/AwS2XexBv2dK mtf92uU6iKnMDU+SVTrQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6wb7-0008Dj-Dn; Thu, 21 Mar 2019 12:15:01 +0000 Received: from mail-sz.amlogic.com ([211.162.65.117]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6wb3-0008DB-Nv; Thu, 21 Mar 2019 12:14:59 +0000 Received: from localhost.localdomain (10.28.8.21) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Thu, 21 Mar 2019 20:16:06 +0800 From: Liang Yang To: Boris Brezillon , Subject: [PATCH 1/1] mtd: rawnand: meson: set oob layout ops Date: Thu, 21 Mar 2019 20:14:01 +0800 Message-ID: <1553170441-23448-1-git-send-email-liang.yang@amlogic.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.28.8.21] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190321_051457_783392_27AEA927 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Hanjie Lin , Victor Wan , Jianxin Pan , Neil Armstrong , Martin Blumenstingl , Richard Weinberger , linux-kernel@vger.kernel.org, Marek Vasut , devicetree@vger.kernel.org, Liang Yang , Jian Hu , Kevin Hilman , Miquel Raynal , Carlo Caione , linux-amlogic@lists.infradead.org, Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Specify the oob layout operation to avoid no oob scheme defined for some nand flash. Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller") Signed-off-by: Liang Yang Tested-by: Martin Blumenstingl --- drivers/mtd/nand/raw/meson_nand.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c index 3e8aa71..a2154a2 100644 --- a/drivers/mtd/nand/raw/meson_nand.c +++ b/drivers/mtd/nand/raw/meson_nand.c @@ -1183,6 +1183,8 @@ static int meson_nand_attach_chip(struct nand_chip *nand) return -EINVAL; } + mtd_set_ooblayout(mtd, &meson_ooblayout_ops); + ret = meson_nand_bch_mode(nand); if (ret) return -EINVAL;