mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one
@ 2015-04-30 14:21 Marc Kleine-Budde
  2015-04-30 16:29 ` Uwe Kleine-König
  2015-05-01  6:41 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-04-30 14:21 UTC (permalink / raw)
  To: barebox

We have to start searching for the mtd node starting in the given root node not
the defaukt (= barebox internal) one. This means the internal DT is always
fixed up. This leads to booting not fixed up DT when using external DTs.

This patch fixes the problem.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/mtd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 63b1e4a824fa..0197d2c8a3e1 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -488,7 +488,7 @@ static int of_mtd_fixup(struct device_node *root, void *ctx)
 	struct device_node *np, *part, *tmp;
 	int ret, i = 0;
 
-	np = of_find_node_by_path(mtd->of_path);
+	np = of_find_node_by_path_from(root, mtd->of_path);
 	if (!np) {
 		dev_err(&mtd->class_dev, "Cannot find nodepath %s, cannot fixup\n",
 				mtd->of_path);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one
  2015-04-30 14:21 [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one Marc Kleine-Budde
@ 2015-04-30 16:29 ` Uwe Kleine-König
  2015-05-01  6:41 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2015-04-30 16:29 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox

Hei Marc,

On Thu, Apr 30, 2015 at 04:21:18PM +0200, Marc Kleine-Budde wrote:
> We have to start searching for the mtd node starting in the given root node not
> the defaukt (= barebox internal) one. This means the internal DT is always
> fixed up. This leads to booting not fixed up DT when using external DTs.
> 
> This patch fixes the problem.
this seems to be the explanation for the question that arose in the
"mtd: partition: Fix OF partition fixup" thread. Namely why isn't there
a mismatch of the register sizes when using an external device tree.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Did you check since when this is broken? A Fixes tag would be nice.

Best regards and thanks for looking into this
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one
  2015-04-30 14:21 [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one Marc Kleine-Budde
  2015-04-30 16:29 ` Uwe Kleine-König
@ 2015-05-01  6:41 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-05-01  6:41 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox

On Thu, Apr 30, 2015 at 04:21:18PM +0200, Marc Kleine-Budde wrote:
> We have to start searching for the mtd node starting in the given root node not
> the defaukt (= barebox internal) one. This means the internal DT is always
> fixed up. This leads to booting not fixed up DT when using external DTs.
> 
> This patch fixes the problem.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  drivers/mtd/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2015-05-01  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30 14:21 [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one Marc Kleine-Budde
2015-04-30 16:29 ` Uwe Kleine-König
2015-05-01  6:41 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox