From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37D65C4338F for ; Sun, 15 Aug 2021 18:18:48 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8B7D06120D for ; Sun, 15 Aug 2021 18:18:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8B7D06120D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60CD682E2B; Sun, 15 Aug 2021 20:17:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="F4MMKLTK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DFD9D82E68; Sun, 15 Aug 2021 20:17:28 +0200 (CEST) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 0BFA781E47 for ; Sun, 15 Aug 2021 20:17:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@gmail.com Received: by mail-wr1-x435.google.com with SMTP id z9so20444339wrh.10 for ; Sun, 15 Aug 2021 11:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w8rvEZgnVgc8+cvngjBop3q0Ts0EmKpQxGlfLit3bP8=; b=F4MMKLTKbcApyW6ZfWTsyhN4vaJciNcdkCTuUGPno7P6C91INNM02F4c1/5a42FfTM UrpWiGUJ7TOnVXmAB7cEwIde9StxkqVJVjjmc4P94NTg9L79x+vZG5/7tqK9VNa+RWTU hCmpslsaeLRN/oLwfVhjmhFYH/M9RSkkq/4+1IURDwuTAwbjp54V9lCoje/GjohTTXfZ cV86GKtJj7TmCSqTUSTFTrRqb9tzXQ/Zvx4Hk9jncfnnTvfXseFgEs+TOG7Vc9L9iMRC tePHnhFwl31o1H5BC4abJUeMFkM+DrNjJ/0HIkbO/EkbjmKYH9ysXoFAtZfVpWbheCK/ FriQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w8rvEZgnVgc8+cvngjBop3q0Ts0EmKpQxGlfLit3bP8=; b=VbcM0sStLM2dhfjy6ect6Rdb7JLazfW2Wrd8hS9H9tyNXaQvroit+/GpfuxDQqZLH4 WoSL5uKuBv64LJWP8RD/WkqqtocvyGf3Ha/zjORHSiWezG+klJA1eOn/Ki/IcOVOd6MG 5Hf4EFw1oP52k6JvZ0oMuTVazSsw+kB7D15AiL6rgCvOzmaWxOxn0fVqykreyczxEnzb DI7ZXjFwsLzR71yQZgb14wGWz5pbqJE0O8qvevaAavkSQJGJxp+J2/fQmNKvcwjp6oef p7YEyeP3E/WdEKtSAd2vJqru/CWNtprTcqBg02y4t+5ErfiTxTYkaJpA75jdreZy5pxj cYNA== X-Gm-Message-State: AOAM531uf4K0tS8BkCtwW17N6+JXmXeI0yHz/BCv5B/qEs6fNOXoANZJ +5SIxo+VQimf9rJU5uMHeOgApif9lu/TdA== X-Google-Smtp-Source: ABdhPJyQop6QiBCEqZ4G/VdY6Phjw1YlqhvxxyWyaKH3rrph+E36C+AJCkeQWX+GFVrZSGFx9CkCSw== X-Received: by 2002:a5d:694f:: with SMTP id r15mr14266271wrw.86.1629051437598; Sun, 15 Aug 2021 11:17:17 -0700 (PDT) Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz. [89.176.112.137]) by smtp.gmail.com with ESMTPSA id i8sm5920343wrv.70.2021.08.15.11.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 11:17:17 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Rick Chen , Simon Goldschmidt , Tom Rini Subject: [PATCH 08/14] lmb: nds32: Add arch_lmb_reserve() Date: Sun, 15 Aug 2021 20:13:08 +0200 Message-Id: <20210815181314.132330-8-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210815181314.132330-1-marek.vasut+renesas@gmail.com> References: <20210815181314.132330-1-marek.vasut+renesas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut Cc: Rick Chen Cc: Simon Goldschmidt Cc: Tom Rini --- arch/nds32/lib/bootm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c index 4cb0f530ae..a7c8978f23 100644 --- a/arch/nds32/lib/bootm.c +++ b/arch/nds32/lib/bootm.c @@ -245,3 +245,16 @@ static void setup_end_tag(struct bd_info *bd) } #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */ + +static ulong get_sp(void) +{ + ulong ret; + + asm("move %0, $sp" : "=r"(ret) : ); + return ret; +} + +void arch_lmb_reserve(struct lmb *lmb) +{ + arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096); +} -- 2.30.2