mtd: davinci-nand: disable subpage write for keystone-nand

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jun 10 23:59:02 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b4a812825d18c6aa80f192ddb1a116a2d214c89a
Commit:     b4a812825d18c6aa80f192ddb1a116a2d214c89a
Parent:     566c0d6a74169dc5cc9f353ff4a8d579d96a85ff
Author:     Murali Karicheri <m-karicheri2 at ti.com>
AuthorDate: Thu Mar 20 22:08:32 2014 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Apr 15 23:56:24 2014 -0700

    mtd: davinci-nand: disable subpage write for keystone-nand
    
    Sub page write doesn't work because of hw issue in controller found on
    Keystone SOCs. AEMIF controller is also used on DaVinci SOCs which
    don't seems to have any issue. So add "ti,keysone-nand" compatible
    to nand driver in order to set NAND_NO_SUBPAGE_WRITE option.
    
    Cc: Warner Losh <imp at bsdimp.com>
    Signed-off-by: Murali Karicheri <m-karicheri2 at ti.com>
    Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk at ti.com>
    Acked-by: Santosh Shilimkar <santosh.shilimkar at ti.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/davinci_nand.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 4615d79..b922c8e 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 = {
 #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);
@@ -581,6 +582,11 @@ static struct davinci_nand_pdata
 		    of_property_read_bool(pdev->dev.of_node,
 			"ti,davinci-nand-use-bbt"))
 			pdata->bbt_options = NAND_BBT_USE_FLASH;
+
+		if (of_device_is_compatible(pdev->dev.of_node,
+					    "ti,keystone-nand")) {
+			pdata->options |= NAND_NO_SUBPAGE_WRITE;
+		}
 	}
 
 	return dev_get_platdata(&pdev->dev);



More information about the linux-mtd-cvs mailing list