Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1329BC19F2C for ; Sat, 30 Jul 2022 21:56:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4420A844FE; Sat, 30 Jul 2022 23:53:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="YgPwl35C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 95CC4844B9; Sat, 30 Jul 2022 23:53:37 +0200 (CEST) Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3695484405 for ; Sat, 30 Jul 2022 23:53:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-f2a4c51c45so9565927fac.9 for ; Sat, 30 Jul 2022 14:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=k7dku8YvMXb+yovl4kWcR8xmGt3tsvWu2TvjBKz9E94=; b=YgPwl35CwyTtQbvq+DlHsjjTGBwK5Ld7CsljfFWA+Dqi+9ZU0FZxUqtWIwNs+XNjXS LeY9p2PXg8XLeXxLXYIAc3gfYjcp6qD9eanrx/oBDSDrumsPTSVRAexg/eDjHPF8Lkqz 4wn28k9kZHJHVc3ZXnbleaqcFdT0g+Ud55YZc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=k7dku8YvMXb+yovl4kWcR8xmGt3tsvWu2TvjBKz9E94=; b=q8vUvoZdXJ7P96ibMI1qB1TZhzuC7WT9eE7A824RurNmOIbkv9PxDp2SyInxNKqfxp 5gxL3ne8p5EHL60VGJcNx2QEmyL9t2KZupVrYPWPimHWXeMjPdKx0tbq4KfmB+90//Pv 3UaA3bfaUkl88eC+wLQ1WDE29PZj6nZWJ0xCuZNfhsipjdknDrR+Yg57w8vmYrKxa0o8 jSO1/HjZWHR7R9SkJtQbdzC0ClZ+VbA8EIkjhDEhuWu9ZvXQLMATi405DLCaQh/OnzYb vVjqfDdwSM48jYq8pHuCI8DdHu/btLclmIEU9K4/wDxpzSaA6ZvuPr9zKuemq6ERpTfZ fMNg== X-Gm-Message-State: AJIora+UngzB5Gge5t88K9kvL82WosW5h2KpRdeoyyNzWxHgRg6GGhY3 mlB3Ui1q98mRX7bmdM64R9GSCKG45alnE7eo X-Google-Smtp-Source: AGRyM1tlHXjtA4sXjRWRLbn/JT+/ltSZQEMhALoeCohVhA1NP88lskNaE7xArDwwnyAxzVV/HxBXjQ== X-Received: by 2002:a05:6870:4284:b0:101:202e:a78d with SMTP id y4-20020a056870428400b00101202ea78dmr4824532oah.37.1659217997185; Sat, 30 Jul 2022 14:53:17 -0700 (PDT) Received: from sjg1.lan (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id 19-20020a544193000000b0032f75714af1sm1699656oiy.18.2022.07.30.14.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 14:53:16 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Bin Meng , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH v2 13/35] dm: core: Support sandbox with read interface Date: Sat, 30 Jul 2022 15:52:15 -0600 Message-Id: <20220730215237.818368-10-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog In-Reply-To: <20220730215237.818368-1-sjg@chromium.org> References: <20220730215237.818368-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Update the 'read' command to work correctly with sandbox. Signed-off-by: Simon Glass --- (no changes since v1) cmd/read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/read.c b/cmd/read.c index 99c7e3854e1..fecfadaa1fa 100644 --- a/cmd/read.c +++ b/cmd/read.c @@ -10,6 +10,7 @@ #include #include +#include #include int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -45,7 +46,7 @@ int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return 1; } - addr = (void *)hextoul(argv[3], NULL); + addr = map_sysmem(hextoul(argv[3], NULL), 0); blk = hextoul(argv[4], NULL); cnt = hextoul(argv[5], NULL); -- 2.37.1.455.g008518b4e5-goog