mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fdt: Fix dt memreserve entry
@ 2013-05-13 14:05 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2013-05-13 14:05 UTC (permalink / raw)
  To: barebox; +Cc: Jürgen Beisert

The fdt reserve map needs address/size values, not address/end values
like accidently done for generating the reserve entry for the dt.

Reported-by: Jürgen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/of/fdt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index db422a4..a3ec576 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -489,8 +489,7 @@ void fdt_add_reserve_map(void *__fdt)
 	}
 
 	of_write_number(&fdt_res->address, (unsigned long)__fdt, 2);
-	of_write_number(&fdt_res->size, (unsigned long)__fdt +
-			be32_to_cpu(fdt->totalsize), 2);
+	of_write_number(&fdt_res->size, be32_to_cpu(fdt->totalsize), 2);
 	fdt_res++;
 
 	of_write_number(&fdt_res->address, 0, 2);
-- 
1.8.2.rc2


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-13 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13 14:05 [PATCH] fdt: Fix dt memreserve entry Sascha Hauer

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