[PATCH v1 7/7] provide "sf protect check" command

Simon Glass sjg at chromium.org
Mon Feb 1 21:43:59 CET 2021


Hi,

On Thu, 28 Jan 2021 at 09:19, Bernhard Kirchen <schlimmchen at gmail.com> wrote:
>
> this change exposes checking the protection mechanism of SPI NOR flash
> chips to the CLI. it expands what was already there to communicate not
> only the protection state of a particular region, but also whether or
> not the hardware write protection mechanism of the chip is enabled.
>
> the new command works for Micron (and compatible) SPI NOR flash chips as
> well as the SST26* series of SPI NOR flash chips.
>
> the changes were tested on proprietary boards using a M25P16 and a
> SST26VF016B.
>
> Signed-off-by: Bernhard Kirchen <bernhard.kirchen at mbconnectline.com>
> ---
>
>  cmd/sf.c                       | 23 +++++++++++++++--
>  drivers/mtd/spi/spi-nor-core.c | 45 +++++++++++++++++++++++++---------
>  include/linux/mtd/spi-nor.h    | 17 ++++++++++++-
>  include/spi_flash.h            |  8 ++++++
>  4 files changed, 78 insertions(+), 15 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Can we get a sandbox test for this in test/dm/sf.c ?

Regards,
Simon


More information about the U-Boot mailing list