From patchwork Sat Dec 7 04:42:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1205381 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oJj76XaS"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47VHF16692z9sPL for ; Sat, 7 Dec 2019 15:54:45 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A00CB81755; Sat, 7 Dec 2019 05:49:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oJj76XaS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1F71581755; Sat, 7 Dec 2019 05:49:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (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 66F6D81742 for ; Sat, 7 Dec 2019 05:49:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id z193so9505577iof.1 for ; Fri, 06 Dec 2019 20:49:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9taBfhOeTQfj3UxMlX4/JwHi7+hjMyY6hvq/jKRCD0k=; b=oJj76XaSYhyvk1v4MNDag3Oe4qpwQs3mBdOVJlc4GL9sTQby9+tIn4wfitk1D+kKIM if2e2b6WKHIQ5gmbr4KvfL1lTdr5kEJMNfHB57pQOmjir4ki/blH9qbG5IQ2BUE3gaoD STlREyguqMoCfZHwzy+6YSUdJDcWncxntREwY= 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=9taBfhOeTQfj3UxMlX4/JwHi7+hjMyY6hvq/jKRCD0k=; b=c1Nwv0K+dgsT4fC3A1UN5aLiYDy8JM0ZheNL49PxNUhKdXpMS5ZWzYgrRfyVHHG0a7 WhobJSSm0jB4U+cHDsVpRJMk4xjrJubPteDI6XCOQHIfnMhZyxepb5K7oaJtGDOJ+V/I MOLWy8Rk+X77VohojQ2rWdEtOfekun2aMYpT3mqh5KhJz19lTBlQVBf3Vq2OwsO6dT2u mod1uAzg/Rp/jxA31qoBCtUkA9tT2Fjlrqc08oIWt2gya0qT16i9jQLmd2Vlo/5XGmSL QN0Uuf2sQL+JQRg73x2b0K1VpVslOyaFLmFPjx0lZKoDLPXg9XzkPWa5rff6FxSWC5tk qdhA== X-Gm-Message-State: APjAAAVKoJwZAO3YIg81QTvJw50op1WYSw0MpOJzf9SrCKBrnrCjsjxx 6es8iKesKgyLEGesMSdBHIsiEqhbpMQ= X-Google-Smtp-Source: APXvYqyjIQrEf638rNysxONuy+rlreZeHD3qalHsPJoMezAV35g4g+wKHI6/YHU4aX5mrd5II+aphQ== X-Received: by 2002:a05:6638:a2c:: with SMTP id 12mr17583328jao.60.1575694153248; Fri, 06 Dec 2019 20:49:13 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id o7sm4549410ilo.58.2019.12.06.20.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 20:49:13 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH v6 047/102] x86: fsp: Add a new arch_fsp_init_r() hook Date: Fri, 6 Dec 2019 21:42:20 -0700 Message-Id: <20191206213936.v6.47.I51e7bb3ded3d088ec9ae1dcfaf869f6ffebb97ea@changeid> X-Mailer: git-send-email 2.24.0.393.g34dc348eaf-goog In-Reply-To: <20191207044315.51770-1-sjg@chromium.org> References: <20191207044315.51770-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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.101.4 at phobos.denx.de X-Virus-Status: Clean With FSP2 we need to run silicon init early after relocation. Add a new hook for this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/board_r.c | 3 +++ include/init.h | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index 9a25f6ec28..e711de64b5 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -715,6 +715,9 @@ static init_fnc_t init_sequence_r[] = { efi_memory_init, #endif initr_binman, +#ifdef CONFIG_FSP_VERSION2 + arch_fsp_init_r, +#endif initr_dm_devices, stdio_init_tables, initr_serial, diff --git a/include/init.h b/include/init.h index 8b65b2afe4..970a39a6a0 100644 --- a/include/init.h +++ b/include/init.h @@ -67,6 +67,17 @@ int mach_cpu_init(void); */ int arch_fsp_init(void); +/** + * arch_fsp_init() - perform post-relocation firmware support package init + * + * Where U-Boot relies on binary blobs to handle part of the system init, this + * function can be used to set up the blobs. This is used on some Intel + * platforms. + * + * Return: 0 + */ +int arch_fsp_init_r(void); + int dram_init(void); /**