Commit 6b6dc4f4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 0319b848 c1fe77e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ on various other factors also like;
	so the device should have enough free bytes available its OOB/Spare
	area to accommodate ECC for entire page. In general following expression
	helps in determining if given device can accommodate ECC syndrome:
	"2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
	"2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE"
	where
		OOBSIZE		number of bytes in OOB/spare area
		PAGESIZE	number of bytes in main-area of device page
+0 −27
Original line number Diff line number Diff line
RedBoot FLASH Image System (FIS) Partitions
===========================================

The FLASH Image System (FIS) directory is a flash description
format closely associated with the RedBoot boot loader.

It uses one single flash eraseblock in the flash to store an index of
all images in the flash.

This block size will vary depending on flash but is typically
32 KB in size.

Required properties:
- compatible : (required) must be "redboot-fis"
- fis-index-block : (required) a index to the eraseblock containing
  the FIS directory on this device. On a flash memory with 32KB
  eraseblocks, 0 means the first eraseblock at 0x00000000, 1 means the
  second eraseblock at 0x00008000 and so on.

Example:

flash@0 {
	partitions {
		compatible = "redboot-fis";
		fis-index-block = <0>;
	};
};
+42 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mtd/partitions/redboot-fis.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RedBoot FLASH Image System (FIS) Partitions

description: The FLASH Image System (FIS) directory is a flash description
    format closely associated with the RedBoot boot loader.
    It uses one single flash eraseblock in the flash to store an index of
    all images in the flash.
    This block size will vary depending on flash but is typically
    32 KB in size.

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>

properties:
  compatible:
    const: redboot-fis

  fis-index-block:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: a index to the eraseblock containing the FIS directory on this
      device. On a flash memory with 32KB eraseblocks, 0 means the first
      eraseblock at 0x00000000, 1 means the second eraseblock at 0x00008000 and so on.

required:
  - compatible
  - fis-index-block

additionalProperties: false

examples:
  - |
    flash {
      partitions {
        compatible = "redboot-fis";
        fis-index-block = <0>;
      };
    };
+2 −2
Original line number Diff line number Diff line
@@ -1496,7 +1496,7 @@ F: drivers/amba/
F:	include/linux/amba/bus.h
ARM PRIMECELL PL35X NAND CONTROLLER DRIVER
M:	Miquel Raynal <miquel.raynal@bootlin.com@bootlin.com>
M:	Miquel Raynal <miquel.raynal@bootlin.com>
M:	Naga Sureshkumar Relli <nagasure@xilinx.com>
L:	linux-mtd@lists.infradead.org
S:	Maintained
@@ -1504,7 +1504,7 @@ F: Documentation/devicetree/bindings/mtd/arm,pl353-nand-r2p1.yaml
F:	drivers/mtd/nand/raw/pl35x-nand-controller.c
ARM PRIMECELL PL35X SMC DRIVER
M:	Miquel Raynal <miquel.raynal@bootlin.com@bootlin.com>
M:	Miquel Raynal <miquel.raynal@bootlin.com>
M:	Naga Sureshkumar Relli <nagasure@xilinx.com>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
+6 −4
Original line number Diff line number Diff line
@@ -45,10 +45,9 @@ config MTD_BLOCK
	  on RAM chips in this manner. This block device is a user of MTD
	  devices performing that function.

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

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

comment "Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK."
	depends on MTD_BLOCK || MTD_BLOCK_RO

config FTL
	tristate "FTL (Flash Translation Layer) support"
	depends on BLOCK
Loading