Skip to content

Commit a8dfb61

Browse files
Merge tag 'nand/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next
Raw NAND core changes: * Stop using nand_release(), patched all drivers. * Give more information about the ECC weakness when not matching the chip's requirement. * MAINTAINERS updates. * Support emulated SLC mode on MLC NANDs. * Support "constrained" controllers, adapt the core and ONFI/JEDEC table parsing and Micron's code. * Take check_only into account. * Add an invalid ECC mode to discriminate with valid ones. * Return an enum from of_get_nand_ecc_algo(). * Drop OOB_FIRST placement scheme. * Introduce nand_extract_bits(). * Ensure a consistent bitflips numbering. * BCH lib: - Allow easy bit swapping. - Rework a little bit the exported function names. * Fix nand_gpio_waitrdy(). * Propage CS selection to sub operations. * Add a NAND_NO_BBM_QUIRK flag. * Give the possibility to verify a read operation is supported. * Add a helper to check supported operations. * Avoid indirect access to ->data_buf(). * Rename the use_bufpoi variables. * Fix comments about the use of bufpoi. * Rename a NAND chip option. * Reorder the nand_chip->options flags. * Translate obscure bitfields into readable macros. * Timings: - Fix default values. - Add mode information to the timings structure. Raw NAND controller driver changes: * Fixed many error paths. * Arasan - New driver * Au1550nd: - Various cleanups - Migration to ->exec_op() * brcmnand: - Misc cleanup. - Support v2.1-v2.2 controllers. - Remove unused including <linux/version.h>. - Correctly verify erased pages. - Fix Hamming OOB layout. * Cadence - Make cadence_nand_attach_chip static. * Cafe: - Set the NAND_NO_BBM_QUIRK flag * cmx270: - Remove this controller driver. * cs553x: - Misc cleanup - Migration to ->exec_op() * Davinci: - Misc cleanup. - Migration to ->exec_op() * Denali: - Add more delays before latching incoming data * Diskonchip: - Misc cleanup - Migration to ->exec_op() * Fsmc: - Change to non-atomic bit operations. * GPMI: - Use nand_extract_bits() - Fix runtime PM imbalance. * Ingenic: - Migration to exec_op() - Fix the RB gpio active-high property on qi, lb60 - Make qi_lb60_ooblayout_ops static. * Marvell: - Misc cleanup and small fixes * Nandsim: - Fix the error paths, driver wide. * Omap_elm: - Fix runtime PM imbalance. * STM32_FMC2: - Misc cleanups (error cases, comments, timeout valus, cosmetic changes).
2 parents 3d77e6a + 86f2b22 commit a8dfb61

Some content is hidden

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

82 files changed

+4258
-2536
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/arasan,nand-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Arasan NAND Flash Controller with ONFI 3.1 support device tree bindings
8+
9+
allOf:
10+
- $ref: "nand-controller.yaml"
11+
12+
maintainers:
13+
- Naga Sureshkumar Relli <[email protected]>
14+
15+
properties:
16+
compatible:
17+
oneOf:
18+
- items:
19+
- enum:
20+
- xlnx,zynqmp-nand-controller
21+
- enum:
22+
- arasan,nfc-v3p10
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
items:
29+
- description: Controller clock
30+
- description: NAND bus clock
31+
32+
clock-names:
33+
items:
34+
- const: controller
35+
- const: bus
36+
37+
interrupts:
38+
maxItems: 1
39+
40+
"#address-cells": true
41+
"#size-cells": true
42+
43+
required:
44+
- compatible
45+
- reg
46+
- clocks
47+
- clock-names
48+
- interrupts
49+
50+
additionalProperties: true
51+
52+
examples:
53+
- |
54+
nfc: nand-controller@ff100000 {
55+
compatible = "xlnx,zynqmp-nand-controller", "arasan,nfc-v3p10";
56+
reg = <0x0 0xff100000 0x0 0x1000>;
57+
clock-names = "controller", "bus";
58+
clocks = <&clk200>, <&clk100>;
59+
interrupt-parent = <&gic>;
60+
interrupts = <0 14 4>;
61+
#address-cells = <1>;
62+
#size-cells = <0>;
63+
};

Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Required properties:
2020
"brcm,brcmnand" and an appropriate version compatibility
2121
string, like "brcm,brcmnand-v7.0"
2222
Possible values:
23+
brcm,brcmnand-v2.1
24+
brcm,brcmnand-v2.2
2325
brcm,brcmnand-v4.0
2426
brcm,brcmnand-v5.0
2527
brcm,brcmnand-v6.0

Documentation/devicetree/bindings/mtd/partition.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Optional properties:
6161
clobbered.
6262
- lock : Do not unlock the partition at initialization time (not supported on
6363
all devices)
64+
- slc-mode: This parameter, if present, allows one to emulate SLC mode on a
65+
partition attached to an MLC NAND thus making this partition immune to
66+
paired-pages corruptions
6467

6568
Examples:
6669

Documentation/driver-api/mtdnand.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,10 @@ unregisters the partitions in the MTD layer.
276276
#ifdef MODULE
277277
static void __exit board_cleanup (void)
278278
{
279-
/* Release resources, unregister device */
280-
nand_release (mtd_to_nand(board_mtd));
279+
/* Unregister device */
280+
WARN_ON(mtd_device_unregister(board_mtd));
281+
/* Release resources */
282+
nand_cleanup(mtd_to_nand(board_mtd));
281283

282284
/* unmap physical address */
283285
iounmap(baseaddr);

MAINTAINERS

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,13 @@ S: Supported
12841284
W: http://www.aquantia.com
12851285
F: drivers/net/ethernet/aquantia/atlantic/aq_ptp*
12861286

1287+
ARASAN NAND CONTROLLER DRIVER
1288+
M: Naga Sureshkumar Relli <[email protected]>
1289+
1290+
S: Maintained
1291+
F: Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml
1292+
F: drivers/mtd/nand/raw/arasan-nand-controller.c
1293+
12871294
ARC FRAMEBUFFER DRIVER
12881295
M: Jaya Kumar <[email protected]>
12891296
S: Maintained
@@ -3741,9 +3748,8 @@ F: Documentation/devicetree/bindings/media/cdns,*.txt
37413748
F: drivers/media/platform/cadence/cdns-csi2*
37423749

37433750
CADENCE NAND DRIVER
3744-
M: Piotr Sroka <[email protected]>
37453751
3746-
S: Maintained
3752+
S: Orphan
37473753
F: Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt
37483754
F: drivers/mtd/nand/raw/cadence-nand-controller.c
37493755

@@ -10727,9 +10733,8 @@ F: Documentation/devicetree/bindings/i2c/i2c-mt7621.txt
1072710733
F: drivers/i2c/busses/i2c-mt7621.c
1072810734

1072910735
MEDIATEK NAND CONTROLLER DRIVER
10730-
M: Xiaolei Li <[email protected]>
1073110736
10732-
S: Maintained
10737+
S: Orphan
1073310738
F: Documentation/devicetree/bindings/mtd/mtk-nand.txt
1073410739
F: drivers/mtd/nand/raw/mtk_*
1073510740

drivers/mtd/devices/docg3.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ static int doc_ecc_bch_fix_data(struct docg3 *docg3, void *buf, u8 *hwecc)
647647

648648
for (i = 0; i < DOC_ECC_BCH_SIZE; i++)
649649
ecc[i] = bitrev8(hwecc[i]);
650-
numerrs = decode_bch(docg3->cascade->bch, NULL,
650+
numerrs = bch_decode(docg3->cascade->bch, NULL,
651651
DOC_ECC_BCH_COVERED_BYTES,
652652
NULL, ecc, NULL, errorpos);
653653
BUG_ON(numerrs == -EINVAL);
@@ -1984,8 +1984,8 @@ static int __init docg3_probe(struct platform_device *pdev)
19841984
return ret;
19851985
cascade->base = base;
19861986
mutex_init(&cascade->lock);
1987-
cascade->bch = init_bch(DOC_ECC_BCH_M, DOC_ECC_BCH_T,
1988-
DOC_ECC_BCH_PRIMPOLY);
1987+
cascade->bch = bch_init(DOC_ECC_BCH_M, DOC_ECC_BCH_T,
1988+
DOC_ECC_BCH_PRIMPOLY, false);
19891989
if (!cascade->bch)
19901990
return ret;
19911991

@@ -2021,7 +2021,7 @@ static int __init docg3_probe(struct platform_device *pdev)
20212021
ret = -ENODEV;
20222022
dev_info(dev, "No supported DiskOnChip found\n");
20232023
err_probe:
2024-
free_bch(cascade->bch);
2024+
bch_free(cascade->bch);
20252025
for (floor = 0; floor < DOC_MAX_NBFLOORS; floor++)
20262026
if (cascade->floors[floor])
20272027
doc_release_device(cascade->floors[floor]);
@@ -2045,7 +2045,7 @@ static int docg3_release(struct platform_device *pdev)
20452045
if (cascade->floors[floor])
20462046
doc_release_device(cascade->floors[floor]);
20472047

2048-
free_bch(docg3->cascade->bch);
2048+
bch_free(docg3->cascade->bch);
20492049
return 0;
20502050
}
20512051

0 commit comments

Comments
 (0)