Skip to content

Commit c43a20e

Browse files
committed
Merge tag 'mtd/for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD updates from Miquel Raynal: "Nothing stands out for this merge window, mostly minor fixes, such as module descriptions, the use of debug macros and Makefile improvements. Raw NAND changes; - The Freescale MXC driver has been converted to the newer '->exec_op()' interface - The meson driver now supports handling the boot ROM area with very specific ECC needs - Support for the iMX8QXP has been added to the GPMI driver - The lpx32xx driver now can get the DMA channels using DT entries - The Qcom binding has been improved to be more future proof by Rob - And then there is the usual load of misc and minor changes SPI-NAND changes: - The Macronix vendor driver has been improved to support an extended ID to avoid conflicting with older devices after an ID reuse issue SPI NOR changes: - Drop support for Xilinx S3AN flashes. These flashes are for the very old Xilinx Spartan 3 FPGAs and they need some awkward code in the core to support. Drop support for these flashes, along with the special handling we needed for them in the core like non-power-of-2 page size handling and the .setup() callback. - Fix regression for old w25q128 flashes without SFDP tables. Commit 83e824a ("mtd: spi-nor: Correct flags for Winbond w25q128") dropped support for such devices under the assumption that they aren't being used anymore. Users have now surfaced [0] so fix the regression by supporting both kind of devices. - Core cleanups including removal of SPI_NOR_NO_FR flag and simplification of spi_nor_get_flash_info()" Link: https://lore.kernel.org/r/CALxbwRo_-9CaJmt7r7ELgu+vOcgk=xZcGHobnKf=oT2=u4d4aA@mail.gmail.com/ [0] * tag 'mtd/for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (28 commits) mtd: rawnand: lpx32xx: Fix dma_request_chan() error checks mtd: spinand: macronix: Add support for serial NAND flash mtd: spinand: macronix: Add support for reading Device ID 2 mtd: rawnand: lpx32xx: Request DMA channels using DT entries dt-bindings: mtd: qcom,nandc: Define properties at top-level mtd: rawnand: intel: use 'time_left' variable with wait_for_completion_timeout() mtd: rawnand: mxc: use 'time_left' variable with wait_for_completion_timeout() mtd: rawnand: gpmi: add iMX8QXP support. mtd: rawnand: gpmi: add 'support_edo_timing' in gpmi_devdata mtd: cmdlinepart: Replace `dbg()` macro with `pr_debug()` mtd: add missing MODULE_DESCRIPTION() macros mtd: make mtd_test.c a separate module dt-bindings: mtd: gpmi-nand: Add 'fsl,imx8qxp-gpmi-nand' compatible string mtd: rawnand: cadence: remove unused struct 'ecc_info' mtd: rawnand: mxc: support software ECC mtd: rawnand: mxc: implement exec_op mtd: rawnand: mxc: separate page read from ecc calc mtd: spi-nor: winbond: fix w25q128 regression mtd: spi-nor: simplify spi_nor_get_flash_info() mtd: spi-nor: get rid of SPI_NOR_NO_FR ...
2 parents 9fa2375 + 78a0b13 commit c43a20e

28 files changed

+711
-806
lines changed

Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,29 @@ patternProperties:
6464
items:
6565
maximum: 0
6666

67+
amlogic,boot-pages:
68+
$ref: /schemas/types.yaml#/definitions/uint32
69+
description:
70+
Number of pages starting from offset 0, where a special ECC
71+
configuration must be used because it is accessed by the ROM
72+
code. This ECC configuration uses 384 bytes data blocks.
73+
Also scrambling mode is enabled for such pages.
74+
75+
amlogic,boot-page-step:
76+
$ref: /schemas/types.yaml#/definitions/uint32
77+
description:
78+
Interval between pages, accessed by the ROM code. For example
79+
we have 8 pages [0, 7]. Pages 0,2,4,6 are accessed by the
80+
ROM code, so this field will be 2 (e.g. every 2nd page). Rest
81+
of pages - 1,3,5,7 are read/written without this mode.
82+
6783
unevaluatedProperties: false
6884

6985
dependencies:
7086
nand-ecc-strength: [nand-ecc-step-size]
7187
nand-ecc-step-size: [nand-ecc-strength]
88+
amlogic,boot-pages: [nand-is-boot-medium, "amlogic,boot-page-step"]
89+
amlogic,boot-page-step: [nand-is-boot-medium, "amlogic,boot-pages"]
7290

7391

7492
required:

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424
- fsl,imx6q-gpmi-nand
2525
- fsl,imx6sx-gpmi-nand
2626
- fsl,imx7d-gpmi-nand
27+
- fsl,imx8qxp-gpmi-nand
2728
- items:
2829
- enum:
2930
- fsl,imx8mm-gpmi-nand
@@ -151,6 +152,27 @@ allOf:
151152
- const: gpmi_io
152153
- const: gpmi_bch_apb
153154

155+
- if:
156+
properties:
157+
compatible:
158+
contains:
159+
enum:
160+
- fsl,imx8qxp-gpmi-nand
161+
then:
162+
properties:
163+
clocks:
164+
items:
165+
- description: SoC gpmi io clock
166+
- description: SoC gpmi apb clock
167+
- description: SoC gpmi bch clock
168+
- description: SoC gpmi bch apb clock
169+
clock-names:
170+
items:
171+
- const: gpmi_io
172+
- const: gpmi_apb
173+
- const: gpmi_bch
174+
- const: gpmi_bch_apb
175+
154176
examples:
155177
- |
156178
nand-controller@8000c000 {

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

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ properties:
3131
- const: core
3232
- const: aon
3333

34+
qcom,cmd-crci:
35+
$ref: /schemas/types.yaml#/definitions/uint32
36+
description:
37+
Must contain the ADM command type CRCI block instance number specified for
38+
the NAND controller on the given platform
39+
40+
qcom,data-crci:
41+
$ref: /schemas/types.yaml#/definitions/uint32
42+
description:
43+
Must contain the ADM data type CRCI block instance number specified for
44+
the NAND controller on the given platform
45+
3446
patternProperties:
3547
"^nand@[a-f0-9]$":
3648
type: object
@@ -83,18 +95,6 @@ allOf:
8395
items:
8496
- const: rxtx
8597

86-
qcom,cmd-crci:
87-
$ref: /schemas/types.yaml#/definitions/uint32
88-
description:
89-
Must contain the ADM command type CRCI block instance number
90-
specified for the NAND controller on the given platform
91-
92-
qcom,data-crci:
93-
$ref: /schemas/types.yaml#/definitions/uint32
94-
description:
95-
Must contain the ADM data type CRCI block instance number
96-
specified for the NAND controller on the given platform
97-
9898
- if:
9999
properties:
100100
compatible:
@@ -119,19 +119,9 @@ allOf:
119119
- const: rx
120120
- const: cmd
121121

122-
- if:
123-
properties:
124-
compatible:
125-
contains:
126-
enum:
127-
- qcom,ipq806x-nand
122+
qcom,cmd-crci: false
123+
qcom,data-crci: false
128124

129-
then:
130-
patternProperties:
131-
"^nand@[a-f0-9]$":
132-
properties:
133-
qcom,boot-partitions: true
134-
else:
135125
patternProperties:
136126
"^nand@[a-f0-9]$":
137127
properties:

drivers/mtd/chips/cfi_cmdset_0020.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,4 +1399,5 @@ static void cfi_staa_destroy(struct mtd_info *mtd)
13991399
kfree(cfi);
14001400
}
14011401

1402+
MODULE_DESCRIPTION("MTD chip driver for ST Advanced Architecture Command Set (ID 0x0020)");
14021403
MODULE_LICENSE("GPL");

drivers/mtd/chips/cfi_util.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,4 +441,5 @@ int cfi_varsize_frob(struct mtd_info *mtd, varsize_frob_t frob,
441441

442442
EXPORT_SYMBOL(cfi_varsize_frob);
443443

444+
MODULE_DESCRIPTION("Common Flash Interface Generic utility functions");
444445
MODULE_LICENSE("GPL");

drivers/mtd/maps/Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ obj-$(CONFIG_MTD_ICHXROM) += ichxrom.o
1717
obj-$(CONFIG_MTD_CK804XROM) += ck804xrom.o
1818
obj-$(CONFIG_MTD_TSUNAMI) += tsunami_flash.o
1919
obj-$(CONFIG_MTD_PXA2XX) += pxa2xx-flash.o
20-
physmap-objs-y += physmap-core.o
21-
physmap-objs-$(CONFIG_MTD_PHYSMAP_BT1_ROM) += physmap-bt1-rom.o
22-
physmap-objs-$(CONFIG_MTD_PHYSMAP_VERSATILE) += physmap-versatile.o
23-
physmap-objs-$(CONFIG_MTD_PHYSMAP_GEMINI) += physmap-gemini.o
24-
physmap-objs-$(CONFIG_MTD_PHYSMAP_IXP4XX) += physmap-ixp4xx.o
25-
physmap-objs := $(physmap-objs-y)
2620
obj-$(CONFIG_MTD_PHYSMAP) += physmap.o
21+
physmap-y := physmap-core.o
22+
physmap-$(CONFIG_MTD_PHYSMAP_BT1_ROM) += physmap-bt1-rom.o
23+
physmap-$(CONFIG_MTD_PHYSMAP_VERSATILE) += physmap-versatile.o
24+
physmap-$(CONFIG_MTD_PHYSMAP_GEMINI) += physmap-gemini.o
25+
physmap-$(CONFIG_MTD_PHYSMAP_IXP4XX) += physmap-ixp4xx.o
2726
obj-$(CONFIG_MTD_PISMO) += pismo.o
2827
obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
2928
obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o

drivers/mtd/maps/map_funcs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ void simple_map_init(struct map_info *map)
4141
}
4242

4343
EXPORT_SYMBOL(simple_map_init);
44+
MODULE_DESCRIPTION("Out-of-line map I/O");
4445
MODULE_LICENSE("GPL");

drivers/mtd/nand/raw/cadence-nand-controller.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,6 @@ struct cdns_nand_chip {
531531
u8 cs[] __counted_by(nsels);
532532
};
533533

534-
struct ecc_info {
535-
int (*calc_ecc_bytes)(int step_size, int strength);
536-
int max_step_size;
537-
};
538-
539534
static inline struct
540535
cdns_nand_chip *to_cdns_nand_chip(struct nand_chip *chip)
541536
{

drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ static int gpmi_setup_interface(struct nand_chip *chip, int chipnr,
983983
return PTR_ERR(sdr);
984984

985985
/* Only MX28/MX6 GPMI controller can reach EDO timings */
986-
if (sdr->tRC_min <= 25000 && !GPMI_IS_MX28(this) && !GPMI_IS_MX6(this))
986+
if (sdr->tRC_min <= 25000 && !this->devdata->support_edo_timing)
987987
return -ENOTSUPP;
988988

989989
/* Stop here if this call was just a check */
@@ -1142,6 +1142,7 @@ static const struct gpmi_devdata gpmi_devdata_imx28 = {
11421142
.type = IS_MX28,
11431143
.bch_max_ecc_strength = 20,
11441144
.max_chain_delay = 16000,
1145+
.support_edo_timing = true,
11451146
.clks = gpmi_clks_for_mx2x,
11461147
.clks_count = ARRAY_SIZE(gpmi_clks_for_mx2x),
11471148
};
@@ -1154,6 +1155,7 @@ static const struct gpmi_devdata gpmi_devdata_imx6q = {
11541155
.type = IS_MX6Q,
11551156
.bch_max_ecc_strength = 40,
11561157
.max_chain_delay = 12000,
1158+
.support_edo_timing = true,
11571159
.clks = gpmi_clks_for_mx6,
11581160
.clks_count = ARRAY_SIZE(gpmi_clks_for_mx6),
11591161
};
@@ -1162,6 +1164,7 @@ static const struct gpmi_devdata gpmi_devdata_imx6sx = {
11621164
.type = IS_MX6SX,
11631165
.bch_max_ecc_strength = 62,
11641166
.max_chain_delay = 12000,
1167+
.support_edo_timing = true,
11651168
.clks = gpmi_clks_for_mx6,
11661169
.clks_count = ARRAY_SIZE(gpmi_clks_for_mx6),
11671170
};
@@ -1174,10 +1177,24 @@ static const struct gpmi_devdata gpmi_devdata_imx7d = {
11741177
.type = IS_MX7D,
11751178
.bch_max_ecc_strength = 62,
11761179
.max_chain_delay = 12000,
1180+
.support_edo_timing = true,
11771181
.clks = gpmi_clks_for_mx7d,
11781182
.clks_count = ARRAY_SIZE(gpmi_clks_for_mx7d),
11791183
};
11801184

1185+
static const char *gpmi_clks_for_mx8qxp[GPMI_CLK_MAX] = {
1186+
"gpmi_io", "gpmi_apb", "gpmi_bch", "gpmi_bch_apb",
1187+
};
1188+
1189+
static const struct gpmi_devdata gpmi_devdata_imx8qxp = {
1190+
.type = IS_MX8QXP,
1191+
.bch_max_ecc_strength = 62,
1192+
.max_chain_delay = 12000,
1193+
.support_edo_timing = true,
1194+
.clks = gpmi_clks_for_mx8qxp,
1195+
.clks_count = ARRAY_SIZE(gpmi_clks_for_mx8qxp),
1196+
};
1197+
11811198
static int acquire_register_block(struct gpmi_nand_data *this,
11821199
const char *res_name)
11831200
{
@@ -2721,6 +2738,7 @@ static const struct of_device_id gpmi_nand_id_table[] = {
27212738
{ .compatible = "fsl,imx6q-gpmi-nand", .data = &gpmi_devdata_imx6q, },
27222739
{ .compatible = "fsl,imx6sx-gpmi-nand", .data = &gpmi_devdata_imx6sx, },
27232740
{ .compatible = "fsl,imx7d-gpmi-nand", .data = &gpmi_devdata_imx7d,},
2741+
{ .compatible = "fsl,imx8qxp-gpmi-nand", .data = &gpmi_devdata_imx8qxp, },
27242742
{}
27252743
};
27262744
MODULE_DEVICE_TABLE(of, gpmi_nand_id_table);

drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ enum gpmi_type {
7878
IS_MX6Q,
7979
IS_MX6SX,
8080
IS_MX7D,
81+
IS_MX8QXP,
8182
};
8283

8384
struct gpmi_devdata {
@@ -86,6 +87,7 @@ struct gpmi_devdata {
8687
int max_chain_delay; /* See the SDR EDO mode */
8788
const char * const *clks;
8889
const int clks_count;
90+
bool support_edo_timing;
8991
};
9092

9193
/**
@@ -172,8 +174,10 @@ struct gpmi_nand_data {
172174
#define GPMI_IS_MX6Q(x) ((x)->devdata->type == IS_MX6Q)
173175
#define GPMI_IS_MX6SX(x) ((x)->devdata->type == IS_MX6SX)
174176
#define GPMI_IS_MX7D(x) ((x)->devdata->type == IS_MX7D)
177+
#define GPMI_IS_MX8QXP(x) ((x)->devdata->type == IS_MX8QXP)
175178

176179
#define GPMI_IS_MX6(x) (GPMI_IS_MX6Q(x) || GPMI_IS_MX6SX(x) || \
177-
GPMI_IS_MX7D(x))
180+
GPMI_IS_MX7D(x) || GPMI_IS_MX8QXP(x))
181+
178182
#define GPMI_IS_MXS(x) (GPMI_IS_MX23(x) || GPMI_IS_MX28(x))
179183
#endif

0 commit comments

Comments
 (0)