From: <Tudor.Ambarus@microchip.com>
To: <palmer@sifive.com>, <marek.vasut@gmail.com>
Cc: <wesley@sifive.com>, <richard@nod.at>,
<linux-kernel@vger.kernel.org>, <bbrezillon@kernel.org>,
<linux-mtd@lists.infradead.org>, <paul.walmsley@sifive.com>,
<computersforpeace@gmail.com>, <dwmw2@infradead.org>
Subject: Re: [PATCH v2 1/2] spi-nor: add support for ISSI's block unlocking scheme
Date: Wed, 13 Feb 2019 16:23:37 +0000 [thread overview]
Message-ID: <35446d76-5712-c51f-e1ab-f81a53b1a4aa@microchip.com> (raw)
In-Reply-To: <20180807194059.26348-2-palmer@sifive.com>
Hi, Wesley, Palmer,
On 08/07/2018 10:40 PM, Palmer Dabbelt wrote:
First of all, thanks for the patience!
> From: "Wesley W. Terpstra" <wesley@sifive.com>
>
> ISSI uses a non-standard scheme to control block protection, with bit 5
> of the status registerr controlling an additional block protection bit.
Indeed, issi's block protection (BP3, BP2, BP1, BP0) bits are used in a
different way than how are used in stm_lock/unlock, even with the 4bit block
protection on its way (see [1]).
> This patch disables all the block protection bits whenever an ISSI chip
> is seen.
IS25WP256's datasheet says that "The default value of the BP0, BP1, BP2, BP3,
QE, and SRWD bits were set to “0”
at factory.", which means that all memory blocks come unprotected (unlocked) by
default.
I see your patch as an extra safety measure for people that somehow
unfortunately set these block protection bits, so that they not end up with
locked blocks. Instead of adding this extra safety check/set, I would suggest to
actually add support for the issi's block protection scheme. In a perfect world,
this would fit in a per-manufacturer hook after the per-manufacturer split up
code will be integrated (see [2]).
>
> We might also want to trigger an error when writing SR_TB to these
> chips, as it aliases with this extra protection bit in the status
> register. It looks like that's always conditional on SNOR_F_HAS_SR_TB,
> so at least what's there is safe.
This problem will vanish when you'll have the issi's protection scheme implemented.
Cheers,
ta
[1] https://patchwork.ozlabs.org/patch/1011820/
[2] https://patchwork.ozlabs.org/project/linux-mtd/list/?series=80353
next prev parent reply other threads:[~2019-02-13 16:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 19:40 [PATCH v2 0/2] spi-nor: add support for is25wp256 Palmer Dabbelt
2018-08-07 19:40 ` [PATCH v2 1/2] spi-nor: add support for ISSI's block unlocking scheme Palmer Dabbelt
2019-02-13 16:23 ` Tudor.Ambarus [this message]
2018-08-07 19:40 ` [PATCH v2 2/2] spi-nor: add support for is25wp256 Palmer Dabbelt
2019-02-13 17:27 ` Tudor.Ambarus
2019-02-13 17:37 ` Tudor.Ambarus
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=35446d76-5712-c51f-e1ab-f81a53b1a4aa@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=palmer@sifive.com \
--cc=paul.walmsley@sifive.com \
--cc=richard@nod.at \
--cc=wesley@sifive.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
all inboxes | Powered by JetHome®