Lines Matching +full:has +full:- +full:chip +full:- +full:id

2  *  Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org>
6 * SPDX-License-Identifier: GPL-2.0+
29 /* Get the flash and manufacturer id and lookup if the type is supported. */
31 struct nand_chip *chip,
53 * is supported now. If you add a chip with bigger oobsize/page
65 /* Select the chip by setting nCE to low */
104 /* Extended commands for AG-AND device */
108 * until the remaining sequence of commands has been completed
115 /* multi-bank error status (banks 0-3) */
123 #define NAND_CMD_NONE -1
132 #define NAND_DATA_IFACE_CHECK_ONLY -1
158 * ecc.correct() returns -EBADMSG.
183 /* Chip has cache program function */
185 /* Chip has copy back function */
188 * Chip requires ready check on read (for auto-incremented sequential read).
194 /* Chip does not allow subpage writes */
219 #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) argument
220 #define NAND_HAS_SUBPAGE_READ(chip) ((chip->options & NAND_SUBPAGE_READ)) argument
221 #define NAND_HAS_SUBPAGE_WRITE(chip) !((chip)->options & NAND_NO_SUBPAGE_WRITE) argument
223 /* Non chip related options */
228 * (e.g. because it needs them DMA-coherent).
231 /* Chip may not exist, so silence any errors in scan */
247 /* bbt has already been read */
249 /* Nand scan has allocated controller struct */
273 /* Vendor-specific feature address (Micron) */
483 …* struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared am…
487 * progress used instead of the per chip wait queue
496 * struct nand_ecc_step_info - ECC step information of ECC engine
508 * struct nand_ecc_caps - capability of ECC engine
520 * struct nand_ecc_ctrl - Control structure for ECC
537 * corrected bitflips, -EBADMSG if the number of bitflips exceed
540 * If -EBADMSG is returned the input buffers should be left
544 * controller and always return contiguous in-band and
545 * out-of-band data even if they're not stored
546 * contiguously on the NAND chip (e.g.
547 * NAND_ECC_HW_SYNDROME interleaves in-band and
548 * out-of-band data).
552 * in-band and out-of-band data. ECC controller is
555 * NAND_ECC_HW_SYNDROME interleaves in-band and
556 * out-of-band data).
559 * any single ECC step, 0 if bitflips uncorrectable, -EIO hw error
565 * @write_oob_raw: function to write chip OOB data without ECC
566 * @read_oob_raw: function to read chip OOB data without ECC
567 * @read_oob: function to read chip OOB data
568 * @write_oob: function to write chip OOB data
587 int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip,
589 int (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip,
591 int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip,
593 int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip,
595 int (*write_subpage)(struct mtd_info *mtd, struct nand_chip *chip,
598 int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
600 int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip,
602 int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip,
604 int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page);
605 int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip,
611 return !(ecc->options & NAND_ECC_CUSTOM_PAGE_ACCESS); in nand_standard_page_accessors()
615 * struct nand_buffers - buffer structure for read/write
631 * struct nand_sdr_timings - SDR NAND chip timings
633 * This struct defines the timing requirements of a SDR NAND chip.
652 * @tCHZ_max: CE# high to output hi-Z
661 * @tIR_min: Output hi-Z to RE# low
668 * @tRHZ_max: RE# high to output hi-Z
723 * enum nand_data_interface_type - NAND interface timing type
731 * struct nand_data_interface - NAND interface timing
743 * nand_get_sdr_timings - get SDR timing from data interface
749 if (conf->type != NAND_SDR_IFACE) in nand_get_sdr_timings()
750 return ERR_PTR(-EINVAL); in nand_get_sdr_timings()
752 return &conf->timings.sdr; in nand_get_sdr_timings()
756 * struct nand_chip - NAND Private Flash Chip Data
763 * @read_byte: [REPLACEABLE] read one byte from the chip
764 * @read_word: [REPLACEABLE] read one word from the chip
765 * @write_byte: [REPLACEABLE] write a single byte to the chip on the
767 * @write_buf: [REPLACEABLE] write data from the buffer to the chip
768 * @read_buf: [REPLACEABLE] read data from the chip into the buffer
769 * @select_chip: [REPLACEABLE] select chip nr
777 * is read from the chip status register.
779 * commands to the chip.
783 * setting the read-retry mode. Mostly needed for MLC NAND.
787 * @hwcontrol: platform-specific hardware control structure
790 * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transferring
799 * @chip_shift: [INTERN] number of address bits in one chip
800 * @options: [BOARDSPECIFIC] various chip options. They can partly
819 * set to the actually used ONFI mode if the chip is
821 * the NAND chip is not ONFI compliant.
823 * @chipsize: [INTERN] the size of one chip for multichip arrays
824 * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1
830 * @onfi_version: [INTERN] holds the chip ONFI version (BCD encoded),
832 * @jedec_version: [INTERN] holds the chip JEDEC version (BCD encoded),
854 * @priv: [OPTIONAL] pointer to private chip data
855 * @write_page: [REPLACEABLE] High-level page write function
870 void (*select_chip)(struct mtd_info *mtd, int chip);
880 int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
883 int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip,
885 int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,
949 static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip) in nand_to_mtd() argument
951 return &chip->mtd; in nand_to_mtd()
954 static inline void *nand_get_controller_data(struct nand_chip *chip) in nand_get_controller_data() argument
956 return chip->priv; in nand_get_controller_data()
959 static inline void nand_set_controller_data(struct nand_chip *chip, void *priv) in nand_set_controller_data() argument
961 chip->priv = priv; in nand_set_controller_data()
965 * NAND Flash Manufacturer ID Codes
982 /* The maximum expected count of bytes in the NAND ID sequence */
986 * A helper for defining older NAND chips where the second ID byte fully
987 * defined the chip, including the geometry (chip size, eraseblock size, page
996 * eraseblock size via the extended ID bytes.
999 * EXTENDED_ID_NAND, manufacturers overloaded the same device ID so that the
1000 * device ID now only represented a particular total chip size (and voltage,
1002 * using the same device ID.
1010 #define NAND_ECC_STRENGTH(type) ((type)->ecc.strength_ds)
1011 #define NAND_ECC_STEP(type) ((type)->ecc.step_ds)
1014 * struct nand_flash_dev - NAND Flash Device ID Structure
1015 * @name: a human-readable name of the NAND chip
1016 * @dev_id: the device ID (the second byte of the full chip ID array)
1017 * @mfr_id: manufecturer ID part of the full chip ID array (refers the same
1018 * memory address as @id[0])
1019 * @dev_id: device ID part of the full chip ID array (refers the same memory
1020 * address as @id[1])
1021 * @id: full device ID array
1024 * chip ID array)
1025 * @chipsize: total chip size in MiB
1026 * @erasesize: eraseblock size in bytes (determined from the extended ID if 0)
1027 * @options: stores various chip bit options
1028 * @id_len: The valid length of the @id.
1049 uint8_t id[NAND_MAX_ID_LEN]; member
1065 * struct nand_manufacturers - NAND Flash Manufacturer ID Structure
1067 * @id: manufacturer ID code of device.
1070 int id; member
1093 * struct platform_nand_chip - chip level device structure
1095 * @chip_offset: chip number offset
1101 * @part_probe_types: NULL-terminated array of probe types
1118 * struct platform_nand_ctrl - controller level device structure
1123 * @select_chip: platform specific chip select function
1128 * @read_byte: platform specific function to read one byte from chip
1138 void (*select_chip)(struct mtd_info *mtd, int chip);
1147 * struct platform_nand_data - container structure for platform-specific data
1148 * @chip: chip level chip structure
1152 struct platform_nand_chip chip; member
1158 static inline int onfi_feature(struct nand_chip *chip) in onfi_feature() argument
1160 return chip->onfi_version ? le16_to_cpu(chip->onfi_params.features) : 0; in onfi_feature()
1164 static inline int onfi_get_async_timing_mode(struct nand_chip *chip) in onfi_get_async_timing_mode() argument
1166 if (!chip->onfi_version) in onfi_get_async_timing_mode()
1168 return le16_to_cpu(chip->onfi_params.async_timing_mode); in onfi_get_async_timing_mode()
1172 static inline int onfi_get_sync_timing_mode(struct nand_chip *chip) in onfi_get_sync_timing_mode() argument
1174 if (!chip->onfi_version) in onfi_get_sync_timing_mode()
1176 return le16_to_cpu(chip->onfi_params.src_sync_timing_mode); in onfi_get_sync_timing_mode()
1180 int onfi_init_data_interface(struct nand_chip *chip,
1190 static inline bool nand_is_slc(struct nand_chip *chip) in nand_is_slc() argument
1192 return chip->bits_per_cell == 1; in nand_is_slc()
1214 static inline int jedec_feature(struct nand_chip *chip) in jedec_feature() argument
1216 return chip->jedec_version ? le16_to_cpu(chip->jedec_params.features) in jedec_feature()
1237 int nand_check_ecc_caps(struct nand_chip *chip,
1240 int nand_match_ecc_req(struct nand_chip *chip,
1243 int nand_maximize_ecc(struct nand_chip *chip,
1247 int nand_reset(struct nand_chip *chip, int chipnr);
1250 int nand_reset_op(struct nand_chip *chip);
1251 int nand_readid_op(struct nand_chip *chip, u8 addr, void *buf,
1253 int nand_status_op(struct nand_chip *chip, u8 *status);
1254 int nand_exit_status_op(struct nand_chip *chip);
1255 int nand_erase_op(struct nand_chip *chip, unsigned int eraseblock);
1256 int nand_read_page_op(struct nand_chip *chip, unsigned int page,
1258 int nand_change_read_column_op(struct nand_chip *chip,
1261 int nand_read_oob_op(struct nand_chip *chip, unsigned int page,
1263 int nand_prog_page_begin_op(struct nand_chip *chip, unsigned int page,
1266 int nand_prog_page_end_op(struct nand_chip *chip);
1267 int nand_prog_page_op(struct nand_chip *chip, unsigned int page,
1270 int nand_change_write_column_op(struct nand_chip *chip,
1273 int nand_read_data_op(struct nand_chip *chip, void *buf, unsigned int len,
1275 int nand_write_data_op(struct nand_chip *chip, const void *buf,