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,URIBL_BLOCKED,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 52DF7C4338F for ; Sat, 31 Jul 2021 08:47:16 +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 BB74F60FE7 for ; Sat, 31 Jul 2021 08:47:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BB74F60FE7 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 169138329E; Sat, 31 Jul 2021 10:46:36 +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="MhleT+UC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B768082DDA; Sat, 31 Jul 2021 10:46:00 +0200 (CEST) Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (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 B0D7D8324A for ; Sat, 31 Jul 2021 10:45:53 +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=bmeng.cn@gmail.com Received: by mail-pl1-x634.google.com with SMTP id c16so13872446plh.7 for ; Sat, 31 Jul 2021 01:45:53 -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=nwtPFH3+UrtnQv+zVBId38ofyWSS81QF2qXTaoih6e0=; b=MhleT+UCqATOQvG/hHp7oDxOK2U+4ypDIpEjLTv9PmbLRB97Ppte4j4JYFBr8IU5Ob zp+N5MXdV9tlNL74hAUC7dZlru+GJcuV9o1r0tpXbbie+1CbCcCbRvpxg6FfVJLQtYkL 0tUEeC6wvrHjMmAMVpybQxJocdNGPpE1QHApFMsX7AYK4JrX7M4OwOw0svPTFirpdXb+ rh0mhEYWb5Uo5mbU4GR9JI1GILwocMo44OYI2cpfq+Oq6IOaL26hbcgHah4tWQ0Y61al KJeFBFBTDLt8u97A5OKM0XxTb4+bRdzf6i5Gy5/rvC1nBbcsd5B9zBRYcB+K6hAHRcJh OLdQ== 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=nwtPFH3+UrtnQv+zVBId38ofyWSS81QF2qXTaoih6e0=; b=e2XUXmum0zHOmiwe6OY+QUqh8DuG2vZMKnIq02TdmdscAS4eN8Mmgtm7dHiiruAaOX vWYOYi+QALuqtfy6bHOfs7kyKW9Bg/q/LErRaoeNf3wa+3VcBPLTtmnKCwgiej0K7eZp j+L3wGAz7ktrgqo/YGKsTbO7mYpcd6Vhw8jYSbNa8shcE3MGfPPiZxHyugV/wGw2v4yM YJDtYtD26EtOBGiG/QvT2An+zgMAkQVr3B3Up+ob0ZKF8m6j2NQZbv2ZYs123q5nlx9u LCaLwrJucTsgJQ/0XtVOR30JBkWv3EhbazzS74ZNp8hVJwo0LbF35vi4UJ8QYxhx2qyO h59g== X-Gm-Message-State: AOAM530xiEAIxsyoNL8725TmqPe1aUtHWyxVLHEHvBcRaelaQ/077SUs C8jijEE9ucHmcyXHL2R4+vg= X-Google-Smtp-Source: ABdhPJwNmOa7HcfSKRyVB7+r7D0C2ODn/7GSLTo5MddDYkn2DzhBIlJV1Ie4E7UU6LRHtry07j4Cqw== X-Received: by 2002:a63:505d:: with SMTP id q29mr6002634pgl.137.1627721152178; Sat, 31 Jul 2021 01:45:52 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id h6sm688355pfv.155.2021.07.31.01.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 01:45:51 -0700 (PDT) From: Bin Meng To: Simon Glass , u-boot@lists.denx.de Cc: Bin Meng Subject: [PATCH 7/7] x86: fsp: Only FSP2 has INIT_PHASE_END_FIRMWARE Date: Sat, 31 Jul 2021 16:45:29 +0800 Message-Id: <20210731084529.7524-8-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210731084529.7524-1-bmeng.cn@gmail.com> References: <20210731084529.7524-1-bmeng.cn@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 For FSP1, there is no such INIT_PHASE_END_FIRMWARE. Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event") Signed-off-by: Bin Meng --- arch/x86/lib/fsp/fsp_common.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 6365b0a50a..0155eaee8d 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -68,13 +68,15 @@ void board_final_cleanup(void) /* TODO(sjg@chromium.org): This causes Linux to crash */ return; - /* call into FspNotify */ - debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): "); - status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE); - if (status) - debug("fail, error code %x\n", status); - else - debug("OK\n"); + if (CONFIG_IS_ENABLED(FSP_VERSION2)) { + /* call into FspNotify */ + debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): "); + status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE); + if (status) + debug("fail, error code %x\n", status); + else + debug("OK\n"); + } } int fsp_save_s3_stack(void) -- 2.25.1