diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-08 13:39:20 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-08 13:39:20 -0400 |
| commit | f4e70c2e5f1406e715f6359ae341e76e5004fb98 (patch) | |
| tree | 79622d866d0cb8bdb494718e11d458770aee9713 /include/linux/mtd/rawnand.h | |
| parent | ea125dedbc14b305307889c40d74d564c4419851 (diff) | |
| parent | b771327a4530e7ff05ae173d4903cd70357bb803 (diff) | |
Merge tag 'mtd/for-4.18' of git://git.infradead.org/linux-mtd
Pull MTD updates from Boris Brezillon:
"Core changes:
- Add a sysfs attribute to expose available OOB size
Driver changes:
- Remove HAS_DMA dependency on various drivers
- Use dev_get_drvdata() instead of platform_get_drvdata() in docg3
- Replace msleep by usleep_range() in the dataflash driver
- Avoid VLA usage in nftl layers
- Remove useless .owner assignment in pismo
- Fix various issues in the CFI driver
- Improve TRX partition handling expose a DT compat for this part
parser
- Clarify OFFSET_CONTINUOUS meaning
NAND core changes:
- Add Miquel as a NAND maintainer
- Add access mode to the nand_page_io_req struct
- Fix kernel-doc in rawnand.h
- Support bit-wise majority to recover from corrupted ONFI parameter
pages
- Stop checking FAIL bit after a SET_FEATURES, as documented in the
ONFI spec
Raw NAND Driver changes:
- Fix and cleanup the error path of many NAND controller drivers
- GPMI:
+ Cleanup/simplification of a few aspects in the driver
+ Take ECC setup specified in the DT into account
- sunxi: remove support for GPIO-based R/B polling
- MTK:
+ Use of_device_get_match_data() instead of of_match_device()
+ Add an entry in MAINTAINERS for this driver
+ Fix nand-ecc-step-size and nand-ecc-strength description in the
DT bindings doc
- fsl_ifc: fix ->cmdfunc() to read more than one ONFI parameter page
OneNAND driver changes:
- samsung: use dev_get_drvdata() instead of platform_get_drvdata()
SPI NOR core changes:
- Add support for a bunch of SPI NOR chips
- Clear EAR reg when switching to 3-byte addressing mode on Winbond
chips
SPI NOR controller driver changes:
- cadence: Add DMA support for direct mode reads
- hisi: Prefix a few functions with hisi_
- intel:
+ Mark the driver as "dangerous" in Kconfig
+ Fix atomic sequence handling
+ Pass a 40us delay (instead of 0us) to readl_poll_timeout()
- fsl:
+ fix a typo in a function name
+ add support for IP variants embedded in the ls2080a and ls1080a
SoCs
- stm32: request exclusive control of the reset line"
* tag 'mtd/for-4.18' of git://git.infradead.org/linux-mtd: (66 commits)
mtd: nand: Pass mode information to nand_page_io_req
mtd: cfi_cmdset_0002: Change erase one block to enable XIP once
mtd: cfi_cmdset_0002: Change erase functions to check chip good only
mtd: cfi_cmdset_0002: Change erase functions to retry for error
mtd: cfi_cmdset_0002: Change definition naming to retry write operation
mtd: cfi_cmdset_0002: Change write buffer to check correct value
mtd: cmdlinepart: Update comment for introduction of OFFSET_CONTINUOUS
mtd: bcm47xxpart: add of_match_table with a new DT binding
dt-bindings: mtd: document Broadcom's BCM47xx partitions
mtd: spi-nor: Add support for EN25QH32
mtd: spi-nor: Add support for is25wp series chips
mtd: spi-nor: Add Winbond w25q32jv support
mtd: spi-nor: fsl-quadspi: add support for ls2080a/ls1080a
mtd: spi-nor: stm32-quadspi: explicitly request exclusive reset control
mtd: spi-nor: intel: provide a range for poll_timout
mtd: spi-nor: fsl-quadspi: fix api naming typo _init_ahb_read
mtd: spi-nor: intel-spi: Explicitly mark the driver as dangerous in Kconfig
mtd: spi-nor: intel-spi: Fix atomic sequence handling
mtd: rawnand: Do not check FAIL bit when executing a SET_FEATURES op
mtd: rawnand: use bit-wise majority to recover the ONFI param page
...
Diffstat (limited to 'include/linux/mtd/rawnand.h')
| -rw-r--r-- | include/linux/mtd/rawnand.h | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 17c919436f48..3e8ec3b8a39c 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h | |||
| @@ -28,7 +28,14 @@ struct nand_flash_dev; | |||
| 28 | struct device_node; | 28 | struct device_node; |
| 29 | 29 | ||
| 30 | /* Scan and identify a NAND device */ | 30 | /* Scan and identify a NAND device */ |
| 31 | int nand_scan(struct mtd_info *mtd, int max_chips); | 31 | int nand_scan_with_ids(struct mtd_info *mtd, int max_chips, |
| 32 | struct nand_flash_dev *ids); | ||
| 33 | |||
| 34 | static inline int nand_scan(struct mtd_info *mtd, int max_chips) | ||
| 35 | { | ||
| 36 | return nand_scan_with_ids(mtd, max_chips, NULL); | ||
| 37 | } | ||
| 38 | |||
| 32 | /* | 39 | /* |
| 33 | * Separate phases of nand_scan(), allowing board driver to intervene | 40 | * Separate phases of nand_scan(), allowing board driver to intervene |
| 34 | * and override command or ECC setup according to flash type. | 41 | * and override command or ECC setup according to flash type. |
| @@ -740,8 +747,9 @@ enum nand_data_interface_type { | |||
| 740 | 747 | ||
| 741 | /** | 748 | /** |
| 742 | * struct nand_data_interface - NAND interface timing | 749 | * struct nand_data_interface - NAND interface timing |
| 743 | * @type: type of the timing | 750 | * @type: type of the timing |
| 744 | * @timings: The timing, type according to @type | 751 | * @timings: The timing, type according to @type |
| 752 | * @timings.sdr: Use it when @type is %NAND_SDR_IFACE. | ||
| 745 | */ | 753 | */ |
| 746 | struct nand_data_interface { | 754 | struct nand_data_interface { |
| 747 | enum nand_data_interface_type type; | 755 | enum nand_data_interface_type type; |
| @@ -798,8 +806,9 @@ struct nand_op_addr_instr { | |||
| 798 | /** | 806 | /** |
| 799 | * struct nand_op_data_instr - Definition of a data instruction | 807 | * struct nand_op_data_instr - Definition of a data instruction |
| 800 | * @len: number of data bytes to move | 808 | * @len: number of data bytes to move |
| 801 | * @in: buffer to fill when reading from the NAND chip | 809 | * @buf: buffer to fill |
| 802 | * @out: buffer to read from when writing to the NAND chip | 810 | * @buf.in: buffer to fill when reading from the NAND chip |
| 811 | * @buf.out: buffer to read from when writing to the NAND chip | ||
| 803 | * @force_8bit: force 8-bit access | 812 | * @force_8bit: force 8-bit access |
| 804 | * | 813 | * |
| 805 | * Please note that "in" and "out" are inverted from the ONFI specification | 814 | * Please note that "in" and "out" are inverted from the ONFI specification |
| @@ -842,9 +851,13 @@ enum nand_op_instr_type { | |||
| 842 | /** | 851 | /** |
| 843 | * struct nand_op_instr - Instruction object | 852 | * struct nand_op_instr - Instruction object |
| 844 | * @type: the instruction type | 853 | * @type: the instruction type |
| 845 | * @cmd/@addr/@data/@waitrdy: extra data associated to the instruction. | 854 | * @ctx: extra data associated to the instruction. You'll have to use the |
| 846 | * You'll have to use the appropriate element | 855 | * appropriate element depending on @type |
| 847 | * depending on @type | 856 | * @ctx.cmd: use it if @type is %NAND_OP_CMD_INSTR |
| 857 | * @ctx.addr: use it if @type is %NAND_OP_ADDR_INSTR | ||
| 858 | * @ctx.data: use it if @type is %NAND_OP_DATA_IN_INSTR | ||
| 859 | * or %NAND_OP_DATA_OUT_INSTR | ||
| 860 | * @ctx.waitrdy: use it if @type is %NAND_OP_WAITRDY_INSTR | ||
| 848 | * @delay_ns: delay the controller should apply after the instruction has been | 861 | * @delay_ns: delay the controller should apply after the instruction has been |
| 849 | * issued on the bus. Most modern controllers have internal timings | 862 | * issued on the bus. Most modern controllers have internal timings |
| 850 | * control logic, and in this case, the controller driver can ignore | 863 | * control logic, and in this case, the controller driver can ignore |
| @@ -1003,7 +1016,9 @@ struct nand_op_parser_data_constraints { | |||
| 1003 | * struct nand_op_parser_pattern_elem - One element of a pattern | 1016 | * struct nand_op_parser_pattern_elem - One element of a pattern |
| 1004 | * @type: the instructuction type | 1017 | * @type: the instructuction type |
| 1005 | * @optional: whether this element of the pattern is optional or mandatory | 1018 | * @optional: whether this element of the pattern is optional or mandatory |
| 1006 | * @addr/@data: address or data constraint (number of cycles or data length) | 1019 | * @ctx: address or data constraint |
| 1020 | * @ctx.addr: address constraint (number of cycles) | ||
| 1021 | * @ctx.data: data constraint (data length) | ||
| 1007 | */ | 1022 | */ |
| 1008 | struct nand_op_parser_pattern_elem { | 1023 | struct nand_op_parser_pattern_elem { |
| 1009 | enum nand_op_instr_type type; | 1024 | enum nand_op_instr_type type; |
| @@ -1230,6 +1245,8 @@ int nand_op_parser_exec_op(struct nand_chip *chip, | |||
| 1230 | * devices. | 1245 | * devices. |
| 1231 | * @priv: [OPTIONAL] pointer to private chip data | 1246 | * @priv: [OPTIONAL] pointer to private chip data |
| 1232 | * @manufacturer: [INTERN] Contains manufacturer information | 1247 | * @manufacturer: [INTERN] Contains manufacturer information |
| 1248 | * @manufacturer.desc: [INTERN] Contains manufacturer's description | ||
| 1249 | * @manufacturer.priv: [INTERN] Contains manufacturer private information | ||
| 1233 | */ | 1250 | */ |
| 1234 | 1251 | ||
| 1235 | struct nand_chip { | 1252 | struct nand_chip { |
