sf: Add a method to obtain the block-protect setting
authorSimon Glass <sjg@chromium.org>
Tue, 6 Nov 2018 22:21:41 +0000 (15:21 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Nov 2018 02:14:22 +0000 (19:14 -0700)
commita58986ca8b53d8c7a441397082f84edc7f47d19f
treec9ec3c59244371d8ad9992a2ba332a7b50d33950
parentf9d49f92f8cdf04a47704519a63368259595c3a0
sf: Add a method to obtain the block-protect setting

It is useful to obtain the block-protect setting of the SPI flash, so we
know whether it is fully open or (perhaps partially) write-protected. Add
a method for this. Update the sandbox driver to process this operation and
add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/include/asm/test.h
drivers/mtd/spi/sandbox.c
drivers/mtd/spi/sf-uclass.c
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/sf_probe.c
drivers/mtd/spi/spi_flash.c
include/spi_flash.h
test/dm/sf.c