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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26657C433EF for ; Fri, 8 Oct 2021 19:57:12 +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 2EC5760F4B for ; Fri, 8 Oct 2021 19:57:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2EC5760F4B 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 17C3683616; Fri, 8 Oct 2021 21:57:08 +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="TySmbWie"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E5FB183616; Fri, 8 Oct 2021 21:57:05 +0200 (CEST) Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) (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 AA1AA833D4 for ; Fri, 8 Oct 2021 21:57:01 +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=mr.nuke.me@gmail.com Received: by mail-oo1-xc2e.google.com with SMTP id j11-20020a4a92cb000000b002902ae8cb10so3222005ooh.7 for ; Fri, 08 Oct 2021 12:57:01 -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=a2oEw/KeBlbGy7fEBlFWhOLwuFFuj3t/KwNzVgVmiQI=; b=TySmbWiemTL4TugxmU9oCdy0FpQOoAZFDb5gWeRH/Yvm+VJ+9UR/lxbOXQqmZJiT+u BIeohG2rgoNhnHIzHuK57UJGE7k88KV1aeuY9JENCtAsiNb2qhvmuupuvXLJjsEqH/XA 8l6fQsMkQLKRV7pnNWCsQJxEo4St5OPg5mlS5wtiJTNiqeBO9mJEGq1Kq3jwC6KUwcJF YG2EgTJL8eLfhCQdpM6KD3bAuHql64XXIYnl+JxfrX+k3FQOmqK28gIearLAhjd6qbU4 mPZN2T3p8u4R8zh9ObqOuyQ1vQPGpyPsIU/qAuJws3KVDGqfM5d5bNqRumQXQwpNFI49 8XTg== 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=a2oEw/KeBlbGy7fEBlFWhOLwuFFuj3t/KwNzVgVmiQI=; b=lk9OeDo7Si5laxze6ZjdUXlevkjr5UOmiDbPlzA+iNsykgMTXmQiAUrtEc8JfYZkzo rF84u+ZFZlR3l4w1Bq1VKykSjxfTmHoUuyHY0H35c7mjca+LXhkQs+gzRMrwbm5/VBpC SzFAICl3LAEh/PWIRcUcae0YWb59PJFzNIjpWl6ToKG8f/Ci8P/hVNNiAmoPizr+HLhV rApH+MCw1MYJFqDHlQuCa7ulnpIiLiQTMD5JrDV33/aZbPSPYbJsDJbe5HFOv9WsjIyS edrW0FLepaF5ryhARQ2GH3VNhdNuP7pVIdX/YINIarpQ59ZEYERnkV+x4Xu13jG+AeIV x1Pg== X-Gm-Message-State: AOAM532QKokjAfqL94zQ5u1v1jhURyED0XzatR+Z4Aiy3C/HgdTk0aV4 nD7lmIAfU78d6kfQLJdy7c2w0/4EPXE= X-Google-Smtp-Source: ABdhPJy/MQiLJWrBwZ1C3IczNQ9DBvAWF4E8LMfyRf4qpR1Qkwi7vOyQoharGBmyIwc8Yv1CopB2YA== X-Received: by 2002:a4a:970a:: with SMTP id u10mr9354252ooi.74.1633723019904; Fri, 08 Oct 2021 12:56:59 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id x8sm67409otg.31.2021.10.08.12.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 12:56:59 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de, uboot-stm32@st-md-mailman.stormreply.com, patrick.delaunay@foss.st.com Cc: Alexandru Gagniuc , patrice.chotard@foss.st.com, etienne.carriere@linaro.org Subject: [PATCH v3 01/13] spl: Untagle spl_start_uboot() from spl_mmc.c Date: Fri, 8 Oct 2021 14:56:43 -0500 Message-Id: <20211008195655.46046-2-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211008195655.46046-1-mr.nuke.me@gmail.com> References: <20211008195655.46046-1-mr.nuke.me@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 The symbol spl_start_uboot() is provided in spl_mmc.c, but it may also be provided by platform code. Fireworks can be created with the following combination: CONFIG_SPL_OS_BOOT is not set CONFIG_SPL_MMC=y ARCH provides spl_start_uboot() A weak implementation of spl_start_uboot() exists in spl/spl.c, so leverage that one and stop defining the symbol in spl_mmc.c. We need the symbol because spl_start_uboot() is called in spl_mmc.c irrespective of the Falcon mode being activated. Signed-off-by: Alexandru Gagniuc --- common/spl/spl.c | 10 ++++++---- common/spl/spl_mmc.c | 4 ---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index a9304d4148..6232a23c9e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -87,15 +87,17 @@ __weak int dram_init_banksize(void) * 0 to not start u-boot * positive if u-boot should start */ -#ifdef CONFIG_SPL_OS_BOOT __weak int spl_start_uboot(void) { - puts(SPL_TPL_PROMPT - "Please implement spl_start_uboot() for your board\n"); - puts(SPL_TPL_PROMPT "Direct Linux boot not active!\n"); + if (IS_ENABLED(CONFIG_SPL_OS_BOOT)){ + puts(SPL_TPL_PROMPT + "Please implement spl_start_uboot() for your board\n"); + puts(SPL_TPL_PROMPT "Direct Linux boot not active!\n"); + } return 1; } +#ifdef CONFIG_SPL_OS_BOOT /* * Weak default function for arch specific zImage check. Return zero * and fill start and end address if image is recognized. diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index d52f8a3eef..a9a588b04f 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -252,10 +252,6 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image, return 0; } #else -int spl_start_uboot(void) -{ - return 1; -} static int mmc_load_image_raw_os(struct spl_image_info *spl_image, struct mmc *mmc) { -- 2.31.1