u-boot-brain/test
Simon Glass b3b60f5912 sf: Support querying write-protect
This feature was dropped from U-Boot some time ago:

   f12f96cfaf (sf: Drop spl_flash_get_sw_write_prot")

However, we do need a way to see if a flash device is write-protected,
since if it is, it may not be possible to write to do (i.e. failing to
write is expected).

I am not sure of the correct layer to implement this, so this patch is a
stab at it. If spi-flash makes sense then I will add to the 'sf' also.

Re the points mentioned in the removal commit:

    1) This kind of requirement can be achieved using existing
       flash operations and flash locking API calls instead of
       making a separate flash API.

Which uclass is this?

    2) Technically there is no real hardware user for this API to
       use in the source tree.

I do want coral (at least) to support this.

    3) Having a flash operations API for simple register read bits
       also make difficult to extend the flash operations.

This new patch only mentions write-protect being on or off, rather than
the actual mechanism.

    4) Instead of touching generic code, it is possible to have
       this functionality inside spinor operations in the form of
       flash hooks or fixups for associated flash chips.

That sounds to me like what drivers are for. But we still need some sort
of API for it to be accessible.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27 15:04:31 +13:00
..
cmd test: Silenece the echo and print tests 2021-03-27 15:04:31 +13:00
dm sf: Support querying write-protect 2021-03-27 15:04:31 +13:00
env test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
fs Consistently use nproc for counting the CPUs 2020-01-30 13:30:35 -05:00
image spl: test: Add a test for spl_load_simple_fit() 2021-03-12 09:57:31 -05:00
lib test: Silenece the echo and print tests 2021-03-27 15:04:31 +13:00
log log: Handle line continuation 2021-03-12 17:41:35 -05:00
optee test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
overlay test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
py test: test the ESRT creation 2021-03-25 20:19:42 +01:00
stdint Remove <inttypes.h> includes and PRI* usages in printf() entirely 2018-09-10 20:48:17 -04:00
trace SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bloblist.c test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
bootm.c test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
cmd_ut.c Prepare v2021.04-rc4 2021-03-15 12:15:38 -04:00
command_ut.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
common.sh Consistently use nproc for counting the CPUs 2020-01-30 13:30:35 -05:00
compression.c test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
Kconfig test: linking test/compression.c fails 2020-11-05 09:11:31 -07:00
Makefile spl: test: Add a test for spl_load_simple_fit() 2021-03-12 09:57:31 -05:00
nokia_rx51_test.sh Nokia RX-51: Add test for U-Boot serial console 2021-01-12 10:59:04 +05:30
print_ut.c test: print_ut: Fix potential build error 2021-03-22 19:23:26 +13:00
run test: Run sandbox_spl tests on sandbox_noinst 2021-03-26 17:03:09 +13:00
str_ut.c test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
test-main.c dm: test: Avoid destroying uclasses with of-platdata-inst 2021-03-26 17:03:08 +13:00
time_ut.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
unicode_ut.c Prepare v2021.04-rc4 2021-03-15 12:15:38 -04:00
ut.c test: Move delay skipping to test_pre_run() 2021-03-12 09:57:30 -05:00