summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/sf_probe.c
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2020-05-13 18:16:39 +0530
committerJagan Teki <jagan@amarulasolutions.com>2020-06-01 17:55:24 +0530
commitf12f96cfaf53d47aa58eb640744542446aac44dd (patch)
treee070bd9a91c4b50f9a509ead487315c6cfbf9616 /drivers/mtd/spi/sf_probe.c
parent3ee152b965a13c43f9251d40e4c49486c71e5dac (diff)
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>
Diffstat (limited to 'drivers/mtd/spi/sf_probe.c')
-rw-r--r--drivers/mtd/spi/sf_probe.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index ee7cbaf3f60..4e9973bb62a 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -130,13 +130,6 @@ static int spi_flash_std_erase(struct udevice *dev, u32 offset, size_t len)
return mtd->_erase(mtd, &instr);
}
-static int spi_flash_std_get_sw_write_prot(struct udevice *dev)
-{
- struct spi_flash *flash = dev_get_uclass_priv(dev);
-
- return spi_flash_cmd_get_sw_write_prot(flash);
-}
-
int spi_flash_std_probe(struct udevice *dev)
{
struct spi_slave *slave = dev_get_parent_priv(dev);
@@ -162,7 +155,6 @@ static const struct dm_spi_flash_ops spi_flash_std_ops = {
.read = spi_flash_std_read,
.write = spi_flash_std_write,
.erase = spi_flash_std_erase,
- .get_sw_write_prot = spi_flash_std_get_sw_write_prot,
};
static const struct udevice_id spi_flash_std_ids[] = {