]> git.dujemihanovic.xyz Git - u-boot.git/commit
sf: Drop spl_flash_get_sw_write_prot
authorJagan Teki <jagan@amarulasolutions.com>
Wed, 13 May 2020 12:46:39 +0000 (18:16 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 1 Jun 2020 12:25:24 +0000 (17:55 +0530)
commitf12f96cfaf53d47aa58eb640744542446aac44dd
treee070bd9a91c4b50f9a509ead487315c6cfbf9616
parent3ee152b965a13c43f9251d40e4c49486c71e5dac
sf: Drop spl_flash_get_sw_write_prot

The get_sw_write_prot API is used to get the write-protected
bits of flash by reading the status register and other wards
it's API for reading register bits.

1) This kind of requirement can be achieved using existing
   flash operations and flash locking API calls instead of
   making a separate flash API.
2) Technically there is no real hardware user for this API to
   use in the source tree.
3) Having a flash operations API for simple register read bits
   also make difficult to extend the flash operations.
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.

Considering all these points, this patch drops the get_sw_write_prot
and associated code bases.

Cc: Simon Glass <sjg@chromium.org>
Cc: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/sf-uclass.c
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/sf_probe.c
drivers/mtd/spi/spi-nor-core.c
drivers/mtd/spi/spi-nor-tiny.c
include/spi_flash.h
test/dm/sf.c