Skip to content

Commit 6b6dc4f

Browse files
committed
Merge tag 'mtd/for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD updates from Miquel Raynal: "MTD changes: - blkdevs: - Simplify the refcounting in blktrans_{open, release} - Simplify blktrans_getgeo - Remove blktrans_ref_mutex - Simplify blktrans_dev_get - Use lockdep_assert_held - Don't hold del_mtd_blktrans_dev in blktrans_{open, release} - ftl: - Don't cast away the type when calling add_mtd_blktrans_dev - Don't cast away the type when calling add_mtd_blktrans_dev - Use container_of() rather than cast - Fix use-after-free - Add discard support - Allow use of MTD_RAM for testing purposes - concat: - Check _read, _write callbacks existence before assignment - Judge callback existence based on the master - maps: - Maps: remove dead MTD map driver for PMC-Sierra MSP boards - mtdblock: - Warn if added for a NAND device - Add comment about UBI block devices - Update old JFFS2 mention in Kconfig - partitions: - Redboot: convert to YAML NAND core changes: - Repair Miquel Raynal's email address in MAINTAINERS - Fix a couple of spelling mistakes in Kconfig - bbt: Skip bad blocks when searching for the BBT in NAND - Remove never changed ret variable Raw NAND changes: - cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()' - intel: Fix error handling in probe - omap: Fix kernel doc warning on 'calcuate' typo - gpmc: Fix the ECC bytes vs. OOB bytes equation SPI-NAND core changes: - Properly fill the OOB area. - Fix comment SPI-NAND drivers changes: - macronix: Add Quad support for serial NAND flash" * tag 'mtd/for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (30 commits) mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()' mtd_blkdevs: simplify the refcounting in blktrans_{open, release} mtd_blkdevs: simplify blktrans_getgeo mtd_blkdevs: remove blktrans_ref_mutex mtd_blkdevs: simplify blktrans_dev_get mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev mtd/ftl: don't cast away the type when calling add_mtd_blktrans_dev mtd_blkdevs: use lockdep_assert_held mtd_blkdevs: don't hold del_mtd_blktrans_dev in blktrans_{open, release} mtd: rawnand: intel: Fix error handling in probe mtd: mtdconcat: Check _read, _write callbacks existence before assignment mtd: mtdconcat: Judge callback existence based on the master mtd: maps: remove dead MTD map driver for PMC-Sierra MSP boards mtd: rfd_ftl: use container_of() rather than cast mtd: rfd_ftl: fix use-after-free mtd: rfd_ftl: add discard support mtd: rfd_ftl: allow use of MTD_RAM for testing purposes mtdblock: Warn if added for a NAND device mtd: spinand: macronix: Add Quad support for serial NAND flash mtdblock: Add comment about UBI block devices ...
2 parents 0319b84 + c1fe77e commit 6b6dc4f

File tree

22 files changed

+198
-381
lines changed

22 files changed

+198
-381
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ on various other factors also like;
122122
so the device should have enough free bytes available its OOB/Spare
123123
area to accommodate ECC for entire page. In general following expression
124124
helps in determining if given device can accommodate ECC syndrome:
125-
"2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
125+
"2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE"
126126
where
127127
OOBSIZE number of bytes in OOB/spare area
128128
PAGESIZE number of bytes in main-area of device page

Documentation/devicetree/bindings/mtd/partitions/redboot-fis.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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/redboot-fis.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: RedBoot FLASH Image System (FIS) Partitions
8+
9+
description: The FLASH Image System (FIS) directory is a flash description
10+
format closely associated with the RedBoot boot loader.
11+
It uses one single flash eraseblock in the flash to store an index of
12+
all images in the flash.
13+
This block size will vary depending on flash but is typically
14+
32 KB in size.
15+
16+
maintainers:
17+
- Linus Walleij <[email protected]>
18+
19+
properties:
20+
compatible:
21+
const: redboot-fis
22+
23+
fis-index-block:
24+
$ref: /schemas/types.yaml#/definitions/uint32
25+
description: a index to the eraseblock containing the FIS directory on this
26+
device. On a flash memory with 32KB eraseblocks, 0 means the first
27+
eraseblock at 0x00000000, 1 means the second eraseblock at 0x00008000 and so on.
28+
29+
required:
30+
- compatible
31+
- fis-index-block
32+
33+
additionalProperties: false
34+
35+
examples:
36+
- |
37+
flash {
38+
partitions {
39+
compatible = "redboot-fis";
40+
fis-index-block = <0>;
41+
};
42+
};

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,15 +1496,15 @@ F: drivers/amba/
14961496
F: include/linux/amba/bus.h
14971497

14981498
ARM PRIMECELL PL35X NAND CONTROLLER DRIVER
1499-
M: Miquel Raynal <[email protected]@bootlin.com>
1499+
M: Miquel Raynal <[email protected]>
15001500
M: Naga Sureshkumar Relli <[email protected]>
15011501
15021502
S: Maintained
15031503
F: Documentation/devicetree/bindings/mtd/arm,pl353-nand-r2p1.yaml
15041504
F: drivers/mtd/nand/raw/pl35x-nand-controller.c
15051505

15061506
ARM PRIMECELL PL35X SMC DRIVER
1507-
M: Miquel Raynal <[email protected]@bootlin.com>
1507+
M: Miquel Raynal <[email protected]>
15081508
M: Naga Sureshkumar Relli <[email protected]>
15091509
L: [email protected] (moderated for non-subscribers)
15101510
S: Maintained

drivers/mtd/Kconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ config MTD_BLOCK
4545
on RAM chips in this manner. This block device is a user of MTD
4646
devices performing that function.
4747

48-
At the moment, it is also required for the Journalling Flash File
49-
System(s) to obtain a handle on the MTD device when it's mounted
50-
(although JFFS and JFFS2 don't actually use any of the functionality
51-
of the mtdblock device).
48+
Note that mounting a JFFS2 filesystem doesn't require using mtdblock.
49+
It's possible to mount a rootfs using the MTD device on the "root="
50+
bootargs as "root=mtd2" or "root=mtd:name_of_device".
5251

5352
Later, it may be extended to perform read/erase/modify/write cycles
5453
on flash chips to emulate a smaller block size. Needless to say,
@@ -70,6 +69,9 @@ config MTD_BLOCK_RO
7069
You do not need this option for use with the DiskOnChip devices. For
7170
those, enable NFTL support (CONFIG_NFTL) instead.
7271

72+
comment "Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK."
73+
depends on MTD_BLOCK || MTD_BLOCK_RO
74+
7375
config FTL
7476
tristate "FTL (Flash Translation Layer) support"
7577
depends on BLOCK

drivers/mtd/ftl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
10291029

10301030
partition->mbd.tr = tr;
10311031
partition->mbd.devnum = -1;
1032-
if (!add_mtd_blktrans_dev((void *)partition))
1032+
if (!add_mtd_blktrans_dev(&partition->mbd))
10331033
return;
10341034
}
10351035

drivers/mtd/maps/Kconfig

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -127,29 +127,6 @@ config MTD_PHYSMAP_GPIO_ADDR
127127
Extend the physmap driver to allow flashes to be partially
128128
physically addressed and assisted by GPIOs.
129129

130-
config MTD_PMC_MSP_EVM
131-
tristate "CFI Flash device mapped on PMC-Sierra MSP"
132-
depends on PMC_MSP && MTD_CFI
133-
help
134-
This provides a 'mapping' driver which supports the way
135-
in which user-programmable flash chips are connected on the
136-
PMC-Sierra MSP eval/demo boards.
137-
138-
choice
139-
prompt "Maximum mappable memory available for flash IO"
140-
depends on MTD_PMC_MSP_EVM
141-
default MSP_FLASH_MAP_LIMIT_32M
142-
143-
config MSP_FLASH_MAP_LIMIT_32M
144-
bool "32M"
145-
146-
endchoice
147-
148-
config MSP_FLASH_MAP_LIMIT
149-
hex
150-
default "0x02000000"
151-
depends on MSP_FLASH_MAP_LIMIT_32M
152-
153130
config MTD_SUN_UFLASH
154131
tristate "Sun Microsystems userflash support"
155132
depends on SPARC && MTD_CFI && PCI

drivers/mtd/maps/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ physmap-objs-$(CONFIG_MTD_PHYSMAP_IXP4XX) += physmap-ixp4xx.o
2525
physmap-objs := $(physmap-objs-y)
2626
obj-$(CONFIG_MTD_PHYSMAP) += physmap.o
2727
obj-$(CONFIG_MTD_PISMO) += pismo.o
28-
obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcmsp-flash.o
2928
obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
3029
obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o
3130
obj-$(CONFIG_MTD_SBC_GXX) += sbc_gxx.o

drivers/mtd/maps/pmcmsp-flash.c

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

0 commit comments

Comments
 (0)