From patchwork Mon Jan 21 04:52:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 156146 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5961343jaa; Sun, 20 Jan 2019 20:52:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN4zJr2DNpXDII+A7iR5kkTSCFLa0rfZ6WH2JFtoEnxcZPhRXbUSSUH58PiC+RqDPAfFuPOh X-Received: by 2002:a62:cd44:: with SMTP id o65mr28378912pfg.222.1548046370735; Sun, 20 Jan 2019 20:52:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548046370; cv=none; d=google.com; s=arc-20160816; b=G40mRF28k7sZamKAi47jUFJQD+qw3uo/xr+6/ARpEcARcOuveyY3+0uIAphS1O8hOW Oxn5l/67nsvDIUZxVvm7qynlsxxGM1ytnnZeNVKIgsc+Fk68uEj48zjn1oxw/Ht5hcAD bLI+Qbc5vw8x+sEG2oW+ij5GMdjfL3kXoLxIqhwE2XxpscjOhe00PNyzvwRqva1NU8Fa WWpcSI4KNkrq5t2FzuX2DNyLfAigbmH9CvrBySsNuxFFVBOv6F1qV81t4E3KMkd8SmX9 UYUdIppOXfjX+JQU2MAUR2sciYLK1BxKdVHKmYTmYeftWJ98qcp+bxgODis7oNOWbMtm v38g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter:dkim-signature; bh=5phU4snyc3PKZ1sTI7HhgIiS+T7tGKE17VjIgFIWdFM=; b=vTh/lpCu3BHgDY3AkytyPfugPHgKvqzYqW5i3MCKskjVD7qBTW4d8eE1SoMm1nwQbB 4b9+vkZakeljM6tdajuGiS+6Dyo4ILqmte4wr/Wr3iIt/8QVSUTHK+ubieRXbpYVWJEb CuOhJJ46sUj0GZm7gV0fmDP7qsgdJPps0m0TgDO+GxiOmUwtlif9S5ko6ctbm8OJgPLw jG1qxdBB79RvSUqp/+4O4Y3vEs1LfZDd9xsnExOxmjMLmoq/v4G8B9IGvVM6hBsLi4aO TCYnhvLGk4X+myr4wm6Xz4ATStCkfCB1m54VJMZCW2LY5Rai/wBNIJuOHnie07KLNIgZ 1h1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=VfTu9ZYL; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="YruTm/4N"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id a5si11521284pgg.120.2019.01.20.20.52.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jan 2019 20:52:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=VfTu9ZYL; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="YruTm/4N"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=5phU4snyc3PKZ1sTI7HhgIiS+T7tGKE17VjIgFIWdFM=; b=VfT u9ZYLBcylfgcZ8tG77cXfRJP4eu6V2GeQNWPwRuJ7hlOWCKCxlern+trlYc2UxMZP9/XfAdAvJdOX RTXnDnAH904NtrMFHc/jBRNASx6aeMAm3E14Ux0mzm/ugf0NMXj9Tu+oqqzVdXL6DqtZRjtnEULwU PYCTl/QPJXLaS6GOiRzVLYS4/wKDJsjpnqD9tj7RaY/t26MUWVgIPsP+d5aKUiq0+yq+tUn3gSU7c xoKHTPVrYWdmPE127nTzGLX+T8TDZIHL9P1B8n/6qOau2sAbnzNu9Q6k/GDDMRTCv2IrTdZ8v3PfK ftNOs039guR9uJcZ4V0LNtX2SdKGekA==; 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 1glRZc-0005ZP-5Y; Mon, 21 Jan 2019 04:52:36 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1glRZZ-0005Yx-0k for linux-mtd@lists.infradead.org; Mon, 21 Jan 2019 04:52:34 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190120_205233_397879_2A2E67D9 X-CRM114-Status: GOOD ( 10.40 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.74 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Richard Weinberger , Boris Brezillon , linux-kernel@vger.kernel.org, Masahiro Yamada , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.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(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ 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)