Punnaiah Choudary Kalluri | 28 Jul 17:31 2014

[PATCH RFC v4 0/4] Add arm pl353 smc nand driver for xilinx zynq soc

The following patches add arm pl353 static memory controller driver for
xilinx zynq soc. The arm pl353 smc supports two interfaces i.e nand and
nor/sram memory interfaces. The current implementation supports only a
single SMC instance and nand specific configuration.

xilinx zynq TRM link:
http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

ARM pl353 smc TRM link:
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0380g/
DDI0380G_smc_pl350_series_r2p1_trm.pdf

Punnaiah Choudary Kalluri (4):
  nand: pl353: Add basic driver for arm pl353 smc nand interface
  nand: pl353: Add software ecc support
  nand: pl353: Add ONDIE ECC support
  Documentation: nand: pl353: Add documentation for controller and
    driver

 Documentation/mtd/nand/pl353-nand.txt |   92 +++
 drivers/mtd/nand/Kconfig              |    7 +
 drivers/mtd/nand/Makefile             |    1 +
 drivers/mtd/nand/pl353_nand.c         | 1147 +++++++++++++++++++++++++++++++++
 4 files changed, 1247 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/mtd/nand/pl353-nand.txt
 create mode 100644 drivers/mtd/nand/pl353_nand.c

--

-- 
1.7.4

(Continue reading)

weiyj_lk | 28 Jul 15:19 2014

[PATCH -next] mtd: atmel_nand: remove redundant dev_err call

From: Wei Yongjun <yongjun_wei <at> trendmicro.com.cn>

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <yongjun_wei <at> trendmicro.com.cn>
---
 drivers/mtd/nand/atmel_nand.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index e321c56..8c2b6ee 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
 <at>  <at>  -1148,7 +1148,6  <at>  <at>  static int atmel_pmecc_nand_init_params(struct platform_device *pdev,

 	host->ecc = devm_ioremap_resource(&pdev->dev, regs);
 	if (IS_ERR(host->ecc)) {
-		dev_err(host->dev, "ioremap failed\n");
 		err_no = PTR_ERR(host->ecc);
 		goto err;
 	}
 <at>  <at>  -1156,8 +1155,6  <at>  <at>  static int atmel_pmecc_nand_init_params(struct platform_device *pdev,
 	regs_pmerr = platform_get_resource(pdev, IORESOURCE_MEM, 2);
 	host->pmerrloc_base = devm_ioremap_resource(&pdev->dev, regs_pmerr);
 	if (IS_ERR(host->pmerrloc_base)) {
-		dev_err(host->dev,
-			"Can not get I/O resource for PMECC ERRLOC controller!\n");
 		err_no = PTR_ERR(host->pmerrloc_base);
(Continue reading)

Thomas Petazzoni | 27 Jul 23:56 2014

[PATCH] mtd: spi-nor: add support for Micron M25PX80

This commit adds the support in the spi-nor driver of the Micron
M25PX80 flash, a 8 Mbit SPI flash from Micron.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni <at> free-electrons.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index c713c86..8d7df6c 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
 <at>  <at>  -562,6 +562,7  <at>  <at>  const struct spi_device_id spi_nor_ids[] = {
 	{ "m25px32-s0", INFO(0x207316,  0, 64 * 1024, 64, SECT_4K) },
 	{ "m25px32-s1", INFO(0x206316,  0, 64 * 1024, 64, SECT_4K) },
 	{ "m25px64",    INFO(0x207117,  0, 64 * 1024, 128, 0) },
+	{ "m25px80",    INFO(0x207114,  0, 64 * 1024, 16, 0) },

 	/* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */
 	{ "w25x10", INFO(0xef3011, 0, 64 * 1024,  2,  SECT_4K) },
--

-- 
2.0.0

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Randy Dunlap | 27 Jul 23:31 2014

[PATCH] mtd: fix linux/mtd/nand.h kernel-doc warning

From: Randy Dunlap <rdunlap <at> infradead.org>

Fix kernel-doc warning in <linux/mtd/nand.h>:

Warning(..//include/linux/mtd/nand.h:795): No description found for parameter 'ecc'

Signed-off-by: Randy Dunlap <rdunlap <at> infradead.org>
Cc:	David Woodhouse <dwmw2 <at> infradead.org>
Cc:	Brian Norris <computersforpeace <at> gmail.com>
Cc:	linux-mtd <at> lists.infradead.org
---
 include/linux/mtd/nand.h |    1 +
 1 file changed, 1 insertion(+)

Index: lnx-316-rc7/include/linux/mtd/nand.h
===================================================================
--- lnx-316-rc7.orig/include/linux/mtd/nand.h
+++ lnx-316-rc7/include/linux/mtd/nand.h
 <at>  <at>  -766,6 +766,7  <at>  <at>  struct nand_chip {
  *  <at> options: stores various chip bit options
  *  <at> id_len: The valid length of the  <at> id.
  *  <at> oobsize: OOB size
+ *  <at> ecc: ECC correctability and step information from the datasheet.
  *  <at> ecc.strength_ds: The ECC correctability from the datasheet, same as the
  *                    <at> ecc_strength_ds in nand_chip{}.
  *  <at> ecc.step_ds: The ECC step required by the  <at> ecc.strength_ds, same as the

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
(Continue reading)

Daniel Ehrenberg | 25 Jul 20:21 2014
Picon

Using UBIFS as an FTL

Hi Artem, others,

For my project, I'm looking into using ext4 on top of NAND flash, in
order to use some fancy ext4 features. For this, I need an FTL in the
middle. I'm wondering which would be good to use. Options that I've
looked at are:
- ubiblock--the read-modify-write sounds unacceptable to me, even if
wear leveling and atomicity are handled.
- Some coworkers have suggested a new effort to build a new block
device, but that that's a huge project and takes a long time to get
right.
- loopback-mounting a file on ubifs--From skimming the code, it looks
to me like ubifs uses some nice datastructures to handle writes within
a file without doing read-modify-writes all the time as ubiblock
forces. ubifs authors/maintainers, do you see any downside to using
ubifs this way?

Thanks,
Dan

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Martin Fuzzey | 24 Jul 18:22 2014

[PATCH] mtd: add driver for the flash in Lattice machxo2 FPGAs

This driver provides two MTD devices, one for the configuration data
(FPGA bitstream) and another for the general purpose user flash.

Both behave as normal MTD devices bit the configuration one has
some extra sysfs entries to synchronize updating.

Signed-off-by: Martin Fuzzey <mfuzzey <at> parkeon.com>
---
 .../bindings/mtd/lattice-machxo2-fpga.txt          |   32 +
 Documentation/mtd/machxo2-fpga.txt                 |  104 ++
 drivers/mtd/devices/Kconfig                        |   31 +
 drivers/mtd/devices/Makefile                       |    3 
 drivers/mtd/devices/machxo2-core.c                 |  929 ++++++++++++++++++++
 drivers/mtd/devices/machxo2-spi.c                  |  114 ++
 drivers/mtd/devices/machxo2.h                      |   24 +
 7 files changed, 1236 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/lattice-machxo2-fpga.txt
 create mode 100644 Documentation/mtd/machxo2-fpga.txt
 create mode 100644 drivers/mtd/devices/machxo2-core.c
 create mode 100644 drivers/mtd/devices/machxo2-spi.c
 create mode 100644 drivers/mtd/devices/machxo2.h

diff --git a/Documentation/devicetree/bindings/mtd/lattice-machxo2-fpga.txt b/Documentation/devicetree/bindings/mtd/lattice-machxo2-fpga.txt
new file mode 100644
index 0000000..2fd30fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/lattice-machxo2-fpga.txt
 <at>  <at>  -0,0 +1,32  <at>  <at> 
+MTD SPI driver for the configuration (bitstream) and user flash of the Lattice
+Machxo2 family FPGAs.
(Continue reading)

Pekon Gupta | 23 Jul 13:54 2014
Picon

[PATCH] mtd: nand: omap: save Bad-Block-Table (BBT) on device

This patch makes OMAP NAND driver to
- save Bad-Block-Table (BBT) on NAND Flash device
- scan on device BBT during probe

Signed-off-by: Pekon Gupta <pekon <at> ti.com>
---
 drivers/mtd/nand/omap2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index f0ed92e..2ad7451 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
 <at>  <at>  -1663,7 +1663,7  <at>  <at>  static int omap_nand_probe(struct platform_device *pdev)
 	mtd->owner		= THIS_MODULE;
 	nand_chip		= &info->nand;
 	nand_chip->ecc.priv	= NULL;
-	nand_chip->options	|= NAND_SKIP_BBTSCAN;
+	nand_chip->bbt_options  |= NAND_BBT_USE_FLASH;

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	nand_chip->IO_ADDR_R = devm_ioremap_resource(&pdev->dev, res);
--

-- 
1.8.5.1.163.gd7aced9

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

(Continue reading)

Josh Wu | 22 Jul 11:25 2014

[PATCH] mtd: atmel_nand: NFC: fix mtd_nandbiterrs.ko test fail when using sram write

When enable NFC sram write, it will failed the mtd_nandbiterrs.ko test.

As in driver's nfc_sram_write_page(), if ops->mode equal to MTD_OSP_RAW,
driver assumes the data buffer contains one page data and one oob data
followed. And driver will write the page data and oob data to nand.

But this is wrong implementation. Since the data buffer don't contains the
oob data to write. We should write the chip->oob_poi to nand's oob.

So this patch fix it by writing the oob data from chip->oob_poi.

Signed-off-by: Josh Wu <josh.wu <at> atmel.com>
---
 drivers/mtd/nand/atmel_nand.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 33826a0..012d687 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
 <at>  <at>  -1913,15 +1913,13  <at>  <at>  static int nfc_sram_write_page(struct mtd_info *mtd, struct nand_chip *chip,
 	if (offset || (data_len < mtd->writesize))
 		return -EINVAL;

-	cfg = nfc_readl(host->nfc->hsmc_regs, CFG);
-	len = mtd->writesize;
-
-	if (unlikely(raw)) {
-		len += mtd->oobsize;
-		nfc_writel(host->nfc->hsmc_regs, CFG, cfg | NFC_CFG_WSPARE);
(Continue reading)

Josh Wu | 22 Jul 11:24 2014

[PATCH] mtd: atmel_nand: add pmecc support for 512, 1k, 4k, 8k page size

PMECC can support 512, 1k, 2k, 4k, 8k page size.
The driver currently only support 2k page size nand flash. So this patch
add support to 512, 1k, 4k and 8k page size nand flash.

Signed-off-by: Josh Wu <josh.wu <at> atmel.com>
---
 drivers/mtd/nand/atmel_nand.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 371afdd..33826a0 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
 <at>  <at>  -1174,7 +1174,17  <at>  <at>  static int atmel_pmecc_nand_init_params(struct platform_device *pdev,

 	/* set ECC page size and oob layout */
 	switch (mtd->writesize) {
+	case 512:
+	case 1024:
 	case 2048:
+	case 4096:
+	case 8192:
+		if (sector_size > mtd->writesize) {
+			dev_err(host->dev, "pmecc sector size is bigger than the page size!\n");
+			err_no = -EINVAL;
+			goto err;
+		}
+
 		host->pmecc_degree = (sector_size == 512) ?
 			PMECC_GF_DIMENSION_13 : PMECC_GF_DIMENSION_14;
(Continue reading)

Josh Wu | 22 Jul 11:12 2014

[PATCH] mtd: atmel_nand: incease the chip_delay to support some 4k-page flash

For MT29F8G08ABABA nand flash, the time read a page (tR) is 25us.
To support it, we need increase the chip_delay to 25us.

Signed-off-by: Josh Wu <josh.wu <at> atmel.com>
---
 drivers/mtd/nand/atmel_nand.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index e321c56..371afdd 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
 <at>  <at>  -2099,7 +2099,11  <at>  <at>  static int atmel_nand_probe(struct platform_device *pdev)
 	}

 	nand_chip->ecc.mode = host->board.ecc_mode;
-	nand_chip->chip_delay = 20;		/* 20us command delay time */
+
+	/* For support 4k-page flash, incease the delay time to 25us.
+	 * In P.108 of MT29F8G08ABABA datasheet, tR max is 25us.
+	 */
+	nand_chip->chip_delay = 25;

 	if (host->board.bus_width_16)	/* 16-bit bus width */
 		nand_chip->options |= NAND_BUSWIDTH_16;
--

-- 
1.9.1

______________________________________________________
Linux MTD discussion mailing list
(Continue reading)

Zhang Zhen | 22 Jul 08:28 2014

[PATCH v2] ubifs: refactor ubifs_file_mmap()

generic_file_mmap() set vma->vm_ops = &generic_file_vm_ops,
then ubifs_file_mmap set vma->vm_ops = &ubifs_file_vm_ops.
So it is redundant.
And there is no kind of file does not supply page reading function
in ubifs. The readpage() check up for mmap file in generic_file_mmap()
is not needed.

So remove the call of generic_file_mmap().

Change v1 -> v2:
- deleted the mapping variable
Signed-off-by: Zhang Zhen <zhenzhang.zhang <at> huawei.com>
---
 fs/ubifs/file.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index b5b593c..f7b6958 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
 <at>  <at>  -1540,11 +1540,7  <at>  <at>  static const struct vm_operations_struct ubifs_file_vm_ops = {

 static int ubifs_file_mmap(struct file *file, struct vm_area_struct *vma)
 {
-	int err;
-
-	err = generic_file_mmap(file, vma);
-	if (err)
-		return err;
+	file_accessed(file);
(Continue reading)


Gmane