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.7 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 C2A24C433F5 for ; Fri, 10 Sep 2021 20:49:15 +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 4C129610C9 for ; Fri, 10 Sep 2021 20:49:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4C129610C9 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 9A85B83723; Fri, 10 Sep 2021 22:48:59 +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="pwqxBiDZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 268668370F; Fri, 10 Sep 2021 22:48:42 +0200 (CEST) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 3C01883716 for ; Fri, 10 Sep 2021 22:47:51 +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-x42b.google.com with SMTP id n5so4344668wro.12 for ; Fri, 10 Sep 2021 13:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tXqnR83OpHfX9Td3gsyog+B/9yiV4qFSBsF67eSOedE=; b=pwqxBiDZk1WPX1bS6mGsVipRRTZ5v0Fwun+5uavuiKrBRPCXBLDpF6dQHIuGobBIU8 1JgE8u1rTWqsQ9GjmzE7Th+QELChCx7w4bNkUGoPiz1IsCRREUeU+66qXlwfhWZaEuZr eGtZufmIdc6s//bh4Ya+EwRohm5PPTQrBXV+n5Hn8wCI7VveilaVYJRJbg0geIZ16R/s iI76UewnuPfBVbwZDyMWe281/QfG3sEu4ZyFYIjZwy5X9z/Q/Qiocbk40GLGuRU7AlQM tOgumiNBRr9Sg2KMg8U0uAi//3C9+3feQqcrYJjSWCT7sHVohbVIMorF7cfSDHJp6N18 49wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tXqnR83OpHfX9Td3gsyog+B/9yiV4qFSBsF67eSOedE=; b=5JblXB0R6h/9F9GPVeuxN1yDdFJpE4Z+0TD0gg2nWWfM6kOREHwP16+3YW8U+nRELg PPMqnI72KULofMOwV1xc8suj3q1KxDlkVc1M7eb1pJg2OPKHw0Fx4GEPO5L1KbTlIm84 vAYREccBF8Swf+R87wFBsXObZ1/+r32BhvaPBk0M2mFFMxJLEzgwg+es5CASyss+nTF1 sxbi3wpQ2o8gXWlKpv4rFblQh4L+/ErzVq1cHN4GwZBAuhUE6mL8mZ6Yibm/G5T74uHZ /LzBBlzwujPC0jYewa6oHB5t9+FwcqGdQPjJNJsZKG4gKI5ApCJ1eovZ1aUTw7LU/ouz 1PDw== X-Gm-Message-State: AOAM530m9KZARhcMuckh2D7Q46X/nCVw7BziNam1PzwAnCyG5wQuM4Tl P6LWlh85D3jkAgneaev/P0+iOs40knlWQA== X-Google-Smtp-Source: ABdhPJzsZmZKq+FkBWPzMv84b6FncjWXjUGd5eYBZELGJEuJ8WccWehI7l1RXrZ6PJrf+pRxYSDMow== X-Received: by 2002:adf:cd0f:: with SMTP id w15mr11874343wrm.346.1631306870850; Fri, 10 Sep 2021 13:47:50 -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 p11sm5195948wma.16.2021.09.10.13.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 13:47:50 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Goldschmidt , Tom Rini Subject: [PATCH 10/12] lmb: sh: Add arch_lmb_reserve() Date: Fri, 10 Sep 2021 22:47:16 +0200 Message-Id: <20210910204718.17765-10-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910204718.17765-1-marek.vasut+renesas@gmail.com> References: <20210910204718.17765-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(). This architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut Cc: Simon Goldschmidt Cc: Tom Rini --- V2: No change --- arch/sh/lib/bootm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c index dc94f83785..9b71424dfe 100644 --- a/arch/sh/lib/bootm.c +++ b/arch/sh/lib/bootm.c @@ -12,8 +12,11 @@ #include #include #include +#include #include +DECLARE_GLOBAL_DATA_PTR; + #ifdef CONFIG_SYS_DEBUG static void hexdump(unsigned char *buf, int len) { @@ -111,3 +114,16 @@ int do_bootm_linux(int flag, int argc, char *const argv[], /* does not return */ return 1; } + +static ulong get_sp(void) +{ + ulong ret; + + asm("mov r15, %0" : "=r"(ret) : ); + return ret; +} + +void arch_lmb_reserve(struct lmb *lmb) +{ + arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096); +} -- 2.33.0