Lines Matching +full:non +full:- +full:flash
1 /* SPDX-License-Identifier: GPL-2.0 */
21 /* Standard SPI NOR flash operations. */
202 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
209 * @idx: Erase Type index as sorted in the Basic Flash Parameter
223 * struct spi_nor_erase_command - Used for non-uniform erases
226 * are run-length encoded.
241 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
245 * the last in the SPI NOR flash memory and to indicate
257 #define SNOR_ERASE_TYPE_MASK GENMASK_ULL(SNOR_ERASE_TYPE_MAX - 1, 0)
263 #define SNOR_ERASE_FLAGS_MASK GENMASK_ULL(SNOR_ERASE_FLAGS_MAX - 1, 0)
266 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
270 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
278 * uniform and non-uniform SPI NOR flash memories if they
290 * struct spi_nor_locking_ops - SPI NOR locking methods
302 * struct spi_nor_otp_organization - Structure to describe the SPI NOR OTP regions
317 * struct spi_nor_otp_ops - SPI NOR OTP methods
334 * struct spi_nor_otp - SPI NOR OTP grouping structure
344 * struct spi_nor_flash_parameter - SPI NOR flash parameters and settings.
345 * Includes legacy flash parameters and settings that can be overwritten
347 * Serial Flash Discoverable Parameters (SFDP) tables.
349 * @bank_size: the flash memory bank density in bytes.
350 * @size: the total flash memory density in bytes.
351 * @writesize Minimal writable flash unit size. Defaults to 1. Set to
352 * ECC unit size for ECC-ed flashes.
353 * @page_size: the page size of the SPI NOR flash memory.
356 * when the flash operates with 4B opcodes but needs the
364 * @n_dice: number of dice in the flash memory.
379 * @convert_addr: converts an absolute address into something the flash
381 * not a power-of-2.
390 * @priv: flash's private data.
425 * struct spi_nor_fixups - SPI NOR fixup hooks
426 * @default_init: called after default flash parameters init. Used to tweak
427 * flash parameters when information provided by the flash_info
435 * @late_init: used to initialize flash parameters that are not declared in the
452 * struct spi_nor_id - SPI NOR flash ID.
454 * @bytes: the bytes returned by the flash when issuing command 9F. Typically,
456 * two bytes are a flash part specific ID.
465 * struct flash_info - SPI NOR flash_info entry.
468 * @name: (obsolete) the name of the flash. Do not set it for new additions.
469 * @size: the size of the flash in bytes.
474 * @page_size: (optional) the flash's page size. Defaults to 256.
479 * SPI_NOR_HAS_LOCK: flash supports lock/unlock via SR
480 * SPI_NOR_HAS_TB: flash SR has Top/Bottom (TB) protect bit. Must be
484 * SPI_NOR_4BIT_BP: flash SR has 4 bit fields (BP0-3) for block
488 * SPI_NOR_SWP_IS_VOLATILE: flash has volatile software write protection bits.
489 * Usually these will power-up in a write-protected
493 * SPI_NOR_QUAD_PP: flash supports Quad Input Page Program.
494 * SPI_NOR_RWW: flash supports reads while write.
497 * Used when SFDP tables are not defined in the flash. These
501 * SPI_NOR_DUAL_READ: flash supports Dual Read.
502 * SPI_NOR_QUAD_READ: flash supports Quad Read.
503 * SPI_NOR_OCTAL_READ: flash supports Octal Read.
504 * SPI_NOR_OCTAL_DTR_READ: flash supports octal DTR Read.
505 * SPI_NOR_OCTAL_DTR_PP: flash supports Octal DTR Page Program.
508 * ideally, but can not be discovered for this particular flash
510 * defined by the flash. In case the table for this support is
516 * SPI_NOR_IO_MODE_EN_VOLATILE: flash enables the best available I/O mode
521 * @otp_org: flash's OTP organization.
579 * struct spi_nor_manufacturer - SPI NOR manufacturer object
593 * struct sfdp - SFDP data
706 * spi_nor_needs_sfdp() - returns true if SFDP parsing is used for this flash.
713 * The flash size is one property parsed by the SFDP. We use it as an in spi_nor_needs_sfdp()
714 * indicator whether we need SFDP parsing for a particular flash. I.e. in spi_nor_needs_sfdp()
715 * non-legacy flash entries in flash_info will have a size of zero iff in spi_nor_needs_sfdp()
718 return !nor->info->size; in spi_nor_needs_sfdp()