From patchwork Mon Sep 30 14:40:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169453 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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="XQGR8Tt+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlwj34RGz9s00 for ; Tue, 1 Oct 2019 01:01:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1DE2FC21C2C; Mon, 30 Sep 2019 14:49:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7D54EC21EEF; Mon, 30 Sep 2019 14:42:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 52F67C21E35; Mon, 30 Sep 2019 14:41:49 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id CC118C21DFD for ; Mon, 30 Sep 2019 14:41:39 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id h144so38896787iof.7 for ; Mon, 30 Sep 2019 07:41:39 -0700 (PDT) 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=vvhcKOhM00IjDnDbFmeE1WMdg2268Y8zuafqIuYfyzY=; b=XQGR8Tt+/9CzyOrTrxqq9kzwcVGGimiU3ayKxMqxdSgg7Ym23ZyMstFoMG8x/fLAQf k2ZHRNvgbncTYQegl5M6CxLgXUI9sgmvJTTk/65JOxYfzzKis08jp+uR520hWCMbsS/R axKV6qs5sFKFX/zC6ruSNw46wMKSyJ7CKV83w= 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=vvhcKOhM00IjDnDbFmeE1WMdg2268Y8zuafqIuYfyzY=; b=q34qkNgXXyQfRtJF62bINPokCIqX0GWlcaaOQ5GlVwLgOKrQpKW8Bq0g7VmGsTQ75F GN/wIMhO5M9yjiuwUeZh772cz+X2jFUyENgFMIDyGyQVa+m+NFQRgDSXvzPUgMa9mswz w3u5r3seD/S73KbYX61M3wtiUQy14Gs5mtL2Fq0NbcmrxWgKfRgtMpfG67L/olyFJNzy jVswWD9BhGHqrEefJD+jMdoFxoc8zgdj4D6odTBLd4Oqx8u5FHJBUjGwlPLjIP2JUk1A TgNQIOwV01nHiixjUeQ7qYb1+L2u0ssDkSnXvXKUZBZue/deBcy7h17+y7qgCrP37YVj XEZQ== X-Gm-Message-State: APjAAAU3NI7YL1S9DiAO3bfnitzAG2bBukv1JQEaQ0s6She0F44Nh3Mo pCpeyDsrDHg+aLTENMSPOOKA+U7jnQ8= X-Google-Smtp-Source: APXvYqyBMTZALOdZEwNa5skYEyXDdZ7wv9vVe2xRSTJK13Ib6yd5VXP5a278ZhDQajk+fmQCQ3asbA== X-Received: by 2002:a02:ac82:: with SMTP id x2mr19636479jan.18.1569854498489; Mon, 30 Sep 2019 07:41:38 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id c4sm5892885ioa.70.2019.09.30.07.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:38 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:56 -0600 Message-Id: <20190930144112.175618-26-sjg@chromium.org> X-Mailer: git-send-email 2.23.0.444.g18eeb5a265-goog In-Reply-To: <20190930144112.175618-1-sjg@chromium.org> References: <20190930144112.175618-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 25/41] common: Move checkcpu() out of common.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This function belongs in cpu.h so move it over. Signed-off-by: Simon Glass --- arch/powerpc/cpu/mpc83xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xx/cpu.c | 1 + arch/sh/cpu/sh4/cpu.c | 1 + arch/x86/cpu/broadwell/cpu_from_spl.c | 1 + arch/x86/cpu/coreboot/coreboot.c | 1 + arch/x86/cpu/efi/app.c | 1 + arch/x86/cpu/efi/payload.c | 1 + arch/x86/cpu/ivybridge/cpu.c | 1 + arch/x86/cpu/qemu/qemu.c | 1 + arch/x86/cpu/quark/quark.c | 1 + arch/x86/cpu/slimbootloader/slimbootloader.c | 1 + arch/x86/cpu/tangier/tangier.c | 1 + arch/x86/cpu/x86_64/cpu.c | 1 + arch/x86/lib/fsp/fsp_common.c | 1 + common/board_f.c | 1 + include/common.h | 1 - include/cpu_legacy.h | 10 ++++++++++ 17 files changed, 25 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 363c0ffd285..1c0d0d26320 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 6ad86e9a1d7..36af7c16125 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index a8b50a9ff5c..d79e6ea71d5 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c index c3d4a8d5477..feb0732ee9b 100644 --- a/arch/x86/cpu/broadwell/cpu_from_spl.c +++ b/arch/x86/cpu/broadwell/cpu_from_spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index 9686f8ed5b4..67cfcb72d7a 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c index ba7c02bd7e8..34bdc40e396 100644 --- a/arch/x86/cpu/efi/app.c +++ b/arch/x86/cpu/efi/app.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index 225aef7bf6a..019e312527e 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c index c8b16e32c03..f95178b8319 100644 --- a/arch/x86/cpu/ivybridge/cpu.c +++ b/arch/x86/cpu/ivybridge/cpu.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 5e8b4f068e1..c76868fa90f 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index d39edb2271b..f598666a6b0 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c index e6b174ca886..16dd4d73813 100644 --- a/arch/x86/cpu/slimbootloader/slimbootloader.c +++ b/arch/x86/cpu/slimbootloader/slimbootloader.c @@ -4,6 +4,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c index df2c600be33..a758ac4f1ed 100644 --- a/arch/x86/cpu/tangier/tangier.c +++ b/arch/x86/cpu/tangier/tangier.c @@ -4,6 +4,7 @@ */ #include +#include #include /* diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 42abb23a9ed..7d291f60f5b 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include /* diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index ed0827c6e92..b981590917a 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 9cfa465ac17..ca26375cdb2 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index ce08bfe11fe..96bb42ce71c 100644 --- a/include/common.h +++ b/include/common.h @@ -203,7 +203,6 @@ void trap_init (ulong); void s_init(void); -int checkcpu (void); int checkicache (void); int checkdcache (void); void upmconfig (unsigned int, unsigned int *, unsigned int); diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h index 75b93bc11ee..03feaa63e96 100644 --- a/include/cpu_legacy.h +++ b/include/cpu_legacy.h @@ -39,4 +39,14 @@ u32 cpu_mask(void); u32 cpu_dsp_mask(void); int is_core_valid(unsigned int core); +/** + * checkcpu() - perform an early check of the CPU + * + * This is used on PowerPC, SH and X86 machines as a CPU init mechanism. It is + * called during the pre-relocation init sequence in board_init_f(). + * + * @return 0 if oK, -ve on error + */ +int checkcpu(void); + #endif