Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5910573imu; Sun, 20 Jan 2019 23:13:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN4BzqgCtE0rxWOzuQr1pFRrov6plPfk/ArL9zFjxJkGhGT63Qo7aAAkwbMMp+/r57wDzC3M X-Received: by 2002:a17:902:2868:: with SMTP id e95mr29100500plb.317.1548054833149; Sun, 20 Jan 2019 23:13:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548054833; cv=none; d=google.com; s=arc-20160816; b=FWIQan/Q5VTvXrCooumaj3Yz/QKWpcNpdMMNj1FH/5jbP0MOpkwazrgD5CQf6r8zdq pd5LLrAg9uTMsggSLQjaUaKorZ4V4ALg04g45E0AK2hgMKc7caINEtx5NGTrfWVxXpRd h8rHc9WCnxcfXT0OpYzjIDZGpqYwk7g6vhe2HkKlxo5ZB+HyzUrtl7pAkA1v0Uk89GzN 5CFBlR0qJvuu7Xv5GKbFquMVJ9vxsLPiVn/3byBja4mnPblbR7fgUNrqsK0ArbBuIYZU 1gqha3hsOWvpopwQSk3ZBDo9ea1XwLu59DbMW1l55mHHl5L2UExt5bnPBBQGoLAgd7TF eEcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=hNK5faw4hFSOBOK912B0tZ/yjjxR6feiPy2LU0UJiOE=; b=asl50+KDZzGfydyZjfdMFaQFvpg1DnFDoLc7SAeyLvJIBdNT/lqce9okEOKGVjSGsG 9m6yTZXHmN9XtDWIiWN80NJbhGPRtSIR/XQ3gILYeSubzVaUf57SL9Ev34Lmt7nfIQGh mPFke3sTJ4LcXu9dvzTyMQcK4ZSZfA9wlCGlDylnpGY/rwiehD7COAsfBq8chCUEtK/k yTMciQYoJ8xBlBazL3G5HpjzhULZB7NkH1FTTrM7/q7CLPCc70E2ZtKeH3tdsjFvmURP rLm5mMJNSOhZkxnVaHMLZagKF4ayxPfRXSQ5WL65VEvEruaV+AuCreYu2pRujV5uFacB /QrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="YruTm/4N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23si8983237pgk.272.2019.01.20.23.13.38; Sun, 20 Jan 2019 23:13:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="YruTm/4N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727232AbfAUHLf (ORCPT + 99 others); Mon, 21 Jan 2019 02:11:35 -0500 Received: from condef-07.nifty.com ([202.248.20.72]:49611 "EHLO condef-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfAUHLe (ORCPT ); Mon, 21 Jan 2019 02:11:34 -0500 Received: from conuserg-07.nifty.com ([10.126.8.70])by condef-07.nifty.com with ESMTP id x0L4rHHu014595 for ; Mon, 21 Jan 2019 13:53:23 +0900 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x0L4qBI2028292; Mon, 21 Jan 2019 13:52:12 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x0L4qBI2028292 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1548046332; bh=hNK5faw4hFSOBOK912B0tZ/yjjxR6feiPy2LU0UJiOE=; h=From:To:Cc:Subject:Date:From; b=YruTm/4N0JaW1TJ5H8MfRo+phnImsq6kZw3VDa9/YmoRBEo0Zsq5qmZegsFCO+ujE Qgepzvu2Qbj9D9pXR3jnjp41C9O+1ppQhq6u+tAD+M11JRcGvgBDU7ROdxWoFA966Y p+dPFuIn7QAeB31VGkgT9/ywm/loqX3SZnH3Qtn8fw5TKjIWsm5IPTQ8Pxsn2q2CYi i4H5FtujPIFalAqszEEOucZncKPdOQ/A5KHkgAnyM0b4YLfbliuKKxMSGYqIFRGoCH +XhwoeqStvbubOPa3F1HbpdaZzPteEGJiLrowdmp3/5hcR3ij/nFB6eMSh5I1uAYws 6Y9NCsIVc2SZw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon , Miquel Raynal Cc: Masahiro Yamada , Brian Norris , linux-kernel@vger.kernel.org, Marek Vasut , Richard Weinberger , David Woodhouse , Boris Brezillon Subject: [PATCH] mtd: rawnand: denali: remove ->erase hook Date: Mon, 21 Jan 2019 13:52:06 +0900 Message-Id: <1548046326-26776-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit f9ebd1bb4103 ("mtd: rawnand: Deprecate ->erase()") discouraged the use of this hook, so I am happy to follow the suggestion. Although the Denali IP provides a special MAP10 command for erasing, using it would not buy us much. The Denali IP actually works with the generic erasing by single_erase() + ->cmdfunc hook (nand_command_lp) + ->cmd_ctrl hook (denali_cmd_ctrl). This method is also deprecated, but denali_erase() can go away irrespective of ->exec_op conversion. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/raw/denali.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index 6e8edc9..21320b1 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -37,9 +37,6 @@ #define DENALI_MAP11_ADDR ((DENALI_MAP11) | 1) /* address cycle */ #define DENALI_MAP11_DATA ((DENALI_MAP11) | 2) /* data cycle */ -/* MAP10 commands */ -#define DENALI_ERASE 0x01 - #define DENALI_BANK(denali) ((denali)->active_bank << 24) #define DENALI_INVALID_BANK -1 @@ -903,23 +900,6 @@ static int denali_waitfunc(struct nand_chip *chip) return irq_status & INTR__INT_ACT ? 0 : NAND_STATUS_FAIL; } -static int denali_erase(struct nand_chip *chip, int page) -{ - struct denali_nand_info *denali = mtd_to_denali(nand_to_mtd(chip)); - uint32_t irq_status; - - denali_reset_irq(denali); - - denali->host_write(denali, DENALI_MAP10 | DENALI_BANK(denali) | page, - DENALI_ERASE); - - /* wait for erase to complete or failure to occur */ - irq_status = denali_wait_for_irq(denali, - INTR__ERASE_COMP | INTR__ERASE_FAIL); - - return irq_status & INTR__ERASE_COMP ? 0 : -EIO; -} - static int denali_setup_data_interface(struct nand_chip *chip, int chipnr, const struct nand_data_interface *conf) { @@ -1244,7 +1224,6 @@ static int denali_attach_chip(struct nand_chip *chip) chip->ecc.write_page_raw = denali_write_page_raw; chip->ecc.read_oob = denali_read_oob; chip->ecc.write_oob = denali_write_oob; - chip->legacy.erase = denali_erase; ret = denali_multidev_fixup(denali); if (ret) -- 2.7.4