Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02f0d3f7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-20151106' of git://git.infradead.org/linux-mtd

Pull MTD updates from Brian Norris:
 "Core:

   - WARN (in some cases) when a struct mtd_info is registered multiple
     times; in the past this was "supported", but it's still error prone
     for future development.  There's only one ugly case of this left in
     the tree (that we're aware of) and the owners are aware of the
     problems there.

   - fix potential deadlock in the blkdev removal path NOTE: the
     (potential) deadlock was introduced in a for-stable patch.  This
     one is also marked for -stable.

   - ioctl(BLKPG) compat_ioctl support; resolves issues with 32-bit user
     space vs 64-bit kernel space

   - Set MTD parent device correctly throughout the tree, so the tree
     structure appears correctly in sysfs; many drivers were missing
     this (soft) requirement

   - Move device tree partitions (ofpart) into a dedicated 'partitions'
     subnode; this helps to disambiguate whether a node is a partition
     or some other auxiliary data

   - Improve error handling for partitioning failures

  NAND:

   - General: Increase timeout period, for corner-case systems with
     less-than-accurate jiffies

   - Fix OF-based autoloading of several NAND drivers when built as
     modules

   - pxa3xx_nand:
      - Rework timing configuration to be more dynamic
      - Refactor PM support

   - brcmnand: prepare for NorthStar 2 support (ARM64, 16-bit NAND
     chips)

   - sunxi_nand: refactoring and a few bug fixes

   - vf610: new NAND driver

   - FSMC: add SW BCH support; support common NAND DT bindings

   - lpc32xx_slc: refactor and improve timing calculations logic

   - denali: support for rev 5.1

  SPI NOR:

   - Layering improvements

   - Added Winbond lock/unlock support

   - Added mtd_is_locked() (i.e., ioctl(MEMISLOCKED)) support

   - Increase full-chip-erase timeout linearly with flash size

   - fsl-quadspi: fix compile for non-ARM architectures

   - New flash support"

* tag 'for-linus-20151106' of git://git.infradead.org/linux-mtd: (169 commits)
  mtd: don't WARN about overloaded users of mtd->reboot_notifier.notifier_call
  mtd: nand: sunxi: avoid retrieving data before ECC pass
  mtd: nand: sunxi: fix sunxi_nfc_hw_ecc_read/write_chunk()
  mtd: blkdevs: fix potential deadlock + lockdep warnings
  mtd: ofpart: move ofpart partitions to a dedicated dt node
  doc: dt: mtd: support partitions in a special 'partitions' subnode
  mtd: brcmnand: Force 8bit mode before doing nand_scan_ident()
  mtd: brcmnand: factor out CFG and CFG_EXT bitfields
  mtd: mtdpart: Do not fail mtd probe when parsing partitions fails
  mtd: fsl-quadspi: fix macro collision problems with READ/WRITE
  mtd: warn when registering the same master many times
  mtd: fixup corner case error handling in mtd_device_parse_register()
  mtd: tests: Replace timeval with ktime_t
  mtd: fsmc_nand: Add BCH4 SW ECC support for SPEAr600
  mtd: nand: vf610_nfc: use nand_check_erased_ecc_chunk() helper
  mtd: nand: increase ready wait timeout and report timeouts
  mtd: docg3: off by one in doc_register_sysfs()
  mtd: pxa3xx_nand: clean up the pxa3xx timings
  mtd: pxa3xx_nand: rework flash detection and timing setup
  mtd: pxa3xx_nand: add helpers to setup the timings
  ...
parents 2d49dcb9 f8479dd6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@ Optional properties:
                 command is asserted. Zero means one cycle, 255 means 256
                 cycles.
- bank: default NAND bank to use (0-3 are valid, 0 is the default).
- nand-ecc-mode      : see nand.txt
- nand-ecc-strength  : see nand.txt
- nand-ecc-step-size : see nand.txt

Can support 1-bit HW ECC (default) or if stronger correction is required,
software-based BCH.

Example:

+42 −29
Original line number Diff line number Diff line
@@ -4,10 +4,17 @@ Partitions can be represented by sub-nodes of an mtd device. This can be used
on platforms which have strong conventions about which portions of a flash are
used for what purposes, but which don't use an on-flash partition table such
as RedBoot.
NOTE: if the sub-node has a compatible string, then it is not a partition.

#address-cells & #size-cells must both be present in the mtd device. There are
two valid values for both:
The partition table should be a subnode of the mtd node and should be named
'partitions'. Partitions are defined in subnodes of the partitions node.

For backwards compatibility partitions as direct subnodes of the mtd device are
supported. This use is discouraged.
NOTE: also for backwards compatibility, direct subnodes that have a compatible
string are not considered partitions, as they may be used for other bindings.

#address-cells & #size-cells must both be present in the partitions subnode of the
mtd device. There are two valid values for both:
<1>: for partitions that require a single 32-bit cell to represent their
     size/address (aka the value is below 4 GiB)
<2>: for partitions that require two 32-bit cells to represent their
@@ -28,6 +35,7 @@ Examples:


flash@0 {
	partitions {
		#address-cells = <1>;
		#size-cells = <1>;

@@ -41,8 +49,10 @@ flash@0 {
			reg = <0x0100000 0x200000>;
		};
	};
};

flash@1 {
	partitions {
		#address-cells = <1>;
		#size-cells = <2>;

@@ -52,8 +62,10 @@ flash@1 {
			reg = <0x00000000 0x1 0x00000000>;
		};
	};
};

flash@2 {
	partitions {
		#address-cells = <2>;
		#size-cells = <2>;

@@ -69,3 +81,4 @@ flash@2 {
			reg = <0x2 0x00000000 0x1 0x00000000>;
		};
	};
};
+59 −0
Original line number Diff line number Diff line
Freescale's NAND flash controller (NFC)

This variant of the Freescale NAND flash controller (NFC) can be found on
Vybrid (vf610), MPC5125, MCF54418 and Kinetis K70.

Required properties:
- compatible: Should be set to "fsl,vf610-nfc".
- reg: address range of the NFC.
- interrupts: interrupt of the NFC.
- #address-cells: shall be set to 1. Encode the nand CS.
- #size-cells : shall be set to 0.
- assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>;
- assigned-clock-rates: The NAND bus timing is derived from this clock
    rate and should not exceed maximum timing for any NAND memory chip
    in a board stuffing. Typical NAND memory timings derived from this
    clock are found in the SoC hardware reference manual. Furthermore,
    there might be restrictions on maximum rates when using hardware ECC.

- #address-cells, #size-cells : Must be present if the device has sub-nodes
  representing partitions.

Required children nodes:
Children nodes represent the available nand chips. Currently the driver can
only handle one NAND chip.

Required properties:
- compatible: Should be set to "fsl,vf610-nfc-cs".
- nand-bus-width: see nand.txt
- nand-ecc-mode: see nand.txt

Required properties for hardware ECC:
- nand-ecc-strength: supported strengths are 24 and 32 bit (see nand.txt)
- nand-ecc-step-size: step size equals page size, currently only 2k pages are
    supported
- nand-on-flash-bbt: see nand.txt

Example:

	nfc: nand@400e0000 {
		compatible = "fsl,vf610-nfc";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x400e0000 0x4000>;
		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&clks VF610_CLK_NFC>;
		clock-names = "nfc";
		assigned-clocks = <&clks VF610_CLK_NFC>;
		assigned-clock-rates = <33000000>;

		nand@0 {
			compatible = "fsl,vf610-nfc-nandcs";
			reg = <0>;
			nand-bus-width = <8>;
			nand-ecc-mode = "hw";
			nand-ecc-strength = <32>;
			nand-ecc-step-size = <2048>;
			nand-on-flash-bbt;
		};
	};
+6 −0
Original line number Diff line number Diff line
@@ -11270,6 +11270,12 @@ S: Maintained
F:	Documentation/fb/uvesafb.txt
F:	drivers/video/fbdev/uvesafb.*

VF610 NAND DRIVER
M:	Stefan Agner <stefan@agner.ch>
L:	linux-mtd@lists.infradead.org
S:	Supported
F:	drivers/mtd/nand/vf610_nfc.c

VFAT/FAT/MSDOS FILESYSTEM
M:	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
S:	Maintained
+0 −3
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@ static struct regulator_consumer_supply dummy_supplies[] = {
	REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};

static const char *part_probes[] = { "cmdlinepart", NULL };

static struct mtd_partition rsk_partitions[] = {
	{
		.name		= "Bootloader",
@@ -50,7 +48,6 @@ static struct physmap_flash_data flash_data = {
	.parts			= rsk_partitions,
	.nr_parts		= ARRAY_SIZE(rsk_partitions),
	.width			= 2,
	.part_probe_types	= part_probes,
};

static struct resource flash_resource = {
Loading