linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch
@ 2013-11-21 11:28 Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 01/10] mtd: nand: davinci: fix driver registration Ivan Khoronzhuk
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

This series contains fixes and updates of Davinci nand driver in
order to reuse it for Keystone platform.

The series is combination of two following series:
- Davinci nand driver fixes and updates:
  https://lkml.org/lkml/2013/11/20/271
- Reuse davinci-nand driver for Keystone arch
  https://lkml.org/lkml/2013/11/20/315

Ivan Khoronzhuk (10):
  mtd: nand: davinci: fix driver registration
  mtd: nand: davinci: return ENOMEM if memory allocation is failed
  mtd: nand: davinci: check required ti,davinci-chipselect property
  mtd: nand: davinci: simplify error handling
  mtd: nand: davinci: move bindings under mtd
  mtd: nand: davinci: extend description of bindings
  mtd: nand: davinci: adjust DT properties to MTD generic
  mtd: nand: davinci: reuse driver for Keystone arch
  mtd: nand: davinci: don't set timings if AEMIF is used
  mtd: nand: davinci: don't request AEMIF address range

 .../devicetree/bindings/arm/davinci/nand.txt       |   46 --------
 .../devicetree/bindings/mtd/davinci-nand.txt       |   94 ++++++++++++++++
 drivers/mtd/nand/Kconfig                           |    6 +-
 drivers/mtd/nand/davinci_nand.c                    |  117 +++++++++++---------
 4 files changed, 164 insertions(+), 99 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt
 create mode 100644 Documentation/devicetree/bindings/mtd/davinci-nand.txt

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 01/10] mtd: nand: davinci: fix driver registration
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 02/10] mtd: nand: davinci: return ENOMEM if memory allocation is failed Ivan Khoronzhuk
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

When kernel is booted using DT, there is no guarantee that Davinci
NAND device has been created already at the time when driver init
function is executed. Therefore, platform_driver_probe() can't be used
because this may result the Davinci NAND driver will never be probed.
The driver probing has to be made with core mechanism.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mtd/nand/davinci_nand.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index b77a01e..d87213f 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -877,6 +877,7 @@ static int __exit nand_davinci_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver nand_davinci_driver = {
+	.probe		= nand_davinci_probe,
 	.remove		= __exit_p(nand_davinci_remove),
 	.driver		= {
 		.name	= "davinci_nand",
@@ -886,7 +887,7 @@ static struct platform_driver nand_davinci_driver = {
 };
 MODULE_ALIAS("platform:davinci_nand");
 
-module_platform_driver_probe(nand_davinci_driver, nand_davinci_probe);
+module_platform_driver(nand_davinci_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Texas Instruments");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 02/10] mtd: nand: davinci: return ENOMEM if memory allocation is failed
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 01/10] mtd: nand: davinci: fix driver registration Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 03/10] mtd: nand: davinci: check required ti, davinci-chipselect property Ivan Khoronzhuk
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

In case when memory allocation is failed the driver should return
ENOMEM instead of ENODEV.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mtd/nand/davinci_nand.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index d87213f..ddcd7c8 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -541,7 +541,7 @@ static struct davinci_nand_pdata
 				GFP_KERNEL);
 		pdev->dev.platform_data = pdata;
 		if (!pdata)
-			return NULL;
+			return ERR_PTR(-ENOMEM);
 		if (!of_property_read_u32(pdev->dev.of_node,
 			"ti,davinci-chipselect", &prop))
 			pdev->id = prop;
@@ -598,6 +598,9 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	nand_ecc_modes_t		ecc_mode;
 
 	pdata = nand_davinci_get_pdata(pdev);
+	if (IS_ERR(pdata))
+		return PTR_ERR(pdata);
+
 	/* insist on board-specific configuration */
 	if (!pdata)
 		return -ENODEV;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 03/10] mtd: nand: davinci: check required ti, davinci-chipselect property
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 01/10] mtd: nand: davinci: fix driver registration Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 02/10] mtd: nand: davinci: return ENOMEM if memory allocation is failed Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 04/10] mtd: nand: davinci: simplify error handling Ivan Khoronzhuk
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

The property "ti,davinci-chipselect" is required. So we have to check
if it is set.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mtd/nand/davinci_nand.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index ddcd7c8..9a96ac7 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -545,6 +545,9 @@ static struct davinci_nand_pdata
 		if (!of_property_read_u32(pdev->dev.of_node,
 			"ti,davinci-chipselect", &prop))
 			pdev->id = prop;
+		else
+			return ERR_PTR(-EINVAL);
+
 		if (!of_property_read_u32(pdev->dev.of_node,
 			"ti,davinci-mask-ale", &prop))
 			pdata->mask_ale = prop;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 04/10] mtd: nand: davinci: simplify error handling
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (2 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 03/10] mtd: nand: davinci: check required ti, davinci-chipselect property Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 05/10] mtd: nand: davinci: move bindings under mtd Ivan Khoronzhuk
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

There is not needed to use a lot of names for err handling.
It complicates code support and reading.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mtd/nand/davinci_nand.c |   46 +++++++++++++++------------------------
 1 file changed, 17 insertions(+), 29 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 9a96ac7..c0be223 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -615,8 +615,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
 	if (!info) {
 		dev_err(&pdev->dev, "unable to allocate memory\n");
-		ret = -ENOMEM;
-		goto err_nomem;
+		return -ENOMEM;
 	}
 
 	platform_set_drvdata(pdev, info);
@@ -625,20 +624,16 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	if (!res1 || !res2) {
 		dev_err(&pdev->dev, "resource missing\n");
-		ret = -EINVAL;
-		goto err_nomem;
+		return -EINVAL;
 	}
 
 	vaddr = devm_ioremap_resource(&pdev->dev, res1);
-	if (IS_ERR(vaddr)) {
-		ret = PTR_ERR(vaddr);
-		goto err_ioremap;
-	}
+	if (IS_ERR(vaddr))
+		return PTR_ERR(vaddr);
+
 	base = devm_ioremap_resource(&pdev->dev, res2);
-	if (IS_ERR(base)) {
-		ret = PTR_ERR(base);
-		goto err_ioremap;
-	}
+	if (IS_ERR(base))
+		return PTR_ERR(base);
 
 	info->dev		= &pdev->dev;
 	info->base		= base;
@@ -705,7 +700,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 			spin_unlock_irq(&davinci_nand_lock);
 
 			if (ret == -EBUSY)
-				goto err_ecc;
+				return ret;
 
 			info->chip.ecc.calculate = nand_davinci_calculate_4bit;
 			info->chip.ecc.correct = nand_davinci_correct_4bit;
@@ -721,8 +716,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 		info->chip.ecc.strength = pdata->ecc_bits;
 		break;
 	default:
-		ret = -EINVAL;
-		goto err_ecc;
+		return -EINVAL;
 	}
 	info->chip.ecc.mode = ecc_mode;
 
@@ -730,7 +724,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	if (IS_ERR(info->clk)) {
 		ret = PTR_ERR(info->clk);
 		dev_dbg(&pdev->dev, "unable to get AEMIF clock, err %d\n", ret);
-		goto err_clk;
+		return ret;
 	}
 
 	ret = clk_prepare_enable(info->clk);
@@ -759,7 +753,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 							info->core_chipsel);
 	if (ret < 0) {
 		dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
-		goto err_timing;
+		goto err;
 	}
 
 	spin_lock_irq(&davinci_nand_lock);
@@ -775,7 +769,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	ret = nand_scan_ident(&info->mtd, pdata->mask_chipsel ? 2 : 1, NULL);
 	if (ret < 0) {
 		dev_dbg(&pdev->dev, "no NAND chip(s) found\n");
-		goto err_scan;
+		goto err;
 	}
 
 	/* Update ECC layout if needed ... for 1-bit HW ECC, the default
@@ -789,7 +783,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 		if (!chunks || info->mtd.oobsize < 16) {
 			dev_dbg(&pdev->dev, "too small\n");
 			ret = -EINVAL;
-			goto err_scan;
+			goto err;
 		}
 
 		/* For small page chips, preserve the manufacturer's
@@ -820,7 +814,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 		dev_warn(&pdev->dev, "no 4-bit ECC support yet "
 				"for 4KiB-page NAND\n");
 		ret = -EIO;
-		goto err_scan;
+		goto err;
 
 syndrome_done:
 		info->chip.ecc.layout = &info->ecclayout;
@@ -828,7 +822,7 @@ syndrome_done:
 
 	ret = nand_scan_tail(&info->mtd);
 	if (ret < 0)
-		goto err_scan;
+		goto err;
 
 	if (pdata->parts)
 		ret = mtd_device_parse_register(&info->mtd, NULL, NULL,
@@ -841,7 +835,7 @@ syndrome_done:
 						NULL, 0);
 	}
 	if (ret < 0)
-		goto err_scan;
+		goto err;
 
 	val = davinci_nand_readl(info, NRCSR_OFFSET);
 	dev_info(&pdev->dev, "controller rev. %d.%d\n",
@@ -849,8 +843,7 @@ syndrome_done:
 
 	return 0;
 
-err_scan:
-err_timing:
+err:
 	clk_disable_unprepare(info->clk);
 
 err_clk_enable:
@@ -858,11 +851,6 @@ err_clk_enable:
 	if (ecc_mode == NAND_ECC_HW_SYNDROME)
 		ecc4_busy = false;
 	spin_unlock_irq(&davinci_nand_lock);
-
-err_ecc:
-err_clk:
-err_ioremap:
-err_nomem:
 	return ret;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 05/10] mtd: nand: davinci: move bindings under mtd
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (3 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 04/10] mtd: nand: davinci: simplify error handling Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 06/10] mtd: nand: davinci: extend description of bindings Ivan Khoronzhuk
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

Move bindings under mtd. Do this in order to make davinci-nand
driver usable by keystone architecture.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 .../{arm/davinci/nand.txt => mtd/davinci-nand.txt} |    0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename Documentation/devicetree/bindings/{arm/davinci/nand.txt => mtd/davinci-nand.txt} (100%)

diff --git a/Documentation/devicetree/bindings/arm/davinci/nand.txt b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
similarity index 100%
rename from Documentation/devicetree/bindings/arm/davinci/nand.txt
rename to Documentation/devicetree/bindings/mtd/davinci-nand.txt
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 06/10] mtd: nand: davinci: extend description of bindings
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (4 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 05/10] mtd: nand: davinci: move bindings under mtd Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 07/10] mtd: nand: davinci: adjust DT properties to MTD generic Ivan Khoronzhuk
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

Extend bindings for davinci_nand driver to be more clear.
This is clarification only, without semantic changes.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 .../devicetree/bindings/mtd/davinci-nand.txt       |   77 ++++++++++++++------
 1 file changed, 54 insertions(+), 23 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
index 3545ea7..d2a3fc0 100644
--- a/Documentation/devicetree/bindings/mtd/davinci-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
@@ -1,36 +1,67 @@
-* Texas Instruments Davinci NAND
+Device tree bindings for Texas instruments Davinci NAND controller
 
-This file provides information, what the device node for the
-davinci nand interface contain.
+This file provides information, what the device node for the davinci NAND
+interface contains.
+
+Documentation:
+Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf
 
 Required properties:
-- compatible: "ti,davinci-nand";
-- reg : contain 2 offset/length values:
-        - offset and length for the access window
-        - offset and length for accessing the aemif control registers
-- ti,davinci-chipselect: Indicates on the davinci_nand driver which
-                         chipselect is used for accessing the nand.
+
+- compatible:			"ti,davinci-nand"
+
+- reg:				Contains 2 offset/length values:
+				- offset and length for the access window.
+				- offset and length for accessing the AEMIF
+				control registers.
+
+- ti,davinci-chipselect:	number of chipselect. Indicates on the
+				davinci_nand driver which chipselect is used
+				for accessing the nand.
+				Can be in the range [0-3].
 
 Recommended properties :
-- ti,davinci-mask-ale: mask for ale
-- ti,davinci-mask-cle: mask for cle
-- ti,davinci-mask-chipsel: mask for chipselect
-- ti,davinci-ecc-mode: ECC mode valid values for davinci driver:
-		- "none"
-		- "soft"
-		- "hw"
-- ti,davinci-ecc-bits: used ECC bits, currently supported 1 or 4.
-- ti,davinci-nand-buswidth: buswidth 8 or 16
-- ti,davinci-nand-use-bbt: use flash based bad block table support.
-
-nand device bindings may contain additional sub-nodes describing
-partitions of the address space. See partition.txt for more detail.
+
+- ti,davinci-mask-ale:		mask for ALE. Needed for executing address
+				phase. These offset will be added to the base
+				address for the chip select space the NAND Flash
+				device is connected to.
+				If not set equal to 0x08.
+
+- ti,davinci-mask-cle:		mask for CLE. Needed for executing command
+				phase. These offset will be added to the base
+				address for the chip select space the NAND Flash
+				device is connected to.
+				If not set equal to 0x10.
+
+- ti,davinci-mask-chipsel:	mask for chipselect address. Needed to mask
+				addresses for given chipselect.
+
+- ti,davinci-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
+				valid values for davinci driver:
+				- "none"
+				- "soft"
+				- "hw"
+
+- ti,davinci-ecc-bits:		used ECC bits, currently supported 1 or 4.
+
+- ti,davinci-nand-buswidth:	buswidth 8 or 16.
+
+- ti,davinci-nand-use-bbt:	use flash based bad block table support. OOB
+				identifier is saved in OOB area.
+
+Nand device bindings may contain additional sub-nodes describing partitions of
+the address space. See partition.txt for more detail. The NAND Flash timing
+values must be programmed in the chip select’s node of AEMIF
+memory-controller (see Documentation/devicetree/bindings/memory-controllers/
+davinci-aemif.txt).
 
 Example(da850 EVM ):
+
 nand_cs3@62000000 {
 	compatible = "ti,davinci-nand";
 	reg = <0x62000000 0x807ff
-		0x68000000 0x8000>;
+	       0x68000000 0x8000>;
 	ti,davinci-chipselect = <1>;
 	ti,davinci-mask-ale = <0>;
 	ti,davinci-mask-cle = <0>;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 07/10] mtd: nand: davinci: adjust DT properties to MTD generic
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (5 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 06/10] mtd: nand: davinci: extend description of bindings Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 08/10] mtd: nand: davinci: reuse driver for Keystone arch Ivan Khoronzhuk
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

The properties davinci-ecc-mode, davinci-nand-use-bbt, davinci-nand-buswidth
are MTD generic. Correct names for them are: nand-ecc-mode, nand-on-flash-bbt,
nand-bus-width accordingly. So rename them in dts and documentation.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 .../devicetree/bindings/mtd/davinci-nand.txt       |   25 ++++++++++++++++----
 drivers/mtd/nand/davinci_nand.c                    |   11 ++++++---
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
index d2a3fc0..befaa5b 100644
--- a/Documentation/devicetree/bindings/mtd/davinci-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
@@ -37,7 +37,7 @@ Recommended properties :
 - ti,davinci-mask-chipsel:	mask for chipselect address. Needed to mask
 				addresses for given chipselect.
 
-- ti,davinci-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
+- nand-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
 				valid values for davinci driver:
 				- "none"
 				- "soft"
@@ -45,10 +45,25 @@ Recommended properties :
 
 - ti,davinci-ecc-bits:		used ECC bits, currently supported 1 or 4.
 
-- ti,davinci-nand-buswidth:	buswidth 8 or 16.
+- nand-bus-width:		buswidth 8 or 16. If not present 8.
+
+- nand-on-flash-bbt:		use flash based bad block table support. OOB
+				identifier is saved in OOB area. If not present
+				false.
+
+Deprecated properties:
+
+- ti,davinci-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
+				valid values for davinci driver:
+				- "none"
+				- "soft"
+				- "hw"
+
+- ti,davinci-nand-buswidth:	buswidth 8 or 16. If not present 8.
 
 - ti,davinci-nand-use-bbt:	use flash based bad block table support. OOB
-				identifier is saved in OOB area.
+				identifier is saved in OOB area. If not present
+				false.
 
 Nand device bindings may contain additional sub-nodes describing partitions of
 the address space. See partition.txt for more detail. The NAND Flash timing
@@ -66,9 +81,9 @@ nand_cs3@62000000 {
 	ti,davinci-mask-ale = <0>;
 	ti,davinci-mask-cle = <0>;
 	ti,davinci-mask-chipsel = <0>;
-	ti,davinci-ecc-mode = "hw";
+	nand-ecc-mode = "hw";
 	ti,davinci-ecc-bits = <4>;
-	ti,davinci-nand-use-bbt;
+	nand-on-flash-bbt;
 
 	partition@180000 {
 		label = "ubifs";
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index c0be223..f7b21b8 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -534,7 +534,6 @@ static struct davinci_nand_pdata
 		struct davinci_nand_pdata *pdata;
 		const char *mode;
 		u32 prop;
-		int len;
 
 		pdata =  devm_kzalloc(&pdev->dev,
 				sizeof(struct davinci_nand_pdata),
@@ -558,6 +557,8 @@ static struct davinci_nand_pdata
 			"ti,davinci-mask-chipsel", &prop))
 			pdata->mask_chipsel = prop;
 		if (!of_property_read_string(pdev->dev.of_node,
+			"nand-ecc-mode", &mode) ||
+		    !of_property_read_string(pdev->dev.of_node,
 			"ti,davinci-ecc-mode", &mode)) {
 			if (!strncmp("none", mode, 4))
 				pdata->ecc_mode = NAND_ECC_NONE;
@@ -570,11 +571,15 @@ static struct davinci_nand_pdata
 			"ti,davinci-ecc-bits", &prop))
 			pdata->ecc_bits = prop;
 		if (!of_property_read_u32(pdev->dev.of_node,
+			"nand-bus-width", &prop) ||
+		    !of_property_read_u32(pdev->dev.of_node,
 			"ti,davinci-nand-buswidth", &prop))
 			if (prop == 16)
 				pdata->options |= NAND_BUSWIDTH_16;
-		if (of_find_property(pdev->dev.of_node,
-			"ti,davinci-nand-use-bbt", &len))
+		if (of_property_read_bool(pdev->dev.of_node,
+			"nand-on-flash-bbt") ||
+		    of_property_read_bool(pdev->dev.of_node,
+			"ti,davinci-nand-use-bbt"))
 			pdata->bbt_options = NAND_BBT_USE_FLASH;
 	}
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 08/10] mtd: nand: davinci: reuse driver for Keystone arch
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (6 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 07/10] mtd: nand: davinci: adjust DT properties to MTD generic Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH v2 09/10] mtd: nand: davinci: don't set timings if AEMIF is used Ivan Khoronzhuk
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

The Keystone arch has compatible nand device, so reuse it.
In case with Keystone it depends on TI_AEMIF because AEMIF
driver is responsible to set timings.

See http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 .../devicetree/bindings/mtd/davinci-nand.txt       |    8 +++++---
 drivers/mtd/nand/Kconfig                           |    6 +++---
 drivers/mtd/nand/davinci_nand.c                    |    1 +
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
index befaa5b..cfb18ab 100644
--- a/Documentation/devicetree/bindings/mtd/davinci-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
@@ -1,14 +1,16 @@
-Device tree bindings for Texas instruments Davinci NAND controller
+Device tree bindings for Texas instruments Davinci/Keystone NAND controller
 
-This file provides information, what the device node for the davinci NAND
-interface contains.
+This file provides information, what the device node for the davinci/keystone
+NAND interface contains.
 
 Documentation:
 Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf
+Kestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf
 
 Required properties:
 
 - compatible:			"ti,davinci-nand"
+				"ti,keystone-nand"
 
 - reg:				Contains 2 offset/length values:
 				- offset and length for the access window.
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index d885298..8bf69c7 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -492,11 +492,11 @@ config MTD_NAND_SH_FLCTL
 	  for NAND Flash using FLCTL.
 
 config MTD_NAND_DAVINCI
-        tristate "Support NAND on DaVinci SoC"
-        depends on ARCH_DAVINCI
+        tristate "Support NAND on DaVinci/Keystone SoC"
+        depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF)
         help
 	  Enable the driver for NAND flash chips on Texas Instruments
-	  DaVinci processors.
+	  DaVinci/Keystone processors.
 
 config MTD_NAND_TXX9NDFMC
 	tristate "NAND Flash support for TXx9 SoC"
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index f7b21b8..8459720 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -523,6 +523,7 @@ static struct nand_ecclayout hwecc4_2048 __initconst = {
 #if defined(CONFIG_OF)
 static const struct of_device_id davinci_nand_of_match[] = {
 	{.compatible = "ti,davinci-nand", },
+	{.compatible = "ti,keystone-nand", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 09/10] mtd: nand: davinci: don't set timings if AEMIF is used
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (7 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 08/10] mtd: nand: davinci: reuse driver for Keystone arch Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 11:28 ` [PATCH 10/10] mtd: nand: davinci: don't request AEMIF address range Ivan Khoronzhuk
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

The problem that the set timings code contains the call of Davinci
platform function davinci_aemif_setup_timing() which is not
accessible if kernel is built for Keystone only.

The Keysone platform is going to use TI AEMIF driver.
If TI AEMIF is used we don't need to set timings and bus width.
It is done by AEMIF driver (drivers/memory/ti-aemfi.c).

The timings code has to be removed together with Davinci aemif
platform code (aemif.c), once Davinci will be converted to DT and use
ti-aemif.c driver.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mtd/nand/davinci_nand.c |   48 +++++++++++++++++++++++++--------------
 1 file changed, 31 insertions(+), 17 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 8459720..e904364 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -605,6 +605,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	int				ret;
 	uint32_t			val;
 	nand_ecc_modes_t		ecc_mode;
+	bool aemif = IS_ENABLED(CONFIG_TI_AEMIF);
 
 	pdata = nand_davinci_get_pdata(pdev);
 	if (IS_ERR(pdata))
@@ -741,25 +742,38 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	}
 
 	/*
-	 * Setup Async configuration register in case we did not boot from
-	 * NAND and so bootloader did not bother to set it up.
+	 * TODO:
+	 * This is temp solution to support Davinci platform and it has to be
+	 * removed once Davinci will be updated to use ti-aemif.c driver.
 	 */
-	val = davinci_nand_readl(info, A1CR_OFFSET + info->core_chipsel * 4);
-
-	/* Extended Wait is not valid and Select Strobe mode is not used */
-	val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK);
-	if (info->chip.options & NAND_BUSWIDTH_16)
-		val |= 0x1;
-
-	davinci_nand_writel(info, A1CR_OFFSET + info->core_chipsel * 4, val);
+	if (!aemif) {
+		/*
+		 * Setup Async configuration register in case we did not boot
+		 * from NAND and so bootloader did not bother to set it up.
+		 */
+		val = davinci_nand_readl(info, A1CR_OFFSET +
+					 info->core_chipsel * 4);
 
-	ret = 0;
-	if (info->timing)
-		ret = davinci_aemif_setup_timing(info->timing, info->base,
-							info->core_chipsel);
-	if (ret < 0) {
-		dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
-		goto err;
+		/*
+		 * Extended Wait is not valid and Select Strobe mode is not
+		 * used
+		 */
+		val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK);
+		if (info->chip.options & NAND_BUSWIDTH_16)
+			val |= 0x1;
+
+		davinci_nand_writel(info, A1CR_OFFSET +
+				    info->core_chipsel * 4, val);
+
+		ret = 0;
+		if (info->timing)
+			ret = davinci_aemif_setup_timing(info->timing,
+							 info->base,
+							 info->core_chipsel);
+		if (ret < 0) {
+			dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
+			goto err;
+		}
 	}
 
 	spin_lock_irq(&davinci_nand_lock);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 10/10] mtd: nand: davinci: don't request AEMIF address range
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (8 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH v2 09/10] mtd: nand: davinci: don't set timings if AEMIF is used Ivan Khoronzhuk
@ 2013-11-21 11:28 ` Ivan Khoronzhuk
  2013-11-21 17:45 ` [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Taras Kondratiuk
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Ivan Khoronzhuk @ 2013-11-21 11:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Landley, Russell King
  Cc: Mark Rutland, devicetree, grygorii.strashko, Pawel Moll,
	Stephen Warren, Ian Campbell, Kumar Gala, Rob Herring,
	linux-kernel, linux-mtd, Ivan Khoronzhuk, linux-arm-kernel

The TI AEMIF driver registers are used to setup timings for each chip
select. The same registers range is used to setup NAND settings.
The AEMIF and NAND drivers not use the same registers in this range.

In case with TI AEMIF driver, the memory address range is requested
already by AEMIF, so we cannot request it twice, just ioremap.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mtd/nand/davinci_nand.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index e904364..aa30708 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -638,9 +638,11 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 	if (IS_ERR(vaddr))
 		return PTR_ERR(vaddr);
 
-	base = devm_ioremap_resource(&pdev->dev, res2);
-	if (IS_ERR(base))
-		return PTR_ERR(base);
+	base = devm_ioremap(&pdev->dev, res2->start, resource_size(res2));
+	if (!base) {
+		dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res2);
+		return -EADDRNOTAVAIL;
+	}
 
 	info->dev		= &pdev->dev;
 	info->base		= base;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (9 preceding siblings ...)
  2013-11-21 11:28 ` [PATCH 10/10] mtd: nand: davinci: don't request AEMIF address range Ivan Khoronzhuk
@ 2013-11-21 17:45 ` Taras Kondratiuk
  2013-11-27  1:33 ` Brian Norris
  2013-11-29 16:28 ` Santosh Shilimkar
  12 siblings, 0 replies; 16+ messages in thread
From: Taras Kondratiuk @ 2013-11-21 17:45 UTC (permalink / raw)
  To: Ivan Khoronzhuk
  Cc: Mark Rutland, devicetree, Grygorii Strashko, Russell King,
	Pawel Moll, Stephen Warren, Ian Campbell, Kumar Gala,
	Rob Herring, open list, Santosh Shilimkar, Rob Landley,
	linux-mtd, linux-arm-kernel

On 21 November 2013 13:28, Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> wrote:
> This series contains fixes and updates of Davinci nand driver in
> order to reuse it for Keystone platform.
>
> The series is combination of two following series:
> - Davinci nand driver fixes and updates:
>   https://lkml.org/lkml/2013/11/20/271
> - Reuse davinci-nand driver for Keystone arch
>   https://lkml.org/lkml/2013/11/20/315
>
> Ivan Khoronzhuk (10):
>   mtd: nand: davinci: fix driver registration
>   mtd: nand: davinci: return ENOMEM if memory allocation is failed
>   mtd: nand: davinci: check required ti,davinci-chipselect property
>   mtd: nand: davinci: simplify error handling
>   mtd: nand: davinci: move bindings under mtd
>   mtd: nand: davinci: extend description of bindings
>   mtd: nand: davinci: adjust DT properties to MTD generic
>   mtd: nand: davinci: reuse driver for Keystone arch
>   mtd: nand: davinci: don't set timings if AEMIF is used
>   mtd: nand: davinci: don't request AEMIF address range

For all series:
Reviewed-by: Taras Kondratiuk <taras@ti.com>

-- 
Regards,
Taras Kondratiuk

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (10 preceding siblings ...)
  2013-11-21 17:45 ` [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Taras Kondratiuk
@ 2013-11-27  1:33 ` Brian Norris
  2013-11-27 11:51   ` ivan.khoronzhuk
  2013-11-29 16:28 ` Santosh Shilimkar
  12 siblings, 1 reply; 16+ messages in thread
From: Brian Norris @ 2013-11-27  1:33 UTC (permalink / raw)
  To: Ivan Khoronzhuk
  Cc: Mark Rutland, devicetree, grygorii.strashko, Russell King,
	Pawel Moll, Stephen Warren, Ian Campbell, Kumar Gala,
	Rob Herring, linux-kernel, Santosh Shilimkar, Rob Landley,
	linux-mtd, linux-arm-kernel

Hi Ivan,

On Thu, Nov 21, 2013 at 01:28:15PM +0200, Ivan Khoronzhuk wrote:
> This series contains fixes and updates of Davinci nand driver in
> order to reuse it for Keystone platform.
> 
> The series is combination of two following series:
> - Davinci nand driver fixes and updates:
>   https://lkml.org/lkml/2013/11/20/271
> - Reuse davinci-nand driver for Keystone arch
>   https://lkml.org/lkml/2013/11/20/315

Can you make sure to consistently change the email $subject for your
patch series? For each of the above, it looks like they are actually
version 2, yet they still just say "[PATCH X/Y]" (not "[PATCH v2 X/Y]").
This makes it harder to parse the history of each series. (And the
combining of two un-versioned patch series adds to the confusion.)

Now, this combined series has a good v2 marking (although at this point,
is it really v3? ...whatever, it doesn't matter). Please continue to
write appropriate $subjects for this and future patch series.

Thanks,
Brian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch
  2013-11-27  1:33 ` Brian Norris
@ 2013-11-27 11:51   ` ivan.khoronzhuk
  0 siblings, 0 replies; 16+ messages in thread
From: ivan.khoronzhuk @ 2013-11-27 11:51 UTC (permalink / raw)
  To: Brian Norris
  Cc: Mark Rutland, devicetree, grygorii.strashko, Russell King,
	Pawel Moll, Stephen Warren, Ian Campbell, Kumar Gala,
	Rob Herring, linux-kernel, Santosh Shilimkar, Rob Landley,
	linux-mtd, linux-arm-kernel

On 11/27/2013 03:33 AM, Brian Norris wrote:
> Hi Ivan,
>
> On Thu, Nov 21, 2013 at 01:28:15PM +0200, Ivan Khoronzhuk wrote:
>> This series contains fixes and updates of Davinci nand driver in
>> order to reuse it for Keystone platform.
>>
>> The series is combination of two following series:
>> - Davinci nand driver fixes and updates:
>>    https://lkml.org/lkml/2013/11/20/271
>> - Reuse davinci-nand driver for Keystone arch
>>    https://lkml.org/lkml/2013/11/20/315
>
> Can you make sure to consistently change the email $subject for your
> patch series? For each of the above, it looks like they are actually
> version 2, yet they still just say "[PATCH X/Y]" (not "[PATCH v2 X/Y]").
> This makes it harder to parse the history of each series. (And the
> combining of two un-versioned patch series adds to the confusion.)
>
> Now, this combined series has a good v2 marking (although at this point,
> is it really v3? ...whatever, it doesn't matter). Please continue to
> write appropriate $subjects for this and future patch series.
>
> Thanks,
> Brian
>

Sorry for the mess, I will

-- 
Regards,
Ivan Khoronzhuk

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch
  2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
                   ` (11 preceding siblings ...)
  2013-11-27  1:33 ` Brian Norris
@ 2013-11-29 16:28 ` Santosh Shilimkar
  2013-12-03  9:45   ` ivan.khoronzhuk
  12 siblings, 1 reply; 16+ messages in thread
From: Santosh Shilimkar @ 2013-11-29 16:28 UTC (permalink / raw)
  To: Ivan Khoronzhuk
  Cc: Mark Rutland, devicetree, grygorii.strashko, Russell King,
	david.woodhouse, Pawel Moll, Stephen Warren, Ian Campbell,
	Kumar Gala, Rob Herring, linux-kernel, linux-mtd, Rob Landley,
	linux-arm-kernel

Ivan,
On Thursday 21 November 2013 06:28 AM, Ivan Khoronzhuk wrote:
> This series contains fixes and updates of Davinci nand driver in
> order to reuse it for Keystone platform.
> 
> The series is combination of two following series:
> - Davinci nand driver fixes and updates:
>   https://lkml.org/lkml/2013/11/20/271
> - Reuse davinci-nand driver for Keystone arch
>   https://lkml.org/lkml/2013/11/20/315
> 
> Ivan Khoronzhuk (10):
>   mtd: nand: davinci: fix driver registration
>   mtd: nand: davinci: return ENOMEM if memory allocation is failed
>   mtd: nand: davinci: check required ti,davinci-chipselect property
>   mtd: nand: davinci: simplify error handling
>   mtd: nand: davinci: move bindings under mtd
>   mtd: nand: davinci: extend description of bindings
>   mtd: nand: davinci: adjust DT properties to MTD generic
>   mtd: nand: davinci: reuse driver for Keystone arch
>   mtd: nand: davinci: don't set timings if AEMIF is used
>   mtd: nand: davinci: don't request AEMIF address range
> 
>  .../devicetree/bindings/arm/davinci/nand.txt       |   46 --------
>  .../devicetree/bindings/mtd/davinci-nand.txt       |   94 ++++++++++++++++
>  drivers/mtd/nand/Kconfig                           |    6 +-
>  drivers/mtd/nand/davinci_nand.c                    |  117 +++++++++++---------
>  4 files changed, 164 insertions(+), 99 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt
>  create mode 100644 Documentation/devicetree/bindings/mtd/davinci-nand.txt
> 
Please drop patch 9 from the series considering we are handling it
differently and repost the entire series with David in cc. David
has been lining up the patches.

Regards,
Santosh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch
  2013-11-29 16:28 ` Santosh Shilimkar
@ 2013-12-03  9:45   ` ivan.khoronzhuk
  0 siblings, 0 replies; 16+ messages in thread
From: ivan.khoronzhuk @ 2013-12-03  9:45 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Mark Rutland, devicetree, grygorii.strashko, Russell King,
	david.woodhouse, Pawel Moll, Stephen Warren, Ian Campbell,
	Kumar Gala, Rob Herring, linux-kernel, linux-mtd, Rob Landley,
	linux-arm-kernel

On 11/29/2013 06:28 PM, Santosh Shilimkar wrote:
> Ivan,
> On Thursday 21 November 2013 06:28 AM, Ivan Khoronzhuk wrote:
>> This series contains fixes and updates of Davinci nand driver in
>> order to reuse it for Keystone platform.
>>
>> The series is combination of two following series:
>> - Davinci nand driver fixes and updates:
>>    https://lkml.org/lkml/2013/11/20/271
>> - Reuse davinci-nand driver for Keystone arch
>>    https://lkml.org/lkml/2013/11/20/315
>>
>> Ivan Khoronzhuk (10):
>>    mtd: nand: davinci: fix driver registration
>>    mtd: nand: davinci: return ENOMEM if memory allocation is failed
>>    mtd: nand: davinci: check required ti,davinci-chipselect property
>>    mtd: nand: davinci: simplify error handling
>>    mtd: nand: davinci: move bindings under mtd
>>    mtd: nand: davinci: extend description of bindings
>>    mtd: nand: davinci: adjust DT properties to MTD generic
>>    mtd: nand: davinci: reuse driver for Keystone arch
>>    mtd: nand: davinci: don't set timings if AEMIF is used
>>    mtd: nand: davinci: don't request AEMIF address range
>>
>>   .../devicetree/bindings/arm/davinci/nand.txt       |   46 --------
>>   .../devicetree/bindings/mtd/davinci-nand.txt       |   94 ++++++++++++++++
>>   drivers/mtd/nand/Kconfig                           |    6 +-
>>   drivers/mtd/nand/davinci_nand.c                    |  117 +++++++++++---------
>>   4 files changed, 164 insertions(+), 99 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt
>>   create mode 100644 Documentation/devicetree/bindings/mtd/davinci-nand.txt
>>
> Please drop patch 9 from the series considering we are handling it
> differently and repost the entire series with David in cc. David
> has been lining up the patches.
> 
> Regards,
> Santosh
> 

Ok, I'll drop patch 9.
Only question about patch
ARM: davinci: aemif: get rid of davinci-nand driver dependency on aemif
(http://www.spinics.net/lists/devicetree/msg13711.html).
How would be better, the series would be based on it or vice-versa?

-- 
Regards,
Ivan Khoronzhuk

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-03  9:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-21 11:28 [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 01/10] mtd: nand: davinci: fix driver registration Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 02/10] mtd: nand: davinci: return ENOMEM if memory allocation is failed Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 03/10] mtd: nand: davinci: check required ti, davinci-chipselect property Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 04/10] mtd: nand: davinci: simplify error handling Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 05/10] mtd: nand: davinci: move bindings under mtd Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 06/10] mtd: nand: davinci: extend description of bindings Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 07/10] mtd: nand: davinci: adjust DT properties to MTD generic Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 08/10] mtd: nand: davinci: reuse driver for Keystone arch Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH v2 09/10] mtd: nand: davinci: don't set timings if AEMIF is used Ivan Khoronzhuk
2013-11-21 11:28 ` [PATCH 10/10] mtd: nand: davinci: don't request AEMIF address range Ivan Khoronzhuk
2013-11-21 17:45 ` [PATCH v2 00/10] Reuse davinci-nand driver for Keystone arch Taras Kondratiuk
2013-11-27  1:33 ` Brian Norris
2013-11-27 11:51   ` ivan.khoronzhuk
2013-11-29 16:28 ` Santosh Shilimkar
2013-12-03  9:45   ` ivan.khoronzhuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).