[PATCH] mtd: nand: refactor erase_cmd() to return chip status
Brian Norris
computersforpeace at gmail.com
Wed May 7 10:12:29 PDT 2014
(Your reply was multipart HTML/Text, so the list probably bounced you)
On Wed, May 07, 2014 at 11:59:56AM +0100, Lee Jones wrote:
> On 7 May 2014 00:12, "Brian Norris" <computersforpeace at gmail.com>
> wrote:
> >
> > The nand_chip::erase_cmd callback previously served a dual purpose; for
> > one, it allowed a per-flash-chip override, so that AG-AND devices could
> > use a different erase command than other NAND. These AND devices were
> > dropped in commit xxxxx. On the other hand, some drivers (denali and
> I think you still need to fill this in.
Yes... I should re-read my commit messages before sending! This should
be:
commit 14c6578683367b1e7af0c3c09e872b45a45183a7
(mtd: nand: remove AG-AND support)
> > doc-g4) need to use this sort of callback to implement
> > controller-specific erase operations.
> >
> > To make the latter operation easier for some drivers (e.g., ST's new BCH
> > NAND driver), it helps if the command dispatch and wait functions can be
> > lumped together, rather than called separately.
> >
> > This patch does two things:
> > Â 1. Pull the call to chip->waitfunc() into chip->erase_cmd(), and return
> > Â Â the status from this callback
> > Â 2. Rename erase_cmd() to just erase(), since this callback does a
> > Â Â little more than just send a command
> >
> > Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> > Cc: Mike Dunn <mikedunn at newsguy.com>
> > Cc: Lee Jones <lee.jones at linaro.org>
> > ---
> >  drivers/mtd/nand/denali.c   |  7 +++----
> >  drivers/mtd/nand/docg4.c   |  6 ++++--
> > Â drivers/mtd/nand/nand_base.c | 14 +++++++-------
> >  include/linux/mtd/nand.h   |  5 ++---
> > Â 4 files changed, 16 insertions(+), 16 deletions(-)
> If the code hasn't changed since the pastebin:
> Tested-by: Lee Jones <lee.jones at linaro.org>
It is the same.
I've updated my commit message locally. I'll give this a few days, then
push the patch.
Thanks,
Brian
More information about the linux-mtd
mailing list