public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] SPI flash protection
Date: Tue, 15 Feb 2011 03:42:10 -0500	[thread overview]
Message-ID: <201102150342.11198.vapier@gentoo.org> (raw)
In-Reply-To: <20110129170048.GE20942@kw.sim.vm.gnt>

On Saturday, January 29, 2011 12:00:48 Simon Guinot wrote:
> It is not clear for me how to proceed. Disable the write protection from
> the board setup code could be an idea but a problem is that the SPI flash
> API don't export any helpful method...
> Maybe I should add one ?
> 
> An another idea is disabling the write protection anyway while
> initializing the flash (from the low level macronix driver). It is quite
> straightforward but I don't know if a flash driver is allowed to do
> that. After all, a flash could be protected for some good reasons.

current behavior is for SPI flash drivers to clear all protection bits during 
init.  sst.c does exactly this.

if you wanted to extend the SPI flash API to include protect support as well 
as add a "protect" subcommand to "sf" (all of this would be behind a define 
like CONFIG_SPI_FLASH_PROTECTION), that'd be great.  otherwise, in the short 
term, i'd suggest you implement something like sst_unlock in the macronix 
driver.  i can take care of merging that.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110215/9838f17a/attachment.pgp 

      parent reply	other threads:[~2011-02-15  8:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-29 17:00 [U-Boot] SPI flash protection Simon Guinot
2011-01-30  9:36 ` Albert ARIBAUD
2011-01-30 14:56   ` Simon Guinot
2011-01-30 17:19     ` Albert ARIBAUD
2011-01-31  0:31       ` Simon Guinot
2011-01-31  6:52         ` Albert ARIBAUD
2011-01-31  7:17           ` Reinhard Meyer
2011-02-01  9:09             ` Simon Guinot
2011-02-01 12:26               ` Albert ARIBAUD
2011-02-15  8:42 ` Mike Frysinger [this message]

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=201102150342.11198.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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