linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MTD: lantiq: handle NO_XIP on cfi0001 flash
@ 2016-06-06 20:35 Hauke Mehrtens
  2016-06-06 21:10 ` Jonas Gorski
  0 siblings, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2016-06-06 20:35 UTC (permalink / raw)
  To: dwmw2; +Cc: linux-mtd, John Crispin, Hauke Mehrtens

From: John Crispin <john@phrozen.org>

This uses the same device tree attribute as physmap_of.c

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/mtd/maps/lantiq-flash.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c
index c8febb3..88fc6d9 100644
--- a/drivers/mtd/maps/lantiq-flash.c
+++ b/drivers/mtd/maps/lantiq-flash.c
@@ -137,7 +137,11 @@ ltq_mtd_probe(struct platform_device *pdev)
 	if (!ltq_mtd->map)
 		return -ENOMEM;
 
-	ltq_mtd->map->phys = ltq_mtd->res->start;
+	if (of_find_property(pdev->dev.of_node, "no-unaligned-direct-access",
+			     NULL))
+		ltq_mtd->map->phys = NO_XIP;
+	else
+		ltq_mtd->map->phys = ltq_mtd->res->start;
 	ltq_mtd->map->size = resource_size(ltq_mtd->res);
 	ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res);
 	if (IS_ERR(ltq_mtd->map->virt))
-- 
2.8.1

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

end of thread, other threads:[~2016-07-10  0:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-06 20:35 [PATCH v2] MTD: lantiq: handle NO_XIP on cfi0001 flash Hauke Mehrtens
2016-06-06 21:10 ` Jonas Gorski
2016-06-06 21:38   ` Hauke Mehrtens
2016-06-06 21:54     ` Jonas Gorski
2016-06-07  5:15       ` John Crispin
     [not found]         ` <DUB122-W4035B8D72611A0E5C4EF228C530@phx.gbl>
2016-06-13 11:44           ` Matti Laakso
2016-07-10  0:30       ` 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).