Skip to content

Commit

Permalink
Merge tag 'mtd/for-4.17' of git://git.infradead.org/linux-mtd
Browse files Browse the repository at this point in the history
Pull MTD updates from Boris Brezillon:
 "MTD Core:
   - Remove support for asynchronous erase (not implemented by any of
     the existing drivers anyway)
   - Remove Cyrille from the list of SPI NOR and MTD maintainers
   - Fix kernel doc headers
   - Allow users to define the partitions parsers they want to test
     through a DT property (compatible of the partitions subnode)
   - Remove the bfin-async-flash driver (the only architecture using it
     has been removed)
   - Fix pagetest test
   - Add extra checks in mtd_erase()
   - Simplify the MTD partition creation logic and get rid of
     mtd_add_device_partitions()

  MTD Drivers:
   - Add endianness information to the physmap DT binding
   - Add Eon EN29LV400A IDs to JEDEC probe logic
   - Use %*ph where appropriate

  SPI NOR Drivers:
   - Make fsl-quaspi assign different names to MTD devices connected to
     the same QSPI controller
   - Remove an unneeded driver.bus assigned in the fsl-qspi driver

  NAND Core:
   - Prepare arrival of the SPI NAND subsystem by implementing a generic
     (interface-agnostic) layer to ease manipulation of NAND devices
   - Move onenand code base to the drivers/mtd/nand/ dir
   - Rework timing mode selection
   - Provide a generic way for NAND chip drivers to flag a specific
     GET/SET FEATURE operation as supported/unsupported
   - Stop embedding ONFI/JEDEC param page in nand_chip

  NAND Drivers:
   - Rework/cleanup of the mxc driver
   - Various cleanups in the vf610 driver
   - Migrate the fsmc and vf610 to ->exec_op()
   - Get rid of the pxa driver (replaced by marvell_nand)
   - Support ->setup_data_interface() in the GPMI driver
   - Fix probe error path in several drivers
   - Remove support for unused hw_syndrome mode in sunxi_nand
   - Various minor improvements"

* tag 'mtd/for-4.17' of git://git.infradead.org/linux-mtd: (89 commits)
  dt-bindings: fsl-quadspi: Add the example of two SPI NOR
  mtd: fsl-quadspi: Distinguish the mtd device names
  mtd: nand: Fix some function description mismatches in core.c
  mtd: fsl-quadspi: Remove unneeded driver.bus assignment
  mtd: rawnand: marvell: Rename ->ecc_clk into ->core_clk
  mtd: rawnand: s3c2410: enhance the probe function error path
  mtd: rawnand: tango: fix probe function error path
  mtd: rawnand: sh_flctl: fix the probe function error path
  mtd: rawnand: omap2: fix the probe function error path
  mtd: rawnand: mxc: fix probe function error path
  mtd: rawnand: denali: fix probe function error path
  mtd: rawnand: davinci: fix probe function error path
  mtd: rawnand: cafe: fix probe function error path
  mtd: rawnand: brcmnand: fix probe function error path
  mtd: rawnand: sunxi: Stop supporting ECC_HW_SYNDROME mode
  mtd: rawnand: marvell: Fix clock resource by adding a register clock
  mtd: ftl: Use DIV_ROUND_UP()
  mtd: Fix some function description mismatches in mtdcore.c
  mtd: physmap_of: update struct map_info's swap as per map requirement
  dt-bindings: mtd-physmap: Add endianness supports
  ...
  • Loading branch information
torvalds committed Apr 6, 2018
2 parents 83c7c18 + fe5f31a commit 3fd14cd
Show file tree
Hide file tree
Showing 170 changed files with 3,704 additions and 4,372 deletions.
7 changes: 4 additions & 3 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Axel Lin <[email protected]>
Ben Gardner <[email protected]>
Ben M Cahill <[email protected]>
Björn Steinbrink <[email protected]>
Boris Brezillon <[email protected]>
Boris Brezillon <boris.brezillon@free-electrons.com> <[email protected]>
Boris Brezillon <boris.brezillon@free-electrons.com> <[email protected]>
Boris Brezillon <boris.brezillon@bootlin.com> <boris.brezillon@free-electrons.com>
Boris Brezillon <boris.brezillon@bootlin.com> <[email protected]>
Boris Brezillon <boris.brezillon@bootlin.com> <[email protected]>
Brian Avery <[email protected]>
Brian King <[email protected]>
Christoph Hellwig <[email protected]>
Expand Down Expand Up @@ -128,6 +128,7 @@ Mayuresh Janorkar <[email protected]>
Michael Buesch <[email protected]>
Michel Dänzer <[email protected]>
Miodrag Dinic <[email protected]> <[email protected]>
Miquel Raynal <[email protected]> <[email protected]>
Mitesh shah <[email protected]>
Mohit Kumar <[email protected]> <[email protected]>
Morten Welinder <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/arm/Samsung-S3C24XX/S3C2412.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ NAND
----

The NAND hardware is similar to the S3C2440, and is supported by the
s3c2410 driver in the drivers/mtd/nand directory.
s3c2410 driver in the drivers/mtd/nand/raw directory.


USB Host
Expand Down
24 changes: 24 additions & 0 deletions Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,27 @@ qspi0: quadspi@40044000 {
....
};
};

Example showing the usage of two SPI NOR devices:

&qspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_qspi2>;
status = "okay";

flash0: n25q256a@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "micron,n25q256a", "jedec,spi-nor";
spi-max-frequency = <29000000>;
reg = <0>;
};

flash1: n25q256a@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "micron,n25q256a", "jedec,spi-nor";
spi-max-frequency = <29000000>;
reg = <1>;
};
};
5 changes: 4 additions & 1 deletion Documentation/devicetree/bindings/mtd/marvell-nand.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Required properties:
- #address-cells: shall be set to 1. Encode the NAND CS.
- #size-cells: shall be set to 0.
- interrupts: shall define the NAND controller interrupt.
- clocks: shall reference the NAND controller clock.
- clocks: shall reference the NAND controller clocks, the second one is
is only needed for the Armada 7K/8K SoCs
- clock-names: mandatory if there is a second clock, in this case there
should be one clock named "core" and another one named "reg"
- marvell,system-controller: Set to retrieve the syscon node that handles
NAND controller related registers (only required with the
"marvell,armada-8k-nand[-controller]" compatibles).
Expand Down
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/mtd/mtd-physmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ additional (optional) property is defined:

- erase-size : The chip's physical erase block size in bytes.

The device tree may optionally contain endianness property.
little-endian or big-endian : It Represents the endianness that should be used
by the controller to properly read/write data
from/to the flash. If this property is missing,
the endianness is chosen by the system
(potentially based on extra configuration options).

The device tree may optionally contain sub-nodes describing partitions of the
address space. See partition.txt for more detail.

Expand Down
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/mtd/sunxi-nand.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Optional properties:
- allwinner,rb : shall contain the native Ready/Busy ids.
or
- rb-gpios : shall contain the gpios used as R/B pins.
- nand-ecc-mode : one of the supported ECC modes ("hw", "hw_syndrome", "soft",
"soft_bch" or "none")
- nand-ecc-mode : one of the supported ECC modes ("hw", "soft", "soft_bch" or
"none")

see Documentation/devicetree/bindings/mtd/nand.txt for generic bindings.

Expand Down
4 changes: 2 additions & 2 deletions Documentation/driver-api/gpio/drivers-on-gpio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ hardware descriptions such as device tree or ACPI:
it from 1-to-0-to-1. If that hardware does not receive its "ping"
periodically, it will reset the system.

- gpio-nand: drivers/mtd/nand/gpio.c is used to connect a NAND flash chip to
a set of simple GPIO lines: RDY, NCE, ALE, CLE, NWP. It interacts with the
- gpio-nand: drivers/mtd/nand/raw/gpio.c is used to connect a NAND flash chip
to a set of simple GPIO lines: RDY, NCE, ALE, CLE, NWP. It interacts with the
NAND flash MTD subsystem and provides chip access and partition parsing like
any other NAND driving hardware.

Expand Down
8 changes: 4 additions & 4 deletions Documentation/driver-api/mtdnand.rst
Original file line number Diff line number Diff line change
Expand Up @@ -967,10 +967,10 @@ API functions which are exported. Each function has a short description
which is marked with an [XXX] identifier. See the chapter "Documentation
hints" for an explanation.

.. kernel-doc:: drivers/mtd/nand/nand_base.c
.. kernel-doc:: drivers/mtd/nand/raw/nand_base.c
:export:

.. kernel-doc:: drivers/mtd/nand/nand_ecc.c
.. kernel-doc:: drivers/mtd/nand/raw/nand_ecc.c
:export:

Internal Functions Provided
Expand All @@ -982,10 +982,10 @@ marked with an [XXX] identifier. See the chapter "Documentation hints"
for an explanation. The functions marked with [DEFAULT] might be
relevant for a board driver developer.

.. kernel-doc:: drivers/mtd/nand/nand_base.c
.. kernel-doc:: drivers/mtd/nand/raw/nand_base.c
:internal:

.. kernel-doc:: drivers/mtd/nand/nand_bbt.c
.. kernel-doc:: drivers/mtd/nand/raw/nand_bbt.c
:internal:

Credits
Expand Down
36 changes: 17 additions & 19 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ F: arch/arm/boot/dts/aspeed-*
F: drivers/*/*aspeed*

ARM/ATMEL AT91 Clock Support
M: Boris Brezillon <boris.brezillon@free-electrons.com>
M: Boris Brezillon <boris.brezillon@bootlin.com>
S: Maintained
F: drivers/clk/at91

Expand Down Expand Up @@ -1721,7 +1721,7 @@ F: drivers/input/keyboard/w90p910_keypad.c
F: drivers/input/touchscreen/w90p910_ts.c
F: drivers/watchdog/nuc900_wdt.c
F: drivers/net/ethernet/nuvoton/w90p910_ether.c
F: drivers/mtd/nand/nuc900_nand.c
F: drivers/mtd/nand/raw/nuc900_nand.c
F: drivers/rtc/rtc-nuc900.c
F: drivers/spi/spi-nuc900.c
F: drivers/usb/host/ehci-w90x900.c
Expand Down Expand Up @@ -2999,7 +2999,7 @@ M: Kamal Dasu <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
F: drivers/mtd/nand/brcmnand/
F: drivers/mtd/nand/raw/brcmnand/

BROADCOM STB DPFE DRIVER
M: Markus Mayer <[email protected]>
Expand Down Expand Up @@ -4091,7 +4091,7 @@ DENALI NAND DRIVER
M: Masahiro Yamada <[email protected]>
L: [email protected]
S: Supported
F: drivers/mtd/nand/denali*
F: drivers/mtd/nand/raw/denali*

DESIGNWARE USB2 DRD IP DRIVER
M: Minas Harutyunyan <[email protected]>
Expand Down Expand Up @@ -4633,7 +4633,7 @@ F: Documentation/gpu/meson.rst
T: git git://anongit.freedesktop.org/drm/drm-misc

DRM DRIVERS FOR ATMEL HLCDC
M: Boris Brezillon <boris.brezillon@free-electrons.com>
M: Boris Brezillon <boris.brezillon@bootlin.com>
L: [email protected]
S: Supported
F: drivers/gpu/drm/atmel-hlcdc/
Expand Down Expand Up @@ -5630,7 +5630,7 @@ FREESCALE GPMI NAND DRIVER
M: Han Xu <[email protected]>
L: [email protected]
S: Maintained
F: drivers/mtd/nand/gpmi-nand/*
F: drivers/mtd/nand/raw/gpmi-nand/*

FREESCALE I2C CPM DRIVER
M: Jochen Friedrich <[email protected]>
Expand Down Expand Up @@ -6943,7 +6943,7 @@ INGENIC JZ4780 NAND DRIVER
M: Harvey Hunt <[email protected]>
L: [email protected]
S: Maintained
F: drivers/mtd/nand/jz4780_*
F: drivers/mtd/nand/raw/jz4780_*

INOTIFY
M: Jan Kara <[email protected]>
Expand Down Expand Up @@ -8431,7 +8431,7 @@ F: include/uapi/drm/armada_drm.h
F: Documentation/devicetree/bindings/display/armada/

MARVELL CRYPTO DRIVER
M: Boris Brezillon <boris.brezillon@free-electrons.com>
M: Boris Brezillon <boris.brezillon@bootlin.com>
M: Arnaud Ebalard <[email protected]>
F: drivers/crypto/marvell/
S: Maintained
Expand Down Expand Up @@ -8490,10 +8490,10 @@ S: Odd Fixes
F: drivers/net/wireless/marvell/mwl8k.c

MARVELL NAND CONTROLLER DRIVER
M: Miquel Raynal <miquel.raynal@free-electrons.com>
M: Miquel Raynal <miquel.raynal@bootlin.com>
L: [email protected]
S: Maintained
F: drivers/mtd/nand/marvell_nand.c
F: drivers/mtd/nand/raw/marvell_nand.c
F: Documentation/devicetree/bindings/mtd/marvell-nand.txt

MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
Expand Down Expand Up @@ -9098,10 +9098,9 @@ F: mm/
MEMORY TECHNOLOGY DEVICES (MTD)
M: David Woodhouse <[email protected]>
M: Brian Norris <[email protected]>
M: Boris Brezillon <boris.brezillon@free-electrons.com>
M: Boris Brezillon <boris.brezillon@bootlin.com>
M: Marek Vasut <[email protected]>
M: Richard Weinberger <[email protected]>
M: Cyrille Pitchen <[email protected]>
L: [email protected]
W: http://www.linux-mtd.infradead.org/
Q: http://patchwork.ozlabs.org/project/linux-mtd/list/
Expand Down Expand Up @@ -9186,7 +9185,7 @@ M: Wenyou Yang <[email protected]>
M: Josh Wu <[email protected]>
L: [email protected]
S: Supported
F: drivers/mtd/nand/atmel/*
F: drivers/mtd/nand/raw/atmel/*
F: Documentation/devicetree/bindings/mtd/atmel-nand.txt

MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
Expand Down Expand Up @@ -9518,7 +9517,7 @@ S: Supported
F: drivers/net/ethernet/myricom/myri10ge/

NAND FLASH SUBSYSTEM
M: Boris Brezillon <boris.brezillon@free-electrons.com>
M: Boris Brezillon <boris.brezillon@bootlin.com>
R: Richard Weinberger <[email protected]>
L: [email protected]
W: http://www.linux-mtd.infradead.org/
Expand Down Expand Up @@ -10312,7 +10311,7 @@ ONENAND FLASH DRIVER
M: Kyungmin Park <[email protected]>
L: [email protected]
S: Maintained
F: drivers/mtd/onenand/
F: drivers/mtd/nand/onenand/
F: include/linux/mtd/onenand*.h

ONSTREAM SCSI TAPE DRIVER
Expand Down Expand Up @@ -11921,8 +11920,8 @@ F: drivers/memstick/host/r592.*
RICOH SMARTMEDIA/XD DRIVER
M: Maxim Levitsky <[email protected]>
S: Maintained
F: drivers/mtd/nand/r852.c
F: drivers/mtd/nand/r852.h
F: drivers/mtd/nand/raw/r852.c
F: drivers/mtd/nand/raw/r852.h

RISC-V ARCHITECTURE
M: Palmer Dabbelt <[email protected]>
Expand Down Expand Up @@ -13118,7 +13117,6 @@ F: arch/arm/boot/dts/spear*
F: arch/arm/mach-spear/

SPI NOR SUBSYSTEM
M: Cyrille Pitchen <[email protected]>
M: Marek Vasut <[email protected]>
L: [email protected]
W: http://www.linux-mtd.infradead.org/
Expand Down Expand Up @@ -14762,7 +14760,7 @@ VF610 NAND DRIVER
M: Stefan Agner <[email protected]>
L: [email protected]
S: Supported
F: drivers/mtd/nand/vf610_nfc.c
F: drivers/mtd/nand/raw/vf610_nfc.c

VFAT/FAT/MSDOS FILESYSTEM
M: OGAWA Hirofumi <[email protected]>
Expand Down
2 changes: 0 additions & 2 deletions drivers/mtd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ source "drivers/mtd/devices/Kconfig"

source "drivers/mtd/nand/Kconfig"

source "drivers/mtd/onenand/Kconfig"

source "drivers/mtd/lpddr/Kconfig"

source "drivers/mtd/spi-nor/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ obj-$(CONFIG_MTD_SWAP) += mtdswap.o
nftl-objs := nftlcore.o nftlmount.o
inftl-objs := inftlcore.o inftlmount.o

obj-y += chips/ lpddr/ maps/ devices/ nand/ onenand/ tests/
obj-y += chips/ lpddr/ maps/ devices/ nand/ tests/

obj-$(CONFIG_MTD_SPI_NOR) += spi-nor/
obj-$(CONFIG_MTD_UBI) += ubi/
16 changes: 2 additions & 14 deletions drivers/mtd/chips/cfi_cmdset_0001.c
Original file line number Diff line number Diff line change
Expand Up @@ -1993,20 +1993,8 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,

static int cfi_intelext_erase_varsize(struct mtd_info *mtd, struct erase_info *instr)
{
unsigned long ofs, len;
int ret;

ofs = instr->addr;
len = instr->len;

ret = cfi_varsize_frob(mtd, do_erase_oneblock, ofs, len, NULL);
if (ret)
return ret;

instr->state = MTD_ERASE_DONE;
mtd_erase_callback(instr);

return 0;
return cfi_varsize_frob(mtd, do_erase_oneblock, instr->addr,
instr->len, NULL);
}

static void cfi_intelext_sync (struct mtd_info *mtd)
Expand Down
26 changes: 3 additions & 23 deletions drivers/mtd/chips/cfi_cmdset_0002.c
Original file line number Diff line number Diff line change
Expand Up @@ -2415,43 +2415,23 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,

static int cfi_amdstd_erase_varsize(struct mtd_info *mtd, struct erase_info *instr)
{
unsigned long ofs, len;
int ret;

ofs = instr->addr;
len = instr->len;

ret = cfi_varsize_frob(mtd, do_erase_oneblock, ofs, len, NULL);
if (ret)
return ret;

instr->state = MTD_ERASE_DONE;
mtd_erase_callback(instr);

return 0;
return cfi_varsize_frob(mtd, do_erase_oneblock, instr->addr,
instr->len, NULL);
}


static int cfi_amdstd_erase_chip(struct mtd_info *mtd, struct erase_info *instr)
{
struct map_info *map = mtd->priv;
struct cfi_private *cfi = map->fldrv_priv;
int ret = 0;

if (instr->addr != 0)
return -EINVAL;

if (instr->len != mtd->size)
return -EINVAL;

ret = do_erase_chip(map, &cfi->chips[0]);
if (ret)
return ret;

instr->state = MTD_ERASE_DONE;
mtd_erase_callback(instr);

return 0;
return do_erase_chip(map, &cfi->chips[0]);
}

static int do_atmel_lock(struct map_info *map, struct flchip *chip,
Expand Down
3 changes: 0 additions & 3 deletions drivers/mtd/chips/cfi_cmdset_0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,9 +965,6 @@ static int cfi_staa_erase_varsize(struct mtd_info *mtd,
}
}

instr->state = MTD_ERASE_DONE;
mtd_erase_callback(instr);

return 0;
}

Expand Down
Loading

0 comments on commit 3fd14cd

Please sign in to comment.