From patchwork Sun Nov 18 16:58:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 999523 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42yddr2tmzz9s5c for ; Mon, 19 Nov 2018 04:05:51 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 80479C22414; Sun, 18 Nov 2018 17:01:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 14F3DC2244A; Sun, 18 Nov 2018 16:59:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1BF0EC223F8; Sun, 18 Nov 2018 16:59:34 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lists.denx.de (Postfix) with ESMTPS id E7568C22419 for ; Sun, 18 Nov 2018 16:59:33 +0000 (UTC) Received: from LT02.fritz.box ([84.118.159.3]) by mail.gmx.com (mrgmx001 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MVvi4-1fvu6E1Y40-00X3vR; Sun, 18 Nov 2018 17:59:30 +0100 From: Heinrich Schuchardt To: Alexander Graf Date: Sun, 18 Nov 2018 17:58:51 +0100 Message-Id: <20181118165854.8814-7-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181118165854.8814-1-xypron.glpk@gmx.de> References: <20181118165854.8814-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:N5QxjPD6FtTcGWxrGuBCx8xNr8cxDo++7jo6HHkvlPOYz9m5OAG KVB0QBgjRl6d2gD6xPbLVByg8sc0ZXf8iLs7skcl793FTQlMZUhAEZaQbMtEgmDtq2BxOMu 8LPBTFmxQ0acBlTBQkbTQJO7B6/V84BLgVpMWT0OqmOcZGHOs8WZRPYw6ozgSHgF23RQyo4 gtyT0dwiYeeZYuOqlRvbw== X-UI-Out-Filterresults: notjunk:1; V01:K0:nIlXPebGH7g=:sDSIzocBXwL9mF/XI125Gw SxQ6kpzMKVipXaokmz9IqIiHZLclAvp5QnUz+y0kmyZodFZzKnkudkzU7lL/RbIfG6Rj9DH01 eHjfub0s56XfOuzL9Y5i/u0Y9vTTNFPWcr6VjIAdOsdwibbzE4sWxiymMwlVo2B0ESOVYsdUR o43ak0GsxEUJfrhVxyPTOpSDPiPZFk0pihTT8+2LXY90RQ9yYJU3/shD2gWBSsro/C08b32fB EX7EtEYS46Pbw6CYplwCphjFt+qGXsNXM7kfZPkEFg2BodlK/Wj5bOxBTreFA22r1H6OT225M 9k58gMQbFW+LW4653qvojz/9gYVeZW1r5d3W2njE+CyCGjRW+tFzVjmuLnSRWw7Rn0/sEy9NV ycgxaS39qkJtq6ExQhwXknMqfrnuZXsckRlrsgHWHXyIUoZD+TiPoiXewRahn6C1gKHzkCbU2 LyOU9Tfv6z6dDFnHKpad15RGFWpGS3Zm7RnLLqRmnVKuNW9O6RUgdEfpTLfAkCaylCWIAZGNr vwHub+UTZna4GwKrIfpeyAqy4t5i4myA7R+t0u7OEQjqFJsBHuXvY/RYN7RbUbhfzLZ3vSaKR cCHf+BcPjjwiINIgngBqkmN2acJ1eiQ2vA1etbA6s3myLQNu2hsnFizf/0xG+70PQgfsa0txF Nvr2LEsNS0BGLvfKMvwY34701Shs+x+RDVAYnxPLL+lXfcUT7+Ytan+t/0qotYXslSM7jEe4G bsKmi9ZvBxEGAWP0naQJYMyaAAP6K4IOjGFfm/76kbeRLqddaMXT14CrvHRNIfcnfk4vFXtOJ UxPClcaKK3bVYPETqNn03/n9Un+M+iAMnxWr7PtVxizTcFupGUnGkOIy/UNklRtudzm3fidEA 9iJwPKkJBwXkD00mnxl/pJi1kj9BRPTsiZuQQandc= Cc: Heinrich Schuchardt , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 6/9] fdt_support: fdt reservations on the sandbox X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On the sandbox the memory addresses in the device tree refer to the virtual address space of the sandbox. This implies that the memory reservations for the fdt also have to be converted to this address space. Signed-off-by: Heinrich Schuchardt --- v3 map the correct parameter of fdt_add_mem_rsv --- common/fdt_support.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index e6daa67990d..3440e42a257 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -633,7 +634,7 @@ int fdt_shrink_to_minimum(void *blob, uint extrasize) fdt_set_totalsize(blob, actualsize); /* Add the new reservation */ - ret = fdt_add_mem_rsv(blob, (uintptr_t)blob, actualsize); + ret = fdt_add_mem_rsv(blob, map_to_sysmem(blob), actualsize); if (ret < 0) return ret;