Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5953689imu; Mon, 21 Jan 2019 00:12:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN6sZqHvzIAoW1zuu2clhJQ0pldNUkI5HMREUEcsaebizeJlwX6GgJJB8GLtmzoGq09Qf+CL X-Received: by 2002:a65:43c5:: with SMTP id n5mr27957571pgp.250.1548058343416; Mon, 21 Jan 2019 00:12:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058343; cv=none; d=google.com; s=arc-20160816; b=yWuos5PAq10YiPVrCTSCDZbXBz/jPT5veVx8Ue9HFjCsLdAcWYuA+YV0EsP+3pxXS+ jSZVnnwUYu2jDiEBjLLIAp7HJl1D70zrss5U8XO6HoYau2l4seYQOtWq0uBalsi8W+7V mLg8rf8q3F74to31qe/TZLWZBmrdpgGCNv02imtb09OLoBLT/ocXVl3nGadPrVe24/t6 R4OVyiJaVlQs8YmK2BOxbrvhEhdcfo6Vs+VaYHDMElk9w2sA5cMU++CfbrLSFKnScipc gq25yhb/xvPCLWzQlPD0nxe/GhOkZEh8+UFOKPJJPp3AR1WWvbyoqgf18wsiuNX/M97y Ipyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xxBuHiU7Uak6x/GnL2VQ99MEOwgfzEOl7DuvRFdEkzg=; b=bK5URqSYzpKUxJl7jUew+KUFyxRPVxyGKfABUf3OTY1WRxLvcqwB4jxplz7m5Z/fP6 FaswWIyaj+/ff6E3nOA3++o4riI177F3CUHJBQLP+HQTpZ46yrLAb4SMKi1CD2LtT5z3 se7TvtYs1JxxGwESN+Thpm/5k2y2FhOeT6p0h+AgWruNB6R2E4omy0E/nzoXQO46eIHP ripqrGxjVPPOdn1B9C5xn3scqmg4qfopSeY9/Ps87A27kDT+8lOr2PL8+cRNLVHoZ3eB hiY6BtX2WAKX66qwgApHX1TUxZzfImw0sZk+/AE4qNMZHjoCK0J00PKahhMOtLpCWe6I iNRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IUqP+x95; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si3288124pgq.207.2019.01.21.00.12.08; Mon, 21 Jan 2019 00:12:23 -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=@kernel.org header.s=default header.b=IUqP+x95; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728275AbfAUIKY (ORCPT + 99 others); Mon, 21 Jan 2019 03:10:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:51550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726284AbfAUIKY (ORCPT ); Mon, 21 Jan 2019 03:10:24 -0500 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4390120823; Mon, 21 Jan 2019 08:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548058223; bh=CDRG7Y7DEjMUWnDIU9dXSY+scfnXpjjIKacUStsfXaM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IUqP+x95oZ62BYTRTfWYTGAeUhPhVvJtSS2vTjTYF8LLyQDertppR4v42eB/Uvw2t rrawqwJDddfzy2SSyoDd5x89VoF+Tf0Z+ORb+dTW1uI8DMLUCgHMyTytid+G4U7nOE V0UdaaIkWYewPgfHxaMsd8DXZpkxzIO3V2V9LIYE= Date: Mon, 21 Jan 2019 09:10:13 +0100 From: Boris Brezillon To: Masahiro Yamada Cc: linux-mtd@lists.infradead.org, Boris Brezillon , Miquel Raynal , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Brian Norris , David Woodhouse Subject: Re: [PATCH] mtd: rawnand: denali: remove ->erase hook Message-ID: <20190121091013.4a6f55a2@bbrezillon> In-Reply-To: <1548046326-26776-1-git-send-email-yamada.masahiro@socionext.com> References: <1548046326-26776-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Jan 2019 13:52:06 +0900 Masahiro Yamada wrote: > 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 Reviewed-by: Boris Brezillon > --- > > 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)