Lines Matching full:otp
3 * OTP support for SPI NOR flashes
14 #define spi_nor_otp_region_len(nor) ((nor)->params->otp.org->len)
15 #define spi_nor_otp_n_regions(nor) ((nor)->params->otp.org->n_regions)
28 * 256). Thus one "security register" maps to one OTP region.
166 * spi_nor_otp_lock_sr2() - lock the OTP region
168 * @region: OTP region
170 * Lock the OTP region by writing the status register-2. This method is used on
198 * spi_nor_otp_is_locked_sr2() - get the OTP region lock status
200 * @region: OTP region
202 * Retrieve the OTP region lock bit by reading the status register-2. This
225 const struct spi_nor_otp_organization *org = nor->params->otp.org; in spi_nor_otp_region_start()
235 /* Translate the file offsets from and to OTP regions. */
250 const struct spi_nor_otp_ops *ops = nor->params->otp.ops; in spi_nor_mtd_otp_info()
287 const struct spi_nor_otp_ops *ops = nor->params->otp.ops; in spi_nor_mtd_otp_range_is_locked()
292 * If any of the affected OTP regions are locked the entire range is in spi_nor_mtd_otp_range_is_locked()
312 const struct spi_nor_otp_ops *ops = nor->params->otp.ops; in spi_nor_mtd_otp_read_write()
344 * The OTP regions are mapped into a contiguous area starting in spi_nor_mtd_otp_read_write()
346 * file offsets to the address of an OTP region as used in the in spi_nor_mtd_otp_read_write()
353 * The size of a OTP region is expected to be a power of two, in spi_nor_mtd_otp_read_write()
359 /* don't access beyond one OTP region */ in spi_nor_mtd_otp_read_write()
398 const struct spi_nor_otp_ops *ops = nor->params->otp.ops; in spi_nor_mtd_otp_erase()
404 /* OTP erase is optional */ in spi_nor_mtd_otp_erase()
451 const struct spi_nor_otp_ops *ops = nor->params->otp.ops; in spi_nor_mtd_otp_lock()
487 if (!nor->params->otp.ops) in spi_nor_set_mtd_otp_ops()
497 * different variants. One with a factory locked OTP area and one where in spi_nor_set_mtd_otp_ops()
498 * it is left to the user to write to it. The factory locked OTP is in spi_nor_set_mtd_otp_ops()