• Home
  • Raw
  • Download

Lines Matching +full:device +full:- +full:addr

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2016-2017 Micron Technology, Inc.
13 #include <linux/device.h>
17 #include <linux/spi/spi-mem.h>
53 #define SPINAND_BLK_ERASE_OP(addr) \ argument
55 SPI_MEM_OP_ADDR(3, addr, 1), \
59 #define SPINAND_PAGE_READ_OP(addr) \ argument
61 SPI_MEM_OP_ADDR(3, addr, 1), \
65 #define SPINAND_PAGE_READ_FROM_CACHE_OP(fast, addr, ndummy, buf, len) \ argument
67 SPI_MEM_OP_ADDR(2, addr, 1), \
71 #define SPINAND_PAGE_READ_FROM_CACHE_OP_3A(fast, addr, ndummy, buf, len) \ argument
73 SPI_MEM_OP_ADDR(3, addr, 1), \
77 #define SPINAND_PAGE_READ_FROM_CACHE_X2_OP(addr, ndummy, buf, len) \ argument
79 SPI_MEM_OP_ADDR(2, addr, 1), \
83 #define SPINAND_PAGE_READ_FROM_CACHE_X2_OP_3A(addr, ndummy, buf, len) \ argument
85 SPI_MEM_OP_ADDR(3, addr, 1), \
89 #define SPINAND_PAGE_READ_FROM_CACHE_X4_OP(addr, ndummy, buf, len) \ argument
91 SPI_MEM_OP_ADDR(2, addr, 1), \
95 #define SPINAND_PAGE_READ_FROM_CACHE_X4_OP_3A(addr, ndummy, buf, len) \ argument
97 SPI_MEM_OP_ADDR(3, addr, 1), \
101 #define SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(addr, ndummy, buf, len) \ argument
103 SPI_MEM_OP_ADDR(2, addr, 2), \
107 #define SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP_3A(addr, ndummy, buf, len) \ argument
109 SPI_MEM_OP_ADDR(3, addr, 2), \
113 #define SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(addr, ndummy, buf, len) \ argument
115 SPI_MEM_OP_ADDR(2, addr, 4), \
119 #define SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP_3A(addr, ndummy, buf, len) \ argument
121 SPI_MEM_OP_ADDR(3, addr, 4), \
125 #define SPINAND_PROG_EXEC_OP(addr) \ argument
127 SPI_MEM_OP_ADDR(3, addr, 1), \
131 #define SPINAND_PROG_LOAD(reset, addr, buf, len) \ argument
133 SPI_MEM_OP_ADDR(2, addr, 1), \
137 #define SPINAND_PROG_LOAD_X4(reset, addr, buf, len) \ argument
139 SPI_MEM_OP_ADDR(2, addr, 1), \
180 * For reset, 5us/10us/500us if the device is respectively
182 * issue a RESET when the device is IDLE, 5us is selected for both initial
197 * struct spinand_id - SPI NAND id structure
214 * struct spinand_devid - SPI NAND device id structure
215 * @id: device id of current chip
216 * @len: number of bytes in device id
222 * read_id opcode + 1-byte address.
233 * struct manufacurer_ops - SPI NAND manufacturer specific operations
234 * @init: initialize a SPI NAND device
235 * @cleanup: cleanup a SPI NAND device
246 * struct spinand_manufacturer - SPI NAND manufacturer instance
249 * @devid_len: number of bytes in device ID
275 * struct spinand_op_variants - SPI NAND operation variants
279 * Some operations like read-from-cache/write-to-cache have several variants
298 * spinand_ecc_info - description of the on-die ECC implemented by a SPI NAND
302 * -EBADMSG if there are uncorrectable errors. I can also return
305 * @ooblayout: the OOB layout used by the on-die ECC implementation
316 * struct spinand_ondie_ecc_conf - private SPI-NAND on-die ECC engine structure
318 * ->get_status() is not populated by the spinand device.
325 * struct spinand_info - Structure used to describe SPI NAND chips
327 * @devid: device ID
328 * @flags: OR-ing of the SPINAND_XXX flags
331 * @eccinfo: on-die ECC info
333 * @op_variants.read_cache: variants of the read-cache operation
334 * @op_variants.write_cache: variants of the write-cache operation
335 * @op_variants.update_cache: variants of the update-cache operation
337 * multi-die chips
401 * struct spinand_device - SPI NAND device instance
402 * @base: NAND device instance
415 * @eccinfo: on-die ECC information
420 * because the spi-mem interface explicitly requests that buffers
421 * passed in spi_mem_op be DMA-able, so we can't based the bufs on
456 * mtd_to_spinand() - Get the SPI NAND device attached to an MTD instance
459 * Return: the SPI NAND device attached to @mtd.
467 * spinand_to_mtd() - Get the MTD device embedded in a SPI NAND device
468 * @spinand: SPI NAND device
470 * Return: the MTD device embedded in @spinand.
474 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd()
478 * nand_to_spinand() - Get the SPI NAND device embedding an NAND object
481 * Return: the SPI NAND device embedding @nand.
489 * spinand_to_nand() - Get the NAND device embedded in a SPI NAND object
490 * @spinand: SPI NAND device
492 * Return: the NAND device embedded in @spinand.
497 return &spinand->base; in spinand_to_nand()
501 * spinand_set_of_node - Attach a DT node to a SPI NAND device
502 * @spinand: SPI NAND device
505 * Attach a DT node to a SPI NAND device.
510 nanddev_set_of_node(&spinand->base, np); in spinand_set_of_node()