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

Commit 91a247d7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull MTD updates from Brian Norris:
 "SPI NOR:
   - reduce virtual address space requirements for fsl-quadspi memory map
   - new fsl-quadspi IP support: imx6ul-qspi and imx7d-qspi
   - add new NOR flash device support
   - add new driver for NXP SPI Flash Interface (SPIFI)
   - stop abusing SPI API structs for non-SPI framework
   - fixup DT table matching for new "jedec,spi-nor" string

  NAND:
   - brcmnand: fix big endian MIPS macro usage
   - denali: refactor to use devres, dev_*() printing, etc.
   - OMAP ELM: change the module alias to actually be usable
   - pxa3xx_nand: fixup a few command sequencing issues -- both new and old
      - race conditions in the IRQ handler status clearing
      - problems when a bootloader left interrupts pending
      - config issues when overriding the bootloader configuration
   - new flash device support
   - sunxi_nand:
      - optimize timing configuration by calculation, rather than fixed
        fail-safe values
      - use EDO setting from ONFI
   - r852: fix compiler warnings
   - davinci: add 4KB page support

  Core:
   - oobtest: correct debug print information"

* tag 'for-linus-20150901' of git://git.infradead.org/linux-mtd: (42 commits)
  mtd: mtd_oobtest: Fix the address offset with vary_offset case
  mtd: blkdevs: fix switch-bool compilation warning
  mtd: spi-nor: stop (ab)using struct spi_device_id
  mtd: nand: add Toshiba TC58NVG0S3E to nand_ids table
  mtd: dataflash: Export OF module alias information
  nand: pxa3xx: Increase READ_ID buffer and make the size static
  mtd: nand: pxa3xx-nand: fix random command timeouts
  mtd: nand: pxa3xx_nand: fix early spurious interrupt
  mtd: pxa3xx_nand: add a default chunk size
  mtd: omap_elm: Fix module alias
  mtd: physmap_of: fix null pointer deference when kzalloc returns null
  mtd: nettel: do not ignore mtd_device_register() failure in nettel_init()
  mtd: denali_pci: switch to dev_err()
  mtd: denali_pci: refactor driver using devres API
  mtd: denali_pci: use module_pci_driver() macro
  mtd: denali: hide core part from user in Kconfig
  mtd: spi-nor: add Spansion S25FL204K support
  mtd: spi-nor: Improve Kconfig help text for SPI_FSL_QUADSPI
  mtd: spi-nor: add driver for NXP SPI Flash Interface (SPIFI)
  doc: dt: add documentation for nxp,lpc1773-spifi
  ...
parents 8bdc69b7 718e38b4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
* Freescale Quad Serial Peripheral Interface(QuadSPI)

Required properties:
  - compatible : Should be "fsl,vf610-qspi" or "fsl,imx6sx-qspi"
  - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi",
		 "fsl,imx7d-qspi", "fsl,imx6ul-qspi"
  - reg : the first contains the register location and length,
          the second contains the memory mapping address and length
  - reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory"
+58 −0
Original line number Diff line number Diff line
* NXP SPI Flash Interface (SPIFI)

NXP SPIFI is a specialized SPI interface for serial Flash devices.
It supports one Flash device with 1-, 2- and 4-bits width in SPI
mode 0 or 3. The controller operates in either command or memory
mode. In memory mode the Flash is accessible from the CPU as
normal memory.

Required properties:
  - compatible : Should be "nxp,lpc1773-spifi"
  - reg : the first contains the register location and length,
          the second contains the memory mapping address and length
  - reg-names: Should contain the reg names "spifi" and "flash"
  - interrupts : Should contain the interrupt for the device
  - clocks : The clocks needed by the SPIFI controller
  - clock-names : Should contain the clock names "spifi" and "reg"

Optional properties:
 - resets : phandle + reset specifier

The SPI Flash must be a child of the SPIFI node and must have a
compatible property as specified in bindings/mtd/jedec,spi-nor.txt

Optionally it can also contain the following properties.
 - spi-cpol : Controller only supports mode 0 and 3 so either
              both spi-cpol and spi-cpha should be present or
              none of them
 - spi-cpha : See above
 - spi-rx-bus-width : Used to select how many pins that are used
                      for input on the controller

See bindings/spi/spi-bus.txt for more information.

Example:
spifi: spifi@40003000 {
	compatible = "nxp,lpc1773-spifi";
	reg = <0x40003000 0x1000>, <0x14000000 0x4000000>;
	reg-names = "spifi", "flash";
	interrupts = <30>;
	clocks = <&ccu1 CLK_SPIFI>, <&ccu1 CLK_CPU_SPIFI>;
	clock-names = "spifi", "reg";
	resets = <&rgu 53>;

	flash@0 {
		compatible = "jedec,spi-nor";
		spi-cpol;
		spi-cpha;
		spi-rx-bus-width = <4>;
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "data";
			reg = <0 0x200000>;
		};
	};
};
+11 −7
Original line number Diff line number Diff line
@@ -223,8 +223,6 @@ static int m25p_probe(struct spi_device *spi)
	 */
	if (data && data->type)
		flash_name = data->type;
	else if (!strcmp(spi->modalias, "spi-nor"))
		flash_name = NULL; /* auto-detect */
	else
		flash_name = spi->modalias;

@@ -289,19 +287,25 @@ static const struct spi_device_id m25p_ids[] = {
	{"m25p40-nonjedec"},	{"m25p80-nonjedec"},	{"m25p16-nonjedec"},
	{"m25p32-nonjedec"},	{"m25p64-nonjedec"},	{"m25p128-nonjedec"},

	/*
	 * Generic support for SPI NOR that can be identified by the JEDEC READ
	 * ID opcode (0x9F). Use this, if possible.
	 */
	{"spi-nor"},
	{ },
};
MODULE_DEVICE_TABLE(spi, m25p_ids);

static const struct of_device_id m25p_of_table[] = {
	/*
	 * Generic compatibility for SPI NOR that can be identified by the
	 * JEDEC READ ID opcode (0x9F). Use this, if possible.
	 */
	{ .compatible = "jedec,spi-nor" },
	{}
};
MODULE_DEVICE_TABLE(of, m25p_of_table);

static struct spi_driver m25p80_driver = {
	.driver = {
		.name	= "m25p80",
		.owner	= THIS_MODULE,
		.of_match_table = m25p_of_table,
	},
	.id_table	= m25p_ids,
	.probe	= m25p_probe,
+1 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@ static const struct of_device_id dataflash_dt_ids[] = {
	{ .compatible = "atmel,dataflash", },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, dataflash_dt_ids);
#endif

/* ......................................................................... */
+10 −3
Original line number Diff line number Diff line
@@ -385,20 +385,28 @@ static int __init nettel_init(void)
	}
	rc = mtd_device_register(intel_mtd, nettel_intel_partitions,
				 num_intel_partitions);
	if (rc)
		goto out_map_destroy;
#endif

	if (amd_mtd) {
		rc = mtd_device_register(amd_mtd, nettel_amd_partitions,
					 num_amd_partitions);
		if (rc)
			goto out_mtd_unreg;
	}

#ifdef CONFIG_MTD_CFI_INTELEXT
	register_reboot_notifier(&nettel_notifier_block);
#endif

	return(rc);
	return rc;

out_mtd_unreg:
#ifdef CONFIG_MTD_CFI_INTELEXT
	mtd_device_unregister(intel_mtd);
out_map_destroy:
	map_destroy(intel_mtd);
out_unmap1:
	iounmap(nettel_intel_map.virt);
#endif
@@ -407,8 +415,7 @@ static int __init nettel_init(void)
	iounmap(nettel_mmcrp);
	iounmap(nettel_amd_map.virt);

	return(rc);

	return rc;
}

/****************************************************************************/
Loading