Commit c1fe77e4 authored by Miquel Raynal's avatar Miquel Raynal
Browse files

Merge tag 'nand/for-5.15' into mtd/next

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
parents ee28b420 6b430c75
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
+2 −2
Original line number Diff line number Diff line
@@ -1475,7 +1475,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
@@ -1483,7 +1483,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
+2 −2
Original line number Diff line number Diff line
@@ -480,9 +480,9 @@ config MTD_NAND_RICOH
	select MTD_SM_COMMON
	help
	  Enable support for Ricoh R5C852 xD card reader
	  You also need to enable ether
	  You also need to enable either
	  NAND SSFDC (SmartMedia) read only translation layer' or new
	  expermental, readwrite
	  experimental, readwrite
	  'SmartMedia/xD new translation layer'

config MTD_NAND_DISKONCHIP
+3 −1
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ static int cafe_nand_probe(struct pci_dev *pdev,
			  "CAFE NAND", mtd);
	if (err) {
		dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq);
		goto out_ior;
		goto out_free_rs;
	}

	/* Disable master reset, enable NAND clock */
@@ -795,6 +795,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,
	/* Disable NAND IRQ in global IRQ mask register */
	cafe_writel(cafe, ~1 & cafe_readl(cafe, GLOBAL_IRQ_MASK), GLOBAL_IRQ_MASK);
	free_irq(pdev->irq, mtd);
 out_free_rs:
	free_rs(cafe->rs);
 out_ior:
	pci_iounmap(pdev, cafe->mmio);
 out_free_mtd:
+18 −9
Original line number Diff line number Diff line
@@ -631,19 +631,26 @@ static int ebu_nand_probe(struct platform_device *pdev)
	ebu_host->clk_rate = clk_get_rate(ebu_host->clk);

	ebu_host->dma_tx = dma_request_chan(dev, "tx");
	if (IS_ERR(ebu_host->dma_tx))
		return dev_err_probe(dev, PTR_ERR(ebu_host->dma_tx),
	if (IS_ERR(ebu_host->dma_tx)) {
		ret = dev_err_probe(dev, PTR_ERR(ebu_host->dma_tx),
				    "failed to request DMA tx chan!.\n");
		goto err_disable_unprepare_clk;
	}

	ebu_host->dma_rx = dma_request_chan(dev, "rx");
	if (IS_ERR(ebu_host->dma_rx))
		return dev_err_probe(dev, PTR_ERR(ebu_host->dma_rx),
	if (IS_ERR(ebu_host->dma_rx)) {
		ret = dev_err_probe(dev, PTR_ERR(ebu_host->dma_rx),
				    "failed to request DMA rx chan!.\n");
		ebu_host->dma_rx = NULL;
		goto err_cleanup_dma;
	}

	resname = devm_kasprintf(dev, GFP_KERNEL, "addr_sel%d", cs);
	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, resname);
	if (!res)
		return -EINVAL;
	if (!res) {
		ret = -EINVAL;
		goto err_cleanup_dma;
	}
	ebu_host->cs[cs].addr_sel = res->start;
	writel(ebu_host->cs[cs].addr_sel | EBU_ADDR_MASK(5) | EBU_ADDR_SEL_REGEN,
	       ebu_host->ebu + EBU_ADDR_SEL(cs));
@@ -653,7 +660,8 @@ static int ebu_nand_probe(struct platform_device *pdev)
	mtd = nand_to_mtd(&ebu_host->chip);
	if (!mtd->name) {
		dev_err(ebu_host->dev, "NAND label property is mandatory\n");
		return -EINVAL;
		ret = -EINVAL;
		goto err_cleanup_dma;
	}

	mtd->dev.parent = dev;
@@ -681,6 +689,7 @@ static int ebu_nand_probe(struct platform_device *pdev)
	nand_cleanup(&ebu_host->chip);
err_cleanup_dma:
	ebu_dma_cleanup(ebu_host);
err_disable_unprepare_clk:
	clk_disable_unprepare(ebu_host->clk);

	return ret;
Loading