Skip to content

Commit 3856a28

Browse files
Merge tag 'nand/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next
NAND core changes: * Use the new generic ECC object * Create helpers to set/extract the ECC requirements * Create a helper to extract the ECC configuration * Add a NAND page I/O request type * Introduce the ECC engine framework Raw NAND core changes: * Don't overwrite the error code from nand_set_ecc_soft_ops() * Introduce nand_set_ecc_on_host_ops() * Use the NAND framework user_conf object for ECC flags * Use the ECC framework user input parsing bits * Use the ECC framework nand_ecc_is_strong_enough() helper * Use the ECC framework OOB layouts * Make use of the ECC framework * Use nanddev_get/set_ecc_requirements() when relevant * Use the new ECC engine type enumeration * Separate the ECC engine type and the ECC byte placement * Move the nand_ecc_algo enum to the generic NAND layer * Rename the ECC algorithm enumeration items * Add a kernel doc to the ECC algorithm enumeration * DT bindings: - Document boolean NAND ECC properties - Document nand-ecc-engine - Document nand-ecc-placement Raw NAND drivers changes: * Ams-Delta: Fix non-OF build warning * Atmel: - Check return values for nand_read_data_op - Simplify with dev_err_probe() - Get rid of the legacy interface implementation - Convert the driver to exec_op() - Use nand_prog_page_end_op() - Use nand_{write,read}_data_op() - Drop redundant nand_read_page_op() - Enable the NFC controller at probe time - Disable clk on error handling path in probe * Cadence: remove a redundant dev_err call * Gpmi: - Simplify with dev_err_probe() * Marvell: - Fix and update kerneldoc - Simplify with dev_err_probe() - Fix and update kerneldoc - Simplify with dev_err_probe() - Support panic_write for mtdoops * Onenand: - Simplify the return expression of onenand_transfer_auto_oob - Simplify with dev_err_probe() * Oxnas: cleanup/simplify code * Pasemi: Make pasemi_device_ready() static * Qcom: Simplify with dev_err_probe() * Stm32_fmc2: fix a buffer overflow * Vf610: Remove unused function vf610_nfc_transfer_size() SPI-NAND changes: * Use nanddev_get_ecc_conf() when relevant * Gigadevice: - Add support for GD5F4GQ4xC - Add QE Bit - Use only one dummy byte in QUADIO * Macronix: - Add support for MX31UF1GE4BC - Add support for MX31LF1GE4BC
2 parents b597cc7 + 88e315d commit 3856a28

98 files changed

Lines changed: 1710 additions & 968 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/mtd/nand-controller.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,37 @@ patternProperties:
5555
$ref: /schemas/types.yaml#/definitions/string
5656
enum: [none, soft, hw, hw_syndrome, hw_oob_first, on-die]
5757

58+
nand-ecc-engine:
59+
allOf:
60+
- $ref: /schemas/types.yaml#/definitions/phandle
61+
description: |
62+
A phandle on the hardware ECC engine if any. There are
63+
basically three possibilities:
64+
1/ The ECC engine is part of the NAND controller, in this
65+
case the phandle should reference the parent node.
66+
2/ The ECC engine is part of the NAND part (on-die), in this
67+
case the phandle should reference the node itself.
68+
3/ The ECC engine is external, in this case the phandle should
69+
reference the specific ECC engine node.
70+
71+
nand-use-soft-ecc-engine:
72+
type: boolean
73+
description: Use a software ECC engine.
74+
75+
nand-no-ecc-engine:
76+
type: boolean
77+
description: Do not use any ECC correction.
78+
79+
nand-ecc-placement:
80+
allOf:
81+
- $ref: /schemas/types.yaml#/definitions/string
82+
- enum: [ oob, interleaved ]
83+
description:
84+
Location of the ECC bytes. This location is unknown by default
85+
but can be explicitly set to "oob", if all ECC bytes are
86+
known to be stored in the OOB area, or "interleaved" if ECC
87+
bytes will be interleaved with regular data in the main area.
88+
5889
nand-ecc-algo:
5990
description:
6091
Desired ECC algorithm.

arch/arm/mach-davinci/board-da830-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static struct davinci_nand_pdata da830_evm_nand_pdata = {
306306
.core_chipsel = 1,
307307
.parts = da830_evm_nand_partitions,
308308
.nr_parts = ARRAY_SIZE(da830_evm_nand_partitions),
309-
.ecc_mode = NAND_ECC_HW,
309+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
310310
.ecc_bits = 4,
311311
.bbt_options = NAND_BBT_USE_FLASH,
312312
.bbt_td = &da830_evm_nand_bbt_main_descr,

arch/arm/mach-davinci/board-da850-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static struct davinci_nand_pdata da850_evm_nandflash_data = {
239239
.core_chipsel = 1,
240240
.parts = da850_evm_nandflash_partition,
241241
.nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
242-
.ecc_mode = NAND_ECC_HW,
242+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
243243
.ecc_bits = 4,
244244
.bbt_options = NAND_BBT_USE_FLASH,
245245
.timing = &da850_evm_nandflash_timing,

arch/arm/mach-davinci/board-dm355-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
8282
.mask_chipsel = BIT(14),
8383
.parts = davinci_nand_partitions,
8484
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
85-
.ecc_mode = NAND_ECC_HW,
85+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
8686
.bbt_options = NAND_BBT_USE_FLASH,
8787
.ecc_bits = 4,
8888
};

arch/arm/mach-davinci/board-dm355-leopard.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ static struct davinci_nand_pdata davinci_nand_data = {
7676
.mask_chipsel = BIT(14),
7777
.parts = davinci_nand_partitions,
7878
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
79-
.ecc_mode = NAND_ECC_HW_SYNDROME,
79+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
80+
.ecc_placement = NAND_ECC_PLACEMENT_INTERLEAVED,
8081
.ecc_bits = 4,
8182
.bbt_options = NAND_BBT_USE_FLASH,
8283
};

arch/arm/mach-davinci/board-dm365-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
146146
.mask_chipsel = BIT(14),
147147
.parts = davinci_nand_partitions,
148148
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
149-
.ecc_mode = NAND_ECC_HW,
149+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
150150
.bbt_options = NAND_BBT_USE_FLASH,
151151
.ecc_bits = 4,
152152
};

arch/arm/mach-davinci/board-dm644x-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = {
162162
.core_chipsel = 0,
163163
.parts = davinci_evm_nandflash_partition,
164164
.nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition),
165-
.ecc_mode = NAND_ECC_HW,
165+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
166166
.ecc_bits = 1,
167167
.bbt_options = NAND_BBT_USE_FLASH,
168168
.timing = &davinci_evm_nandflash_timing,

arch/arm/mach-davinci/board-dm646x-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
9191
.mask_ale = 0x40000,
9292
.parts = davinci_nand_partitions,
9393
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
94-
.ecc_mode = NAND_ECC_HW,
94+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
9595
.ecc_bits = 1,
9696
.options = 0,
9797
};

arch/arm/mach-davinci/board-mityomapl138.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static struct davinci_nand_pdata mityomapl138_nandflash_data = {
432432
.core_chipsel = 1,
433433
.parts = mityomapl138_nandflash_partition,
434434
.nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition),
435-
.ecc_mode = NAND_ECC_HW,
435+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
436436
.bbt_options = NAND_BBT_USE_FLASH,
437437
.options = NAND_BUSWIDTH_16,
438438
.ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */

arch/arm/mach-davinci/board-neuros-osd2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
9090
.core_chipsel = 0,
9191
.parts = davinci_ntosd2_nandflash_partition,
9292
.nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
93-
.ecc_mode = NAND_ECC_HW,
93+
.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST,
9494
.ecc_bits = 1,
9595
.bbt_options = NAND_BBT_USE_FLASH,
9696
};

0 commit comments

Comments
 (0)