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 7E1CDC4338F for ; Mon, 2 Aug 2021 09:45:54 +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 05D9D61057 for ; Mon, 2 Aug 2021 09:45:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 05D9D61057 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 304BE833B7; Mon, 2 Aug 2021 11:45:48 +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="IpxB85fR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A269D833B6; Mon, 2 Aug 2021 11:45:42 +0200 (CEST) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 D5D92833B1 for ; Mon, 2 Aug 2021 11:45:39 +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-ej1-x635.google.com with SMTP id e19so29907787ejs.9 for ; Mon, 02 Aug 2021 02:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2OJlFpjU/qdmblD4TI5kULwKhKm3kiob7b/jupC6/sU=; b=IpxB85fR370ANngLGJsT8HiYtQCYNFNL3jwuM4BFlYQUJRXKn6wW4BeoA3e0VkdURG tcp8gUvDR+dy34prLjpY4ApWDv/FhR+fejSwjXyqpJN5GQtC2NcV1A5nKPUwedQIswRX QujnkrYnmUnJWKq+HP3yD5vU/LjSonVVs/P/hY1S3om2m3/hDSyq7j/eqJnVkDi+/4UL MO83EJ9Bb3OQDlsTuyPVqIJop6nsCIlJsSUu3rKL07GzIl4W1/SSR0zK+llPsIVzfuk5 KK4Yp/fevC1LjtsgWMhIOIHNfsC4lwEvbAFOoUmlgKkgJrSRwLThZttIHvengZh4m7zm eTtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2OJlFpjU/qdmblD4TI5kULwKhKm3kiob7b/jupC6/sU=; b=UwmpUKiHCC8tDtx/VGXJOBa/TjfAtrYWOUjBPd6L5m7B/LEgt2rZ0OBU7giLNUqk4i fmrRlu47h8Q/Tn0cMeswt2OPsIuM7UkTU3hUEhoqFuH0zrLz2vx7/+w0sWT3ACmjnW1l yCAczQtvzxK4KzG2h+zxBuYGY/tvOTTVOyF5ocws8DBeMU59/DpNCKObki27FxohKeti nmkBUudVLMjI4cGHdTPBRpjWT+qmKdBa6XHlgy2OFlvNVnWAOVzErYG1wEXjpWy2PzdP Vo5U1IfZXAdwlyq0RZOeatuvaoTAZhg5vqhxXc1GWYXGepNuVFH2/hZs/fgSNH2T2Ph/ ZTAw== X-Gm-Message-State: AOAM531pKaKCfUeWtLd8K9KAsdat96av29JIj++92cVh5QSADHMxGVkp SEjyPeF4TR4PpKXUJ7L89fHWY3/wkiI0cQ== X-Google-Smtp-Source: ABdhPJwEVrzSPAKACY82kz6xD+IAPOlpr4CrmpEDgoCgMTFa+wNmsKdJJB4zxagJ2BMhyEv6M366bQ== X-Received: by 2002:a17:907:160d:: with SMTP id hb13mr14387146ejc.489.1627897539363; Mon, 02 Aug 2021 02:45:39 -0700 (PDT) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id t10sm4131118edv.34.2021.08.02.02.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 02:45:38 -0700 (PDT) From: Bin Meng To: u-boot@lists.denx.de, Simon Glass Subject: [PATCH v3 2/2] x86: fsp: Only FSP2 has INIT_PHASE_END_FIRMWARE Date: Mon, 2 Aug 2021 17:45:22 +0800 Message-Id: <20210802094522.761676-3-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210802094522.761676-1-bmeng.cn@gmail.com> References: <20210802094522.761676-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. Move board_final_cleanup() to fsp2 directory. Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event") Signed-off-by: Bin Meng --- Changes in v3: - Add the missing header file include Changes in v2: - Move board_final_cleanup() to fsp2 directory arch/x86/lib/fsp/fsp_common.c | 16 ---------------- arch/x86/lib/fsp2/fsp_common.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 6365b0a50a..82f7d3ab5f 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -61,22 +61,6 @@ void board_final_init(void) debug("OK\n"); } -void board_final_cleanup(void) -{ - u32 status; - - /* 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"); -} - int fsp_save_s3_stack(void) { struct udevice *dev; diff --git a/arch/x86/lib/fsp2/fsp_common.c b/arch/x86/lib/fsp2/fsp_common.c index f69456e43a..20c3f6406a 100644 --- a/arch/x86/lib/fsp2/fsp_common.c +++ b/arch/x86/lib/fsp2/fsp_common.c @@ -6,8 +6,25 @@ #include #include +#include int arch_fsp_init(void) { return 0; } + +void board_final_cleanup(void) +{ + u32 status; + + /* 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"); +} -- 2.25.1