public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel RAYNAL <miquel.raynal@free-electrons.com>
To: Belisko Marek <marek.belisko@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Richard Weinberger <richard.weinberger@gmail.com>,
	Boris Brezillon <Boris.Brezillon@free-electrons.com>
Subject: Re: macronix ONFI nand flash OTP support
Date: Thu, 23 Nov 2017 10:30:34 +0100	[thread overview]
Message-ID: <20171123103034.11f26063@xps13> (raw)
In-Reply-To: <CAAfyv35tTTFobGsA1Qr5KB_KyR94YLAiGGezu1eik=8TZfnxqg@mail.gmail.com>

Hi Marek,

> >>
> >> I did check nand_do_read_ops function but it's not sending e.g.
> >> 0x30 which should be at the end of command. I'm using 4.1 kernel
> >> but checked also 4.14 and no such functionality is added even
> >> there. Nobody is using OTP area in nand flashes ;) ? Thanks for
> >> any pointers.  
> >
> > I suppose you added some tweaks to enable OTP and use
> > nand_do_read_ops, because there is currently no implementation for
> > that in the NAND framework (I think there is something in MTD layer
> > though). But must importantly, nand_do_read_ops basically calls
> > chip->ecc.read*() which is handled by the controller driver, so
> > what driver are you using ?
> >
> > How (where) did you trace the commands sent to the NAND chip ? For
> > instance, if you just looked at the arguments of ->cmdfunc(), it is
> > normal not to see any READSTART (0x30) command as it should be added
> > automatically later in the function. If the driver implements  
> > ->cmd_ctrl(), you may see there what exactly is sent to the
> > device.  
> Yes I checked ->cmdfunc() output. I think my changes would be
> beneficial for other so I'll cook some patches and post for review
> here.

Can you just tell us what controller driver are you using ?

You may want to have a look at [1], which hare the MTD hooks that I
guess you could fill with you OTP related read/writes. I think you
will also need some tweaks in nanddump (or a nandotpdump thing) to
ease the validation of the implementation.

[1]
http://elixir.free-electrons.com/linux/latest/source/include/linux/mtd/mtd.h#L314

Thank you,
Miquèl

  reply	other threads:[~2017-11-23  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 13:13 macronix ONFI nand flash OTP support Belisko Marek
2017-11-23  8:57 ` Miquel RAYNAL
2017-11-23  9:11   ` Belisko Marek
2017-11-23  9:30     ` Miquel RAYNAL [this message]
2017-11-23  9:40       ` Belisko Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171123103034.11f26063@xps13 \
    --to=miquel.raynal@free-electrons.com \
    --cc=Boris.Brezillon@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.belisko@gmail.com \
    --cc=richard.weinberger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox