Skip to content

Commit 4c3b7df

Browse files
committed
Merge tag 'mtd/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD updates from Miquel Raynal: "A big core MTD change is the introduction of a new class to always register a master device. This is a problem that has been there forever: the "master" device was not always present depending on a number of heuristics such as the presence of fixed partitions and the absence of a Kconfig symbol to force its presence. This was a problem for runtime PM operations which might not have the "master" device available in all situation. The SPI NAND subsystem has seen the introduction of DTR operations (the equivalent of DDR transfers), which involved quite a few preparation patches for clarifying macro names. In the raw NAND subsystem, the brcmnand driver has been "fixed" for old legacy SoCs with an update of the ->exec_op() hook, there has been the introduction of a new controller driver named Loongson-1, and the Qualcomm driver has received quite a few misc fixes as well as a new compatible. Finally, Macornix SPI NOR entries have been cleaned-up and some SFDP table fixups for Macronix MX25L3255E have been merged. Aside from this, there is the usual load of misc improvement, fixes, and yaml conversion" * tag 'mtd/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (42 commits) mtd: rawnand: brcmnand: legacy exec_op implementation mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk mtd: nand: brcmnand: fix NAND timeout when accessing eMMC mtd: nand: sunxi: Add randomizer configuration before randomizer enable mtd: spinand: esmt: fix id code for F50D1G41LB mtd: rawnand: brcmnand: remove unused parameters mtd: core: always create master device mtd: rawnand: loongson1: Fix inconsistent refcounting in ls1x_nand_chip_init() mtd: rawnand: loongson1: Fix error code in ls1x_nand_dma_transfer() mtd: rawnand: qcom: Fix read len for onfi param page mtd: rawnand: qcom: Fix last codeword read in qcom_param_page_type_exec() mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller mtd: bcm47xxnflash: Add error handling for bcm47xxnflash_ops_bcm4706_ctl_cmd() mtd: rawnand: Use non-hybrid PCI devres API mtd: nand: ecc-mxic: Fix use of uninitialized variable ret mtd: spinand: winbond: Add support for W35N02JW and W35N04JW chips mtd: spinand: winbond: Add octal support mtd: spinand: winbond: Add support for W35N01JW in single mode mtd: spinand: winbond: Rename DTR variants ...
2 parents b509c16 + aa70292 commit 4c3b7df

38 files changed

+1774
-414
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/fsl,vf610-nfc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale's NAND flash controller (NFC)
8+
9+
description:
10+
This variant of the Freescale NAND flash controller (NFC) can be found on
11+
Vybrid (vf610), MPC5125, MCF54418 and Kinetis K70.
12+
13+
maintainers:
14+
- Frank Li <[email protected]>
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- fsl,vf610-nfc
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
clock-names:
31+
items:
32+
- const: nfc
33+
34+
patternProperties:
35+
"^nand@[a-f0-9]$":
36+
type: object
37+
$ref: raw-nand-chip.yaml
38+
39+
properties:
40+
compatible:
41+
const: fsl,vf610-nfc-nandcs
42+
43+
reg:
44+
const: 0
45+
46+
nand-ecc-strength:
47+
enum: [24, 32]
48+
49+
nand-ecc-step-size:
50+
const: 2048
51+
52+
unevaluatedProperties: false
53+
54+
required:
55+
- compatible
56+
- reg
57+
- interrupts
58+
59+
allOf:
60+
- $ref: nand-controller.yaml
61+
62+
unevaluatedProperties: false
63+
64+
examples:
65+
- |
66+
#include <dt-bindings/interrupt-controller/arm-gic.h>
67+
#include <dt-bindings/clock/vf610-clock.h>
68+
69+
nand-controller@400e0000 {
70+
compatible = "fsl,vf610-nfc";
71+
reg = <0x400e0000 0x4000>;
72+
#address-cells = <1>;
73+
#size-cells = <0>;
74+
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
75+
clocks = <&clks VF610_CLK_NFC>;
76+
clock-names = "nfc";
77+
assigned-clocks = <&clks VF610_CLK_NFC>;
78+
assigned-clock-rates = <33000000>;
79+
80+
nand@0 {
81+
compatible = "fsl,vf610-nfc-nandcs";
82+
reg = <0>;
83+
nand-bus-width = <8>;
84+
nand-ecc-mode = "hw";
85+
nand-ecc-strength = <32>;
86+
nand-ecc-step-size = <2048>;
87+
nand-on-flash-bbt;
88+
};
89+
};
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/loongson,ls1b-nand-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Loongson-1 NAND Controller
8+
9+
maintainers:
10+
- Keguang Zhang <[email protected]>
11+
12+
description:
13+
The Loongson-1 NAND controller abstracts all supported operations,
14+
meaning it does not support low-level access to raw NAND flash chips.
15+
Moreover, the controller is paired with the DMA engine to perform
16+
READ and PROGRAM functions.
17+
18+
allOf:
19+
- $ref: nand-controller.yaml
20+
21+
properties:
22+
compatible:
23+
oneOf:
24+
- enum:
25+
- loongson,ls1b-nand-controller
26+
- loongson,ls1c-nand-controller
27+
- items:
28+
- enum:
29+
- loongson,ls1a-nand-controller
30+
- const: loongson,ls1b-nand-controller
31+
32+
reg:
33+
maxItems: 2
34+
35+
reg-names:
36+
items:
37+
- const: nand
38+
- const: nand-dma
39+
40+
dmas:
41+
maxItems: 1
42+
43+
dma-names:
44+
const: rxtx
45+
46+
required:
47+
- compatible
48+
- reg
49+
- reg-names
50+
- dmas
51+
- dma-names
52+
53+
unevaluatedProperties: false
54+
55+
examples:
56+
- |
57+
nand-controller@1fe78000 {
58+
compatible = "loongson,ls1b-nand-controller";
59+
reg = <0x1fe78000 0x24>, <0x1fe78040 0x4>;
60+
reg-names = "nand", "nand-dma";
61+
dmas = <&dma 0>;
62+
dma-names = "rxtx";
63+
#address-cells = <1>;
64+
#size-cells = <0>;
65+
66+
nand@0 {
67+
reg = <0>;
68+
label = "ls1x-nand";
69+
nand-use-soft-ecc-engine;
70+
nand-ecc-algo = "hamming";
71+
};
72+
};

Documentation/devicetree/bindings/mtd/qcom,nandc.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ maintainers:
1111

1212
properties:
1313
compatible:
14-
enum:
15-
- qcom,ipq806x-nand
16-
- qcom,ipq4019-nand
17-
- qcom,ipq6018-nand
18-
- qcom,ipq8074-nand
19-
- qcom,sdx55-nand
14+
oneOf:
15+
- items:
16+
- enum:
17+
- qcom,sdx75-nand
18+
- const: qcom,sdx55-nand
19+
- items:
20+
- enum:
21+
- qcom,ipq806x-nand
22+
- qcom,ipq4019-nand
23+
- qcom,ipq6018-nand
24+
- qcom,ipq8074-nand
25+
- qcom,sdx55-nand
2026

2127
reg:
2228
maxItems: 1
@@ -95,6 +101,18 @@ allOf:
95101
items:
96102
- const: rxtx
97103

104+
- if:
105+
properties:
106+
compatible:
107+
contains:
108+
enum:
109+
- qcom,sdx75-nand
110+
111+
then:
112+
properties:
113+
iommus:
114+
maxItems: 1
115+
98116
- if:
99117
properties:
100118
compatible:

Documentation/devicetree/bindings/mtd/vf610-nfc.txt

Lines changed: 0 additions & 59 deletions
This file was deleted.

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16589,6 +16589,7 @@ F: Documentation/devicetree/bindings/*/loongson,ls1*.yaml
1658916589
F: arch/mips/include/asm/mach-loongson32/
1659016590
F: arch/mips/loongson32/
1659116591
F: drivers/*/*loongson1*
16592+
F: drivers/mtd/nand/raw/loongson1-nand-controller.c
1659216593
F: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c
1659316594
F: sound/soc/loongson/loongson1_ac97.c
1659416595

drivers/mtd/devices/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ config MTD_MCHP48L640
9898
config MTD_SPEAR_SMI
9999
tristate "SPEAR MTD NOR Support through SMI controller"
100100
depends on PLAT_SPEAR || COMPILE_TEST
101-
default y
101+
default PLAT_SPEAR
102102
help
103103
This enable SNOR support on SPEAR platforms using SMI controller
104104

drivers/mtd/mtdchar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static int mtdchar_blkpg_ioctl(struct mtd_info *mtd,
559559
/* Sanitize user input */
560560
p.devname[BLKPG_DEVNAMELTH - 1] = '\0';
561561

562-
return mtd_add_partition(mtd, p.devname, p.start, p.length);
562+
return mtd_add_partition(mtd, p.devname, p.start, p.length, NULL);
563563

564564
case BLKPG_DEL_PARTITION:
565565

0 commit comments

Comments
 (0)