devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mtd: davinci-nand: disable subpage write for keystone-nand
@ 2014-03-20 20:08 Ivan Khoronzhuk
  2014-03-20 20:14 ` Santosh Shilimkar
  0 siblings, 1 reply; 8+ messages in thread
From: Ivan Khoronzhuk @ 2014-03-20 20:08 UTC (permalink / raw)
  To: dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	computersforpeace-Re5JQEeQqe8AvxtiuMwx3w,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, santosh.shilimkar-l0cyMroinI0
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	rob-VoJi6FS/r0vR7s880joybQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	grygorii.strashko-l0cyMroinI0, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	m-karicheri2-l0cyMroinI0, Warner Losh, Ivan Khoronzhuk

From: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>

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: Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Warner Losh <imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
Cc: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>

Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk-l0cyMroinI0@public.gmane.org>
---

This patch is a result of discussion on patch v1:
https://lkml.org/lkml/2014/3/20/461

 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);
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-04-30 22:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 20:08 [PATCH v2] mtd: davinci-nand: disable subpage write for keystone-nand Ivan Khoronzhuk
2014-03-20 20:14 ` Santosh Shilimkar
     [not found]   ` <532B4C36.8060405-l0cyMroinI0@public.gmane.org>
2014-04-08 12:51     ` Ivan Khoronzhuk
     [not found]       ` <5343F0D6.2010804-l0cyMroinI0@public.gmane.org>
2014-04-16  7:08         ` Brian Norris
2014-04-16  9:47           ` Ivan Khoronzhuk
2014-04-16 14:03             ` Santosh Shilimkar
2014-04-28 13:43             ` Santosh Shilimkar
     [not found]               ` <535E5AF5.2020203-l0cyMroinI0@public.gmane.org>
2014-04-30 22:33                 ` Brian Norris

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).