Skip to content

Commit bac8a20

Browse files
committed
Merge tag 'mtd/for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD updates from Miquel Raynal: "Core MTD changes: - Use refcount to prevent corruption - Call external _get and _put in right order - Fix use-after-free in mtd release - Explicitly include correct DT includes - Clean refcounting with MTD_PARTITIONED_MASTER - mtdblock: make warning messages ratelimited - dt-bindings: Add SEAMA partition bindings Device driver changes: - Use devm helper functions - Fix questionable cast, remove pointless ones. - error handling fixes - add support for new chip versions - update DT bindings - misc cleanups - fix typos, whitespace, indentation" * tag 'mtd/for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (105 commits) dt-bindings: mtd: amlogic,meson-nand: drop unneeded quotes mtd: spear_smi: Use helper function devm_clk_get_enabled() mtd: rawnand: orion: Use helper function devm_clk_get_optional_enabled() mtd: rawnand: vf610_nfc: Use helper function devm_clk_get_enabled() mtd: rawnand: sunxi: Use helper function devm_clk_get_enabled() mtd: rawnand: stm32_fmc2: Use helper function devm_clk_get_enabled() mtd: rawnand: mtk: Use helper function devm_clk_get_enabled() mtd: rawnand: mpc5121: Use helper function devm_clk_get_enabled() mtd: rawnand: lpc32xx_slc: Use helper function devm_clk_get_enabled() mtd: rawnand: intel: Use helper function devm_clk_get_enabled() mtd: rawnand: fsmc: Use helper function devm_clk_get_enabled() mtd: rawnand: arasan: Use helper function devm_clk_get_enabled() mtd: rawnand: qcom: Add read/read_start ops in exec_op path mtd: rawnand: qcom: Clear buf_count and buf_start in raw read mtd: maps: fix -Wvoid-pointer-to-enum-cast warning mtd: rawnand: fix -Wvoid-pointer-to-enum-cast warning mtd: rawnand: fsmc: handle clk prepare error in fsmc_nand_resume() mtd: rawnand: Propagate error and simplify ternary operators for brcmstb_nand_wait_for_completion() mtd: rawnand: qcom: Sort includes alphabetically mtd: rawnand: qcom: Do not override the error no of submit_descs() ...
2 parents 9290122 + 54a3f6e commit bac8a20

Some content is hidden

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

88 files changed

+1352
-1311
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ patternProperties:
5050
const: hw
5151

5252
nand-ecc-step-size:
53-
const: 1024
53+
enum: [512, 1024]
5454

5555
nand-ecc-strength:
5656
enum: [8, 16, 24, 30, 40, 50, 60]
@@ -66,6 +66,10 @@ patternProperties:
6666

6767
unevaluatedProperties: false
6868

69+
dependencies:
70+
nand-ecc-strength: [nand-ecc-step-size]
71+
nand-ecc-step-size: [nand-ecc-strength]
72+
6973

7074
required:
7175
- compatible

Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ properties:
4343
- const: jedec,spi-nor
4444
- const: jedec,spi-nor
4545
description:
46-
Must also include "jedec,spi-nor" for any SPI NOR flash that can be
47-
identified by the JEDEC READ ID opcode (0x9F).
46+
SPI NOR flashes compatible with the JEDEC SFDP standard or which may be
47+
identified with the READ ID opcode (0x9F) do not deserve a specific
48+
compatible. They should instead only be matched against the generic
49+
"jedec,spi-nor" compatible.
4850

4951
reg:
5052
minItems: 1
@@ -70,6 +72,21 @@ properties:
7072
be used on such systems, to denote the absence of a reliable reset
7173
mechanism.
7274

75+
no-wp:
76+
type: boolean
77+
description:
78+
The status register write disable (SRWD) bit in status register, combined
79+
with the WP# signal, provides hardware data protection for the device. When
80+
the SRWD bit is set to 1, and the WP# signal is either driven LOW or hard
81+
strapped to LOW, the status register nonvolatile bits become read-only and
82+
the WRITE STATUS REGISTER operation will not execute. The only way to exit
83+
this hardware-protected mode is to drive WP# HIGH. If the WP# signal of the
84+
flash device is not connected or is wrongly tied to GND (that includes internal
85+
pull-downs) then status register permanently becomes read-only as the SRWD bit
86+
cannot be reset. This boolean flag can be used on such systems to avoid setting
87+
the SRWD bit while writing the status register. WP# signal hard strapped to GND
88+
can be a valid use case.
89+
7390
reset-gpios:
7491
description:
7592
A GPIO line connected to the RESET (active low) signal of the device.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ properties:
1616
- const: marvell,armada-8k-nand-controller
1717
- const: marvell,armada370-nand-controller
1818
- enum:
19+
- marvell,ac5-nand-controller
1920
- marvell,armada370-nand-controller
2021
- marvell,pxa3xx-nand-controller
2122
- description: legacy bindings

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: GPL-2.0
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22
%YAML 1.2
33
---
44
$id: http://devicetree.org/schemas/mtd/nand-controller.yaml#

Documentation/devicetree/bindings/mtd/oxnas-nand.txt

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Seattle Image Partitions
8+
9+
description: The SEAttle iMAge (SEAMA) partition is a type of partition
10+
used for NAND flash devices. This type of flash image is found in some
11+
D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
12+
DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
13+
(MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
14+
does not have children defined in the device tree, they need to be
15+
detected by software.
16+
17+
allOf:
18+
- $ref: partition.yaml#
19+
20+
maintainers:
21+
- Linus Walleij <linus.walleij@linaro.org>
22+
23+
properties:
24+
compatible:
25+
const: seama
26+
27+
required:
28+
- compatible
29+
30+
unevaluatedProperties: false
31+
32+
examples:
33+
- |
34+
partitions {
35+
compatible = "fixed-partitions";
36+
#address-cells = <1>;
37+
#size-cells = <1>;
38+
39+
partition@0 {
40+
compatible = "seama";
41+
reg = <0x0 0x800000>;
42+
label = "firmware";
43+
};
44+
};

drivers/mtd/devices/docg3.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ static void doc_unregister_sysfs(struct platform_device *pdev,
15991599
*/
16001600
static int flashcontrol_show(struct seq_file *s, void *p)
16011601
{
1602-
struct docg3 *docg3 = (struct docg3 *)s->private;
1602+
struct docg3 *docg3 = s->private;
16031603

16041604
u8 fctrl;
16051605

@@ -1621,7 +1621,7 @@ DEFINE_SHOW_ATTRIBUTE(flashcontrol);
16211621

16221622
static int asic_mode_show(struct seq_file *s, void *p)
16231623
{
1624-
struct docg3 *docg3 = (struct docg3 *)s->private;
1624+
struct docg3 *docg3 = s->private;
16251625

16261626
int pctrl, mode;
16271627

@@ -1658,7 +1658,7 @@ DEFINE_SHOW_ATTRIBUTE(asic_mode);
16581658

16591659
static int device_id_show(struct seq_file *s, void *p)
16601660
{
1661-
struct docg3 *docg3 = (struct docg3 *)s->private;
1661+
struct docg3 *docg3 = s->private;
16621662
int id;
16631663

16641664
mutex_lock(&docg3->cascade->lock);
@@ -1672,7 +1672,7 @@ DEFINE_SHOW_ATTRIBUTE(device_id);
16721672

16731673
static int protection_show(struct seq_file *s, void *p)
16741674
{
1675-
struct docg3 *docg3 = (struct docg3 *)s->private;
1675+
struct docg3 *docg3 = s->private;
16761676
int protect, dps0, dps0_low, dps0_high, dps1, dps1_low, dps1_high;
16771677

16781678
mutex_lock(&docg3->cascade->lock);

drivers/mtd/devices/mchp23k256.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/sizes.h>
1616
#include <linux/spi/flash.h>
1717
#include <linux/spi/spi.h>
18-
#include <linux/of_device.h>
18+
#include <linux/of.h>
1919

2020
#define MAX_CMD_SIZE 4
2121

drivers/mtd/devices/mchp48l640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/sizes.h>
2323
#include <linux/spi/flash.h>
2424
#include <linux/spi/spi.h>
25-
#include <linux/of_device.h>
25+
#include <linux/of.h>
2626

2727
struct mchp48_caps {
2828
unsigned int size;

drivers/mtd/devices/mtd_dataflash.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/err.h>
1414
#include <linux/math64.h>
1515
#include <linux/of.h>
16-
#include <linux/of_device.h>
1716

1817
#include <linux/spi/spi.h>
1918
#include <linux/spi/flash.h>

0 commit comments

Comments
 (0)