Lines Matching +full:device +full:- +full:addr
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2016-2017 Micron Technology, Inc.
14 #include <linux/device.h>
18 #include <linux/spi/spi-mem.h>
22 #include <spi-mem.h>
60 #define SPINAND_BLK_ERASE_OP(addr) \ argument
62 SPI_MEM_OP_ADDR(3, addr, 1), \
66 #define SPINAND_PAGE_READ_OP(addr) \ argument
68 SPI_MEM_OP_ADDR(3, addr, 1), \
72 #define SPINAND_PAGE_READ_FROM_CACHE_OP(fast, addr, ndummy, buf, len) \ argument
74 SPI_MEM_OP_ADDR(2, addr, 1), \
78 #define SPINAND_PAGE_READ_FROM_CACHE_OP_3A(fast, addr, ndummy, buf, len) \ argument
80 SPI_MEM_OP_ADDR(3, addr, 1), \
84 #define SPINAND_PAGE_READ_FROM_CACHE_X2_OP(addr, ndummy, buf, len) \ argument
86 SPI_MEM_OP_ADDR(2, addr, 1), \
90 #define SPINAND_PAGE_READ_FROM_CACHE_X2_OP_3A(addr, ndummy, buf, len) \ argument
92 SPI_MEM_OP_ADDR(3, addr, 1), \
96 #define SPINAND_PAGE_READ_FROM_CACHE_X4_OP(addr, ndummy, buf, len) \ argument
98 SPI_MEM_OP_ADDR(2, addr, 1), \
102 #define SPINAND_PAGE_READ_FROM_CACHE_X4_OP_3A(addr, ndummy, buf, len) \ argument
104 SPI_MEM_OP_ADDR(3, addr, 1), \
108 #define SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(addr, ndummy, buf, len) \ argument
110 SPI_MEM_OP_ADDR(2, addr, 2), \
114 #define SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP_3A(addr, ndummy, buf, len) \ argument
116 SPI_MEM_OP_ADDR(3, addr, 2), \
120 #define SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(addr, ndummy, buf, len) \ argument
122 SPI_MEM_OP_ADDR(2, addr, 4), \
126 #define SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP_3A(addr, ndummy, buf, len) \ argument
128 SPI_MEM_OP_ADDR(3, addr, 4), \
132 #define SPINAND_PROG_EXEC_OP(addr) \ argument
134 SPI_MEM_OP_ADDR(3, addr, 1), \
138 #define SPINAND_PROG_LOAD(reset, addr, buf, len) \ argument
140 SPI_MEM_OP_ADDR(2, addr, 1), \
144 #define SPINAND_PROG_LOAD_X4(reset, addr, buf, len) \ argument
146 SPI_MEM_OP_ADDR(2, addr, 1), \
182 * struct spinand_id - SPI NAND id structure
199 * struct spinand_devid - SPI NAND device id structure
200 * @id: device id of current chip
201 * @len: number of bytes in device id
207 * read_id opcode + 1-byte address.
218 * struct manufacurer_ops - SPI NAND manufacturer specific operations
219 * @init: initialize a SPI NAND device
220 * @cleanup: cleanup a SPI NAND device
231 * struct spinand_manufacturer - SPI NAND manufacturer instance
234 * @devid_len: number of bytes in device ID
269 * struct spinand_op_variants - SPI NAND operation variants
273 * Some operations like read-from-cache/write-to-cache have several variants
292 * spinand_ecc_info - description of the on-die ECC implemented by a SPI NAND
296 * -EBADMSG if there are uncorrectable errors. I can also return
299 * @ooblayout: the OOB layout used by the on-die ECC implementation
309 * struct spinand_info - Structure used to describe SPI NAND chips
311 * @devid: device ID
312 * @flags: OR-ing of the SPINAND_XXX flags
315 * @eccinfo: on-die ECC info
317 * @op_variants.read_cache: variants of the read-cache operation
318 * @op_variants.write_cache: variants of the write-cache operation
319 * @op_variants.update_cache: variants of the update-cache operation
321 * multi-die chips
378 * struct spinand_device - SPI NAND device instance
379 * @base: NAND device instance
392 * @eccinfo: on-die ECC information
397 * because the spi-mem interface explicitly requests that buffers
398 * passed in spi_mem_op be DMA-able, so we can't based the bufs on
435 * mtd_to_spinand() - Get the SPI NAND device attached to an MTD instance
438 * Return: the SPI NAND device attached to @mtd.
446 * spinand_to_mtd() - Get the MTD device embedded in a SPI NAND device
447 * @spinand: SPI NAND device
449 * Return: the MTD device embedded in @spinand.
453 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd()
457 * nand_to_spinand() - Get the SPI NAND device embedding an NAND object
460 * Return: the SPI NAND device embedding @nand.
468 * spinand_to_nand() - Get the NAND device embedded in a SPI NAND object
469 * @spinand: SPI NAND device
471 * Return: the NAND device embedded in @spinand.
476 return &spinand->base; in spinand_to_nand()
480 * spinand_set_of_node - Attach a DT node to a SPI NAND device
481 * @spinand: SPI NAND device
484 * Attach a DT node to a SPI NAND device.
489 nanddev_set_of_node(&spinand->base, np); in spinand_set_of_node()