From patchwork Tue Nov 21 17:38:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 119391 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5583073qgn; Tue, 21 Nov 2017 09:54:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMb6KY52QypD8MEP3+BxwCd0Ls176ZPChAz3jb1bKT4mqjX/4KWTHqiJVFMPniKvhxOgp/Jv X-Received: by 10.80.179.246 with SMTP id t51mr25462058edd.176.1511286873892; Tue, 21 Nov 2017 09:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511286873; cv=none; d=google.com; s=arc-20160816; b=NEjJiAw1y4TkP9ATer+NaCk+KAr93V/9JttjBVMx+0F27TjU0aelAyd6zlN3DYyoP7 lnsKOxwx86A9EYbGPUQZJtQhqKIsdBnegS3/elKyZW0djhMS+sjhP6Z8M+oAmbDDA9Pb Cyj6zLNBDJNqYRZOk6C0MdeQOAZU2xvHX+An+nCtNlnvsLo21cHuCoRMyXhPlT673y97 x0CM3sl9zZMjLMftfPhGAEladyKSExExEJmDNkI/YIzDz5kY3AbHt+oF1r/m4hQcJkEf Uz1mpDQzg2Ipn5PR4VujXoSbxIL3niKJsGbSvQSicziQhc6IX2N98ebI80c3rKr8q7h/ WDng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=ZNEUY9swcBJPVHklTtzb3vTXJ/YwWETV94Ilm9xGqVM=; b=nlSNR1Ml/CcdLw/FuBDlRiR5M8uPJryh/ykYIkkXwEZTE4/9OJ2yjbufe+g033KI2j EwQ5dhok50w8TFAgvBH1+jF6E/KA610uI+IExeubTP66tZC2cJOTvdyThwhB+xL9APwL vp/ZapK/xn3Ys/9HhePYEek1Yg04Wd6ocz/JV/dSNXsyTNfh/MeYF44Ga5zuRGuk+fGZ gL0PxP/Ig49V92YBOTI2JkvhA1U8uA+la7q430XXxzS/J8pd4jM+Qr5AX4yOF5MyvYYy figl8z49Dm7l1G7J/uKJ0gH7yK49Fw08LSDaAn6/O5OUPnq7nSyTtSBpuhmj8nZVLBTa MNAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=TIIGFGfo; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id i35si4742871edd.292.2017.11.21.09.54.33; Tue, 21 Nov 2017 09:54:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=TIIGFGfo; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 647DBC21EE3; Tue, 21 Nov 2017 17:52:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 735A7C21D95; Tue, 21 Nov 2017 17:39:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 73594C21FE2; Tue, 21 Nov 2017 17:39:07 +0000 (UTC) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by lists.denx.de (Postfix) with ESMTPS id B561DC21F20 for ; Tue, 21 Nov 2017 17:39:03 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id vALHcbu5001225; Wed, 22 Nov 2017 02:38:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com vALHcbu5001225 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1511285924; bh=yvkW+Yga9w5eKndYN1zmtXhOwMkII/YdO50sHzaoJd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TIIGFGfortsp7i+67ut/vfaxt6603IQYB/Ng0soeHlzPpNi6Ijf7DZXkm+7VTKvMa VMtxi5efgHsZKQ+nYy9RXnf25p6R6aLRLBQhgznq1xMEYIyHbkcIiAbECLp7HPBx8o 80ah1V53QiDG/ZdjxUbYFcW9ZDUDAEET04QgkkEA4TvqHg2GNrFmEiAP/jkJXwxYvE giyZAB0EDxohOFBAyHM1Jxq10c5mmPQWUy5SJsFXa6xXh6fkFyuaYujvzTb9u6fwoS R6u93LqWQhXIXMVz54bNdlFxaxL2CaZ/T7trXpTaBG4jodgjCEE/cMteqpHVzu9H2R A9e2UKTuLi6xw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 22 Nov 2017 02:38:25 +0900 Message-Id: <1511285912-12452-16-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511285912-12452-1-git-send-email-yamada.masahiro@socionext.com> References: <1511285912-12452-1-git-send-email-yamada.masahiro@socionext.com> Cc: Scott Wood Subject: [U-Boot] [PATCH 15/22] mtd: nand: Drop the ->errstat() hook X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Boris Brezillon The ->errstat() hook is no longer implemented NAND controller drivers. Get rid of it before someone starts abusing it. Signed-off-by: Boris Brezillon [Linux commit: 7d135bcced20be2b50128432c5426a7278ec4f6d] [masahiro: modify davinci_nand.c for U-Boot] Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/davinci_nand.c | 7 ------- drivers/mtd/nand/nand_base.c | 15 --------------- include/linux/mtd/nand.h | 5 ----- 3 files changed, 27 deletions(-) diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 1e1f4b5..65104c6 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -394,13 +394,6 @@ static int nand_davinci_write_page(struct mtd_info *mtd, struct nand_chip *chip, chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); status = chip->waitfunc(mtd, chip); - /* - * See if operation failed and additional status checks are - * available. - */ - if ((status & NAND_STATUS_FAIL) && (chip->errstat)) - status = chip->errstat(mtd, chip, FL_WRITING, status, page); - if (status & NAND_STATUS_FAIL) { ret = -EIO; goto err; diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 0be427f..91afa47 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2442,13 +2442,6 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, if (nand_standard_page_accessors(&chip->ecc)) chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); status = chip->waitfunc(mtd, chip); - /* - * See if operation failed and additional status checks are - * available. - */ - if ((status & NAND_STATUS_FAIL) && (chip->errstat)) - status = chip->errstat(mtd, chip, FL_WRITING, status, - page); if (status & NAND_STATUS_FAIL) return -EIO; @@ -2924,14 +2917,6 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, status = chip->erase(mtd, page & chip->pagemask); - /* - * See if operation failed and additional status checks are - * available - */ - if ((status & NAND_STATUS_FAIL) && (chip->errstat)) - status = chip->errstat(mtd, chip, FL_ERASING, - status, page); - /* See if block erase succeeded */ if (status & NAND_STATUS_FAIL) { pr_debug("%s: failed erase, page 0x%08x\n", diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c4363cc..be30059 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -817,9 +817,6 @@ nand_get_sdr_timings(const struct nand_data_interface *conf) * structure which is shared among multiple independent * devices. * @priv: [OPTIONAL] pointer to private chip data - * @errstat: [OPTIONAL] hardware specific function to perform - * additional error status checks (determine if errors are - * correctable). * @write_page: [REPLACEABLE] High-level page write function */ @@ -845,8 +842,6 @@ struct nand_chip { int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this); int (*erase)(struct mtd_info *mtd, int page); int (*scan_bbt)(struct mtd_info *mtd); - int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, - int status, int page); int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, uint32_t offset, int data_len, const uint8_t *buf, int oob_required, int page, int raw);