From patchwork Mon Sep 30 14:40:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169410 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="N/oNKZDt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlTR2R3Fz9s00 for ; Tue, 1 Oct 2019 00:41:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B6470C21E16; Mon, 30 Sep 2019 14:41:25 +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 51CB5C21C2C; Mon, 30 Sep 2019 14:41:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A6E30C21C2C; Mon, 30 Sep 2019 14:41:21 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 1B43BC21BE5 for ; Mon, 30 Sep 2019 14:41:21 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id n197so38884667iod.9 for ; Mon, 30 Sep 2019 07:41:21 -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=LMxi5mB7WpXaGOjPvOXhpiH4ddiLS/DAu0ZHSoWZvJU=; b=N/oNKZDtqy1U44E6BtdzG2bXkLh2hWFQeCQu9s10biYrqmFjV8XSZ61SVyiGgj3tQl K4EU98knHgycNV5whltbSt5tTnpOY99akGl31oXLh4Ow6vDbo/hbKCeVJTjKpSt6zkpD emTZI3wfByKlWqiGE/kaq7TEUEJfJeumfLaUo= 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=LMxi5mB7WpXaGOjPvOXhpiH4ddiLS/DAu0ZHSoWZvJU=; b=FwetjQfpMyOKeROwJDUf41IHS5bR0p7ajSDv+rbZGgr0SZwimz9Yq6arHAWGwybu/H EWFZqW2Kp04rfG4xgeAizzgurerg75Qr5NC4ldJWwgle6zcyNpj6DYtXgiFFi6jl+hki mRMYF9hsldWpXlK2IlzvYCByNlW5j8DMhn4I7kLQmVLIuZafv6ecmW1ENgQ56/+5Kvt4 u/KdphS2k97oV3QiyeOf2/inOSAzdJGLtJRwiuZr4vC0mWc6ni2cs633qPXD9hgQiEZC rCqxPaeOeVZLciSNqxalB2x2So+Sb7jE2vdQMzdFKQGy5PNeyFpAQJrUauFwvv5HJZbM xVJA== X-Gm-Message-State: APjAAAVgxA7vSG8ZJECeYAAKr49BWaz+1GdpStqkswow654+K6KmD9d4 vE1UXOzOAK5xfAFEyUhK5S+FuoN8p5s= X-Google-Smtp-Source: APXvYqxWOBnY/r5peKQDdWu2qKbyCrxIjAcZX2CHejurRTp4sVtJzPXpv4RjoRH8UQ3eHSnOo/h/SA== X-Received: by 2002:a02:cd2d:: with SMTP id h13mr12313602jaq.19.1569854479397; Mon, 30 Sep 2019 07:41:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:19 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:32 -0600 Message-Id: <20190930144112.175618-2-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 01/41] common: Move legacy CPU functions to their own header 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" These should be moved to driver model, but in the meantime, move them out of the common header to help reduce its size. Signed-off-by: Simon Glass --- README | 2 +- arch/arm/cpu/armv8/fsl-layerscape/mp.c | 1 + arch/arm/mach-imx/mx6/mp.c | 1 + arch/arm/mach-zynqmp/mp.c | 1 + arch/powerpc/cpu/mpc85xx/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/mp.c | 1 + arch/powerpc/cpu/mpc86xx/mp.c | 1 + cmd/mp.c | 1 + include/common.h | 8 -------- include/cpu_legacy.h | 23 +++++++++++++++++++++++ 10 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 include/cpu_legacy.h diff --git a/README b/README index 1389e8ff127..107e67fdda5 100644 --- a/README +++ b/README @@ -2983,7 +2983,7 @@ Low Level (hardware related) configuration options: - CONFIG_SYS_SRIOn_MEM_VIRT: Virtual Address of SRIO port 'n' memory region -- CONFIG_SYS_SRIOn_MEM_PHYS: +- CONFIG_SYS_SRIOn_MEM_PHYxS: Physical Address of SRIO port 'n' memory region - CONFIG_SYS_SRIOn_MEM_SIZE: diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c index 7627fd13e7d..1c878bc9ab6 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c index eda168d8671..36f1dc8f923 100644 --- a/arch/arm/mach-imx/mx6/mp.c +++ b/arch/arm/mach-imx/mx6/mp.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c index 2a71870ae7b..691c86a4b00 100644 --- a/arch/arm/mach-zynqmp/mp.c +++ b/arch/arm/mach-zynqmp/mp.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index bf48836036b..bba71813bcb 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 3882c95f92e..d4077a09202 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c index ce300eac5b0..40499ef9471 100644 --- a/arch/powerpc/cpu/mpc86xx/mp.c +++ b/arch/powerpc/cpu/mpc86xx/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/cmd/mp.c b/cmd/mp.c index 01d30c1ccb7..5d77c3a78d7 100644 --- a/cmd/mp.c +++ b/cmd/mp.c @@ -5,6 +5,7 @@ #include #include +#include static int cpu_status_all(void) { diff --git a/include/common.h b/include/common.h index d8f302ea92f..16c885dd3ff 100644 --- a/include/common.h +++ b/include/common.h @@ -355,14 +355,6 @@ static inline struct in_addr env_get_ip(char *var) void show_activity(int arg); #endif -/* Multicore arch functions */ -#ifdef CONFIG_MP -int cpu_status(u32 nr); -int cpu_reset(u32 nr); -int cpu_disable(u32 nr); -int cpu_release(u32 nr, int argc, char * const argv[]); -#endif - #else /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */ diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h new file mode 100644 index 00000000000..a99b69b9764 --- /dev/null +++ b/include/cpu_legacy.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * Copyright 2019 Google LLC + */ + +#ifndef __CPU_LEGACY_H +#define __CPU_LEGACY_H + +#include + +/* + * Multicore arch functions + * + * These should be moved to use the CPU uclass. + */ +int cpu_status(u32 nr); +int cpu_reset(u32 nr); +int cpu_disable(u32 nr); +int cpu_release(u32 nr, int argc, char * const argv[]); + +#endif From patchwork Mon Sep 30 14:40:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169412 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="aR7qiXzw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlW42pQdz9s00 for ; Tue, 1 Oct 2019 00:42:56 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 18E7AC21F49; Mon, 30 Sep 2019 14:42:40 +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 944A4C21DB6; Mon, 30 Sep 2019 14:41:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6E392C21C29; Mon, 30 Sep 2019 14:41:22 +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 D9F1AC21BE5 for ; Mon, 30 Sep 2019 14:41:21 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id b136so38937158iof.3 for ; Mon, 30 Sep 2019 07:41:21 -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=jrcD2q39kd395e4KARFeNCyjDOwSYDaUdBE3WmSBLfI=; b=aR7qiXzw01ejl4Jj4PzaQTSzXyB3KKCs4ZvC1iBFAgo02rAPtN8iN8Rs/cH4HdFGhb SnxZcdeeeVI4ZOoIsjp4VYKNSnXz+NVUBiKYn3B6geryraOipVxknap1mYKhik1Ma3xZ yADDX5XSCFR7XidkvpPiHNce5I6xhSwtIyccM= 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=jrcD2q39kd395e4KARFeNCyjDOwSYDaUdBE3WmSBLfI=; b=MhfijAHAGCTJ5LuoJqbPPPrn8rPkXQ/TrbWaiaQowAy72b763893L+4l5juHYssAhC 4XtnCDocpxstyV4jTd9/gA1p+zP4hm4eoUmejIwB+NbL2mAMcm0bc8Rq9bopPCfOND4s th0MEh26USExxDnNSm56CUw45ZUctMyHs8zA+2YNf8Ay1kAlJeAxnZ5stl4VCVCbmlfi 2r6U2mvxv+hhnF+AWcXbYNdofMdfN/DLirRKfh6F/fq2e73X5qgBd3uj2nB1dZm7z3cS SVVhaG/JmWivPUEbLeXkGP6nK4h9VNbLdcqyJiQ7ngyRU6ZutF9T2JMxtvGp6Z21Bfeg fcJw== X-Gm-Message-State: APjAAAUjDNyUeCQ3N5ek+CuwLWlWScHxVQUYooeJXyyNypgs8uLNhn/K veEEDMNlUvRyzA76suMxaERgXxHzeIM= X-Google-Smtp-Source: APXvYqwI0nRilhC+UTST6K40vlov+jhEAWTqQhmfyyGPpqKkcN4fjUAV3/aVyWNab9CP7uhKtCTb5Q== X-Received: by 2002:a6b:e512:: with SMTP id y18mr21239815ioc.4.1569854480364; Mon, 30 Sep 2019 07:41:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:33 -0600 Message-Id: <20190930144112.175618-3-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 02/41] Drop CONFIG_SHOW_ACTIVITY 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 feature is not enabled by any board. Drop it. Signed-off-by: Simon Glass --- arch/powerpc/lib/interrupts.c | 13 ------------- common/cli_readline.c | 6 ------ drivers/timer/mpc83xx_timer.c | 4 ---- include/common.h | 4 ---- net/net.c | 3 --- scripts/config_whitelist.txt | 1 - 6 files changed, 31 deletions(-) diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index 19682cfcfad..e589933f565 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -15,15 +15,6 @@ #endif #ifndef CONFIG_MPC83XX_TIMER -#ifdef CONFIG_SHOW_ACTIVITY -void board_show_activity (ulong) __attribute__((weak, alias("__board_show_activity"))); - -void __board_show_activity (ulong dummy) -{ - return; -} -#endif /* CONFIG_SHOW_ACTIVITY */ - #ifndef CONFIG_SYS_WATCHDOG_FREQ #define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) #endif @@ -94,10 +85,6 @@ void timer_interrupt (struct pt_regs *regs) #ifdef CONFIG_LED_STATUS status_led_tick (timestamp); #endif /* CONFIG_LED_STATUS */ - -#ifdef CONFIG_SHOW_ACTIVITY - board_show_activity (timestamp); -#endif /* CONFIG_SHOW_ACTIVITY */ } ulong get_timer (ulong base) diff --git a/common/cli_readline.c b/common/cli_readline.c index 99b631720e1..ea510ed6395 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -569,12 +569,6 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, return -2; /* timed out */ WATCHDOG_RESET(); /* Trigger watchdog, if needed */ -#ifdef CONFIG_SHOW_ACTIVITY - while (!tstc()) { - show_activity(0); - WATCHDOG_RESET(); - } -#endif c = getc(); /* diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 8e541109d4e..9bc32f9b281 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -171,10 +171,6 @@ void timer_interrupt(struct pt_regs *regs) #ifdef CONFIG_LED_STATUS status_led_tick(priv->timestamp); #endif /* CONFIG_LED_STATUS */ - -#ifdef CONFIG_SHOW_ACTIVITY - board_show_activity(priv->timestamp); -#endif /* CONFIG_SHOW_ACTIVITY */ } void wait_ticks(ulong ticks) diff --git a/include/common.h b/include/common.h index 16c885dd3ff..4b84969ad3d 100644 --- a/include/common.h +++ b/include/common.h @@ -351,10 +351,6 @@ static inline struct in_addr env_get_ip(char *var) #include -#ifdef CONFIG_SHOW_ACTIVITY -void show_activity(int arg); -#endif - #else /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */ diff --git a/net/net.c b/net/net.c index ded86e74567..0513444eb78 100644 --- a/net/net.c +++ b/net/net.c @@ -561,9 +561,6 @@ restart: */ for (;;) { WATCHDOG_RESET(); -#ifdef CONFIG_SHOW_ACTIVITY - show_activity(1); -#endif if (arp_timeout_check() > 0) time_start = get_timer(0); diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b06a77ebd66..dbe7c102532 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1582,7 +1582,6 @@ CONFIG_SHARP_LM8V31 CONFIG_SHARP_LQ035Q7DH06 CONFIG_SHEEVA_88SV131 CONFIG_SHEEVA_88SV331xV5 -CONFIG_SHOW_ACTIVITY CONFIG_SH_CMT_CLK_FREQ CONFIG_SH_DSP CONFIG_SH_ETHER_ALIGNE_SIZE From patchwork Mon Sep 30 14:40:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169414 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="e8cG6loi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlWs0yw4z9s00 for ; Tue, 1 Oct 2019 00:43:37 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CD452C21E2B; Mon, 30 Sep 2019 14:43:02 +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 1B04BC21C2C; Mon, 30 Sep 2019 14:41:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3E3EBC21C29; Mon, 30 Sep 2019 14:41:23 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id BD18AC21BE5 for ; Mon, 30 Sep 2019 14:41:22 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id w12so10840419iol.11 for ; Mon, 30 Sep 2019 07:41:22 -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=rzx1SaPgKZwmJIj5i5/zHYwngFLXhRzIJbIls1FX1jo=; b=e8cG6loiD4BNt4JHe69pXVxWaJ4iMjRYonhnFGeEU9cQeMW3b4Id+mMSrK589xxLHB KIqMH+BjcUlx6SXQ/lQjnNXgsNDAaYe8iMD8q0sLTYqsYIIeQ8iwdInsRB5Yl0ssXRFe /tymf7QguPMxQ1FSb3J7jYL8xiRSW4GfIw/4g= 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=rzx1SaPgKZwmJIj5i5/zHYwngFLXhRzIJbIls1FX1jo=; b=s1bySJCvvDU15uMhtRBxcZrsWh4sQzlQYQLTWPbjiHGSh97YLca5BX01+wLsV/TKsg 12TUCkC7eVX8RDCbKxv+UuPu4gdsb+tCWiDSDsid/YqB38uzdVRktP02c5HT/7mvMZUm u5JlFEiDQYmXYK/a/yADzKee3/IFx5yRDE0O+FUHi53YjWYmcgMSshWbUj+yft1PWUK2 xgmCHQIcgkDfOxND89lDlI85fzXRCGClIoKmfJVBKfZMp/8ZsjApnQKzfwcxVyduqkAm An8R4g9HGYcEvn109M34RvV9SI4wWXZDmT7DUxf5i5j1PjPIDDA10Tbuzs1JFVIQ9MT7 bs3A== X-Gm-Message-State: APjAAAWBgwutVTZXgLqnUvYD1FtsDmP+0vJrmJY2P5qGxCB6DLQebmeJ wXG+R9O8a205+jUQ1bU/rk6wHD8WxiE= X-Google-Smtp-Source: APXvYqx/wyseSmxrLdWODRqhi7hFQuyuU8YryaMz4Jq3BfeZjeKBWEPl6Tu2npC/JQ/9/MfA0fU3ng== X-Received: by 2002:a5e:d817:: with SMTP id l23mr21054116iok.142.1569854481123; Mon, 30 Sep 2019 07:41:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:34 -0600 Message-Id: <20190930144112.175618-4-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 03/41] common: Drop global inclusion of status_led.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 is only used by a few files so it should not be in the common header. Move it out. Signed-off-by: Simon Glass --- board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c | 1 + board/atmel/at91sam9261ek/led.c | 1 + board/atmel/at91sam9263ek/led.c | 1 + board/atmel/at91sam9m10g45ek/led.c | 1 + board/atmel/at91sam9rlek/led.c | 1 + board/cirrus/edb93xx/edb93xx.c | 1 + board/compulab/cm_t335/cm_t335.c | 1 + board/corscience/tricorder/tricorder.c | 1 + board/mini-box/picosam9g45/led.c | 1 + board/ronetix/pm9261/led.c | 1 + board/ronetix/pm9263/led.c | 1 + board/samtec/vining_fpga/socfpga.c | 1 + board/st/stm32f429-discovery/led.c | 1 + common/board_r.c | 1 + drivers/misc/pca9551_led.c | 1 + drivers/timer/mpc83xx_timer.c | 1 + include/common.h | 4 ---- 17 files changed, 16 insertions(+), 4 deletions(-) diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c index e58bbf07ef1..0eac10d9113 100644 --- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c +++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/atmel/at91sam9261ek/led.c b/board/atmel/at91sam9261ek/led.c index 81967864cf4..a1aab98d587 100644 --- a/board/atmel/at91sam9261ek/led.c +++ b/board/atmel/at91sam9261ek/led.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9263ek/led.c b/board/atmel/at91sam9263ek/led.c index 55fb80dc8d7..849501ec36b 100644 --- a/board/atmel/at91sam9263ek/led.c +++ b/board/atmel/at91sam9263ek/led.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9m10g45ek/led.c b/board/atmel/at91sam9m10g45ek/led.c index feef2308715..f44a09623fa 100644 --- a/board/atmel/at91sam9m10g45ek/led.c +++ b/board/atmel/at91sam9m10g45ek/led.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9rlek/led.c b/board/atmel/at91sam9rlek/led.c index c2df6efd18e..6dd19aea150 100644 --- a/board/atmel/at91sam9rlek/led.c +++ b/board/atmel/at91sam9rlek/led.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c index 8a72fa7a423..88fac76ea52 100644 --- a/board/cirrus/edb93xx/edb93xx.c +++ b/board/cirrus/edb93xx/edb93xx.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c index 6e38745191c..561f2f30bb2 100644 --- a/board/compulab/cm_t335/cm_t335.c +++ b/board/compulab/cm_t335/cm_t335.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c index 27e6066575e..da33f8441ce 100644 --- a/board/corscience/tricorder/tricorder.c +++ b/board/corscience/tricorder/tricorder.c @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include diff --git a/board/mini-box/picosam9g45/led.c b/board/mini-box/picosam9g45/led.c index 2e32b7fb363..8ce8b6bbeac 100644 --- a/board/mini-box/picosam9g45/led.c +++ b/board/mini-box/picosam9g45/led.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/ronetix/pm9261/led.c b/board/ronetix/pm9261/led.c index 2a53b2e6bd2..df955830b1b 100644 --- a/board/ronetix/pm9261/led.c +++ b/board/ronetix/pm9261/led.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/ronetix/pm9263/led.c b/board/ronetix/pm9263/led.c index 683e151a4fe..524b4afcbd2 100644 --- a/board/ronetix/pm9263/led.c +++ b/board/ronetix/pm9263/led.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c index 1e095a4e7db..2d32ad94571 100644 --- a/board/samtec/vining_fpga/socfpga.c +++ b/board/samtec/vining_fpga/socfpga.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/st/stm32f429-discovery/led.c b/board/st/stm32f429-discovery/led.c index ae6df78f56f..539c139bb5d 100644 --- a/board/st/stm32f429-discovery/led.c +++ b/board/st/stm32f429-discovery/led.c @@ -5,6 +5,7 @@ */ #include +#include #include void coloured_LED_init(void) diff --git a/common/board_r.c b/common/board_r.c index d6fb5047a26..646b99ba963 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/misc/pca9551_led.c b/drivers/misc/pca9551_led.c index 2333ec80382..cdc4390f815 100644 --- a/drivers/misc/pca9551_led.c +++ b/drivers/misc/pca9551_led.c @@ -6,6 +6,7 @@ #include #include #include +#include #ifndef CONFIG_PCA9551_I2C_ADDR #error "CONFIG_PCA9551_I2C_ADDR not defined!" diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 9bc32f9b281..dfbc8672b29 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 4b84969ad3d..52bcc2e591e 100644 --- a/include/common.h +++ b/include/common.h @@ -345,10 +345,6 @@ static inline struct in_addr env_get_ip(char *var) return string_to_ip(env_get(var)); } -#ifdef CONFIG_LED_STATUS -# include -#endif - #include #else /* __ASSEMBLY__ */ From patchwork Mon Sep 30 14:40:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169417 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="mfvBYKSO"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlZB6XYwz9s00 for ; Tue, 1 Oct 2019 00:45:38 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9D562C21E07; Mon, 30 Sep 2019 14:44:17 +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 B32F7C21DF9; Mon, 30 Sep 2019 14:41:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EDB93C21DFA; Mon, 30 Sep 2019 14:41:28 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 8B0F4C21C50 for ; Mon, 30 Sep 2019 14:41:23 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id u8so38925086iom.5 for ; Mon, 30 Sep 2019 07:41:23 -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=Qe94wyv4GLiPtTyprD3xXe3xRl03n22HDO8vmQGUi/M=; b=mfvBYKSOR++73VNO7eFMlz5mnys814lU1bSPCIOVXN8Iu+JPAB3qn/xciFbiWBz/yv 9buA6uQUqcBtY4U+UEl3wATy4JX9z+4q9hVwOzRP8IOol4NLLXKzdooIrs0KpZrFFJwA 0I3NlVwuoJmfFHhwfB1zgXcU3elwYNnRdH2Gg= 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=Qe94wyv4GLiPtTyprD3xXe3xRl03n22HDO8vmQGUi/M=; b=c5MN8dWSOxYOP23JPpug5q0w8JBdUOuDYo9l3QBJAC4r9D972lJzrAUpBENSO/EvNt qhZPLaAhfaLqEqn7D6JrMT3oMCe4KHp+mR5f8YGamdPq/Qkklf0p2iG0wV8J7RelTjiW GfANkcJIB5FddCl7iaGtxAyU4ZbTDu6jXlmvNq8S8w74iKuSMauIoZ0RNgxVLFlbZ3xi XAGPhxmYyfjb8LhtH4RaZEz8FBvzwJ5KcCCGqbE0f+kdODK3tPBo/8z85aS/tLE6kZNH pObuYOcSckMafaU6StaYHQHQzJxgN7SA4ivFaV8/+yeSpWQ5ch5GSpSQ7+ZHHsXQwmEQ FpFw== X-Gm-Message-State: APjAAAVVoTL72oIvygXM3e385mQbK/P0VetupQNTf+Kk9XqZitwKM0Vl Y3kd+hTCIc0ma0brY1jegfIQSPdE6wY= X-Google-Smtp-Source: APXvYqzmmQBhxTV7SePQeFKvHTmNz8i0C7NqjODMpl4YgHvm32nflayHU14Uu0gVbtFKufEgq9ybbQ== X-Received: by 2002:a92:98d3:: with SMTP id a80mr21053714ill.167.1569854482319; Mon, 30 Sep 2019 07:41:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:21 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:35 -0600 Message-Id: <20190930144112.175618-5-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 04/41] status_led: Tidy up the code style 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" There are a few whitespace problems with this code. Tidy them up. Signed-off-by: Simon Glass --- arch/powerpc/lib/interrupts.c | 2 +- drivers/misc/status_led.c | 8 ++++---- include/status_led.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index e589933f565..4b7f543a180 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -83,7 +83,7 @@ void timer_interrupt (struct pt_regs *regs) #endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ #ifdef CONFIG_LED_STATUS - status_led_tick (timestamp); + status_led_tick(timestamp); #endif /* CONFIG_LED_STATUS */ } diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c index 8983ab40e46..a6e9c03a02e 100644 --- a/drivers/misc/status_led.c +++ b/drivers/misc/status_led.c @@ -82,13 +82,13 @@ void status_led_init(void) status_led_init_done = 1; } -void status_led_tick (ulong timestamp) +void status_led_tick(ulong timestamp) { led_dev_t *ld; int i; if (!status_led_init_done) - status_led_init (); + status_led_init(); for (i = 0, ld = led_dev; i < MAX_LED_DEV; i++, ld++) { @@ -103,7 +103,7 @@ void status_led_tick (ulong timestamp) } } -void status_led_set (int led, int state) +void status_led_set(int led, int state) { led_dev_t *ld; @@ -111,7 +111,7 @@ void status_led_set (int led, int state) return; if (!status_led_init_done) - status_led_init (); + status_led_init(); ld = &led_dev[led]; diff --git a/include/status_led.h b/include/status_led.h index 5b3570166db..6707ab1d29d 100644 --- a/include/status_led.h +++ b/include/status_led.h @@ -36,8 +36,8 @@ #endif /* CONFIG_LED_STATUS5 */ void status_led_init(void); -void status_led_tick (unsigned long timestamp); -void status_led_set (int led, int state); +void status_led_tick(unsigned long timestamp); +void status_led_set(int led, int state); /***** MVS v1 **********************************************************/ #if (defined(CONFIG_MVS) && CONFIG_MVS < 2) From patchwork Mon Sep 30 14:40:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169416 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="FGpUtbcs"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlZ23CGHz9s00 for ; Tue, 1 Oct 2019 00:45:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 06E34C21DA6; Mon, 30 Sep 2019 14:43:48 +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 349C0C21E36; Mon, 30 Sep 2019 14:41:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 63BB2C21D83; Mon, 30 Sep 2019 14:41:29 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 80957C21DB3 for ; Mon, 30 Sep 2019 14:41:24 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id n26so10432779ioj.8 for ; Mon, 30 Sep 2019 07:41:24 -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=mmtWTrrdeDh53QwGLX8w5ajVrzFpvcAZjgCKk70loS0=; b=FGpUtbcs6TAMN905O4YBEY9YxWjVmdwPQ0Wy78JeaNXC5gTnUxcP9Rh2QXb7x1e/sD OG5VCdUld0sWWDxJ0jEEP/ZRDMZ+iBGOtMFEtd8SsChAikybsMOY1SHPnjyAGSILcwnG y0reA2wlXnBptmqD6M/dDnyD1DT2oG+GRDDZM= 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=mmtWTrrdeDh53QwGLX8w5ajVrzFpvcAZjgCKk70loS0=; b=K35hhLCuyJrFQe3ZYacwOoOkR5Z9Pkmyc5JhP4yBYfUJv6BSiDReZCluveIpREhwSD C875alPEoFbs7sv5IlupMlLH5lCxDnIx9KgjoSuBxlbIwhKQU9JIAf4TuK6V2GLvNSWA Z77ho/b9qtgJkryAkbH4woxFVe9FUXaTT2ucFqF7Y5oVhiKe+SEkxsafgFetKEZmbwAJ Uuf7q0e1vAsh/FgqWc46NiU20k8DgaWa0Cou2y2qu1k/bCvHBYMzvh6n3pUSeXZwCb77 yg4IdVMw21nBQIVkj+Hh6J8RW4Srh82dcfROrNkk4o00eVN+fHBvVa/lHxm4YHWQ1VMc px1g== X-Gm-Message-State: APjAAAXrYL2IgXsLDNzbAe40oAbpfu7R3zl0gqPDc7P29AmQcuWEAtNe gfC71/oLWDUf26znPIjHiqYDToPwZNY= X-Google-Smtp-Source: APXvYqzGmN0ToBS9L2G9vxbWf0rr9xvDs8C9nKlXgx8AKGFleXOXclQPeKodW65XBlCOEhQCCLQqOg== X-Received: by 2002:a92:3546:: with SMTP id c67mr20845704ila.292.1569854483113; Mon, 30 Sep 2019 07:41:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:36 -0600 Message-Id: <20190930144112.175618-6-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 05/41] common: Move random-number functions into their own header 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" Create a new rand.h header file and move functions into it, to reduce the size of common.h Signed-off-by: Simon Glass --- include/common.h | 6 ------ include/net.h | 1 + include/rand.h | 40 ++++++++++++++++++++++++++++++++++++++++ lib/rand.c | 1 + net/link_local.c | 1 + 5 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 include/rand.h diff --git a/include/common.h b/include/common.h index 52bcc2e591e..b09c7aeddd4 100644 --- a/include/common.h +++ b/include/common.h @@ -325,12 +325,6 @@ char * strmhz(char *buf, unsigned long hz); /* lib/crc32.c */ #include -/* lib/rand.c */ -#define RAND_MAX -1U -void srand(unsigned int seed); -unsigned int rand(void); -unsigned int rand_r(unsigned int *seedp); - /* * STDIO based functions (can always be used) */ diff --git a/include/net.h b/include/net.h index 75a16e4c8f8..d8d187d8af9 100644 --- a/include/net.h +++ b/include/net.h @@ -16,6 +16,7 @@ #include /* for nton* / ntoh* stuff */ #include #include +#include #define DEBUG_LL_STATE 0 /* Link local state machine changes */ #define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ diff --git a/include/rand.h b/include/rand.h new file mode 100644 index 00000000000..c9d15f50a13 --- /dev/null +++ b/include/rand.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __RAND_H +#define __RAND_H + +#define RAND_MAX -1U + +/** + * srand() - Set the random-number seed value + * + * This can be used to restart the pseudo-random-number sequence from a known + * point. This affects future calls to rand() to start from that point + * + * @seed: New seed + */ +void srand(unsigned int seed); + +/** + * rand() - Get a 32-bit pseudo-random number + * + * @returns next random number in the sequence + */ +unsigned int rand(void); + +/** + * rand_r() - Get a 32-bit pseudo-random number + * + * This version of the function allows multiple sequences to be used at the + * same time, since it requires the caller to store the seed value. + * + * @seed value to use, updated on exit + * @returns next random number in the sequence + */ +unsigned int rand_r(unsigned int *seedp); + +#endif diff --git a/lib/rand.c b/lib/rand.c index af4cf3a0e8c..d256baf5cee 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -8,6 +8,7 @@ */ #include +#include static unsigned int y = 1U; diff --git a/net/link_local.c b/net/link_local.c index dd9fcad0874..1986b9b9d3b 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "arp.h" #include "net_rand.h" From patchwork Mon Sep 30 14:40:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169415 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="DLqITdFP"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlXM73Dwz9s00 for ; Tue, 1 Oct 2019 00:44:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 90A5FC21E52; Mon, 30 Sep 2019 14:43:22 +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 AE433C21E30; Mon, 30 Sep 2019 14:41:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 48813C21DA6; Mon, 30 Sep 2019 14:41:30 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 307E4C21C6A for ; Mon, 30 Sep 2019 14:41:25 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id b136so38937719iof.3 for ; Mon, 30 Sep 2019 07:41:25 -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=Y2iVtBI94xnsa8Gi0H04MpYvWERiXcR0jbBPfKzC7ZU=; b=DLqITdFP493c5YteS0PRdI8Lr4d0ahKduoyM52ugb3rYTOHVDla8AXJwVuOlKlkJfu gpNNY8FOiHlzjPNm7ygqdEfb0Wsd+iU90d/Yd5plvG/BvOCpeZsQZpqbCZjR+l+yGHFh gEg/jw8aaroHnZ3EJmiY/949x4HazABamVsYg= 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=Y2iVtBI94xnsa8Gi0H04MpYvWERiXcR0jbBPfKzC7ZU=; b=XFFrF+Fi20oTEpmMlloPwMyLMi1+POtS5jYah4CLsAZ+JWFOYQvuw0CGOTXBJP8gxw Kg8mHb8LiHTukfXBcwRoNAIwc7mCsGSqlAGvfJZKYgVQg/Qb0a27XEq6op1MAk1eWhlS khjJUqASWej6qhqlfvvaRLLu/NDAj3EhJ+lU47Y5R/8DyXCbypIkxa62Kg5n6BjxW7y0 OGH98XQUrTMTwOIUxnfv9DyxCpegZyncRNoyafJoNz2aM48xdghLPOPQcgNmECskc/gV z+B12K7hwHFjYK8Ned/k6Di7gyoYaTYfl8dXKx3Z7AnZmL9kja8eZ/N91infhRD1ZPC+ WP4g== X-Gm-Message-State: APjAAAXW0nuUJIooUtS59PdRoHmQxqOF7VZ4q6fNhjY4YmywIHH2z9pD c728BNMpiAjXMxMa2ipJ+Ni9UTgtZbA= X-Google-Smtp-Source: APXvYqyD3TuXi+cWY/pn95Ur2ZHah2BfVCCxWdW6BLjyduZTwfRpagbDl7BbbLoIwrI0njWqaa2JGA== X-Received: by 2002:a6b:e50b:: with SMTP id y11mr15487339ioc.161.1569854483948; Mon, 30 Sep 2019 07:41:23 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:23 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:37 -0600 Message-Id: <20190930144112.175618-7-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 06/41] common: Drop linux/crc8.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" We have an existing U-Boot header for the one function that this defines. Use that instead of the linux/ one. Move over the nice comment. Signed-off-by: Simon Glass --- board/theadorable/theadorable.c | 2 +- drivers/tpm/tpm2_tis_sandbox.c | 2 +- drivers/tpm/tpm_tis_sandbox.c | 2 +- include/linux/crc8.h | 23 ----------------------- include/u-boot/crc.h | 14 +++++++++++++- lib/crc8.c | 7 ++++++- 6 files changed, 22 insertions(+), 28 deletions(-) delete mode 100644 include/linux/crc8.h diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c index d42350319cc..2958d5ff882 100644 --- a/board/theadorable/theadorable.c +++ b/board/theadorable/theadorable.c @@ -14,11 +14,11 @@ #include #include #include -#include #include #ifdef CONFIG_NET #include #endif +#include #include "theadorable.h" #include "../drivers/ddr/marvell/axp/ddr3_hw_training.h" diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c index f282ea6adf9..522988795c0 100644 --- a/drivers/tpm/tpm2_tis_sandbox.c +++ b/drivers/tpm/tpm2_tis_sandbox.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include /* Hierarchies */ enum tpm2_hierarchy { diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c index 3336f559e57..2dff0d3eee9 100644 --- a/drivers/tpm/tpm_tis_sandbox.c +++ b/drivers/tpm/tpm_tis_sandbox.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include /* TPM NVRAM location indices. */ #define FIRMWARE_NV_INDEX 0x1007 diff --git a/include/linux/crc8.h b/include/linux/crc8.h deleted file mode 100644 index 0ab5b9ab219..00000000000 --- a/include/linux/crc8.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (c) 2013 Google, Inc - */ - - -#ifndef __linux_crc8_h -#define __linux_crc8_h - -/** - * crc8() - Calculate and return CRC-8 of the data - * - * This uses an x^8 + x^2 + x + 1 polynomial. A table-based algorithm would - * be faster, but for only a few bytes it isn't worth the code size - * - * @crc_start: CRC8 start value - * @vptr: Buffer to checksum - * @len: Length of buffer in bytes - * @return CRC8 checksum - */ -unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len); - -#endif diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h index 788ef29a17b..b42bcda2b31 100644 --- a/include/u-boot/crc.h +++ b/include/u-boot/crc.h @@ -8,7 +8,19 @@ #ifndef _UBOOT_CRC_H #define _UBOOT_CRC_H -/* lib/crc8.c */ +/** + * crc8() - Calculate and return CRC-8 of the data + * + * This uses an x^8 + x^2 + x + 1 polynomial. A table-based algorithm would + * be faster, but for only a few bytes it isn't worth the code size + * + * lib/crc8.c + * + * @crc_start: CRC8 start value + * @vptr: Buffer to checksum + * @len: Length of buffer in bytes + * @return CRC8 checksum + */ unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len); /* lib/crc16.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ diff --git a/lib/crc8.c b/lib/crc8.c index 55f7c07285c..87b87b675b2 100644 --- a/lib/crc8.c +++ b/lib/crc8.c @@ -3,7 +3,12 @@ * Copyright (c) 2013 Google, Inc */ -#include "linux/crc8.h" +#ifdef USE_HOSTCC +#include +#else +#include +#endif +#include #define POLY (0x1070U << 3) From patchwork Mon Sep 30 14:40:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169435 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="ClrbbXhV"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlqL4XxYz9s7T for ; Tue, 1 Oct 2019 00:57:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 20D3AC21DAF; Mon, 30 Sep 2019 14:47:29 +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 64079C21EBE; Mon, 30 Sep 2019 14:42:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5724AC21E26; Mon, 30 Sep 2019 14:41:31 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 16C44C21C57 for ; Mon, 30 Sep 2019 14:41:26 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id v2so38840155iob.10 for ; Mon, 30 Sep 2019 07:41:26 -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=T6lkxNYE4o32yCntzf5gQFZutOrEh4/cNulNS2vZEmE=; b=ClrbbXhVdx1KxiXKDfvOvHl6RDxFJwIpplRDM3Yg5BvFhJ0Lib9z7K+hCYACisBUQy diQPtmd0HSMFRnA0+wxWwfPva5hIBLIIYQ5QHpdlf1aWVxFwV6CBXs5VujwGfpQFoeg0 fap8ZadrW607Hry2pAlRyq+tkaTS20NFGPEXc= 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=T6lkxNYE4o32yCntzf5gQFZutOrEh4/cNulNS2vZEmE=; b=NBkkVvxhr9+tG1xmRMdYx4mK3k0BjCdDuJoNEq1EGJI65XAiaxMSF6IsT9/JjMrwQD c9vr5XCfzvENtb93VQSRPh+dtSG5GZxL2+kCcrTYSWe3wBfcDUt/R+0BVUQEYpAXzrhq kcnu9ySKHaJr53r+ILI8AMftxhQ1zEV7jzHzVaeJ3Q4GqWmRBtcxdRY6bWqMTLu4isIW euYiQfTrcvY3tvkH1SH1UKt1WJieDzeKNKjBmalNXCUlAm0R+xTIosHIxlFpszyPhTIZ zVrpCthGyIuu4xAQeSh5Zchi/aHRMEyljIadgMiTL/hhdfhjb46ykXM2BsAdQ6TuNgCv wXEA== X-Gm-Message-State: APjAAAXkA5gmTpTXe8EOrEmEvdkganbtp7WFuRqfIyK0gjBctRfL3I5Z Dwvc7ttMbN0HbBOHC+HhLTHpOtW+u84= X-Google-Smtp-Source: APXvYqzIR2V8szrS2wPJLhpoeEvGhskqPNtkHlw2fuh3+TohcKD3IJM+6zzTaTWS5PCpodZDP5myeQ== X-Received: by 2002:a92:48c7:: with SMTP id j68mr20847181ilg.262.1569854484704; Mon, 30 Sep 2019 07:41:24 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:24 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:38 -0600 Message-Id: <20190930144112.175618-8-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 07/41] crc: Fix code style with crc functions 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" Some of these have a space before the bracket. Drop it to fix the style. Add some missing function comments while here. Note that u32 and u8 cannot be used here since crc.h is included on the host side. Signed-off-by: Simon Glass --- cmd/i2c.c | 2 +- include/u-boot/crc.h | 75 +++++++++++++++++++++++++++++++++++++++----- lib/crc32.c | 4 +-- tools/envcrc.c | 4 +-- 4 files changed, 73 insertions(+), 12 deletions(-) diff --git a/cmd/i2c.c b/cmd/i2c.c index e0f8ece597c..038f97c261b 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -768,7 +768,7 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] #endif if (ret) err++; - crc = crc32 (crc, &byte, 1); + crc = crc32(crc, &byte, 1); addr++; } if (err > 0) diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h index b42bcda2b31..1086d2168ce 100644 --- a/include/u-boot/crc.h +++ b/include/u-boot/crc.h @@ -38,9 +38,47 @@ void crc16_ccitt_wd_buf(const uint8_t *in, uint len, uint8_t *out, uint chunk_sz); /* lib/crc32.c */ -uint32_t crc32 (uint32_t, const unsigned char *, uint); -uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint); -uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint); + +/** + * crc32 - Calculate the CRC32 for a block of data + * + * @crc: Input crc to chain from a previous calculution (use 0 to start a new + * calculation) + * @buf: Bytes to checksum + * @len: Number of bytes to checksum + * @return checksum value + */ +uint32_t crc32(uint32_t crc, const unsigned char *buf, uint len); + +/** + * crc32_wd - Calculate the CRC32 for a block of data (watchdog version) + * + * This checksums the data @chunk_sz bytes at a time, calling WATCHDOG_RESET() + * after each chunk, to prevent the watchdog from firing. + * + * @crc: Input crc to chain from a previous calculution (use 0 to start a new + * calculation) + * @buf: Bytes to checksum + * @len: Number of bytes to checksum + * @chunk_sz: Chunk size to use between watchdog resets + * @return checksum + */ +uint32_t crc32_wd(uint32_t crc, const unsigned char *buf, uint len, + uint chunk_sz); + +/** + * crc32_no_comp - Calculate the CRC32 for a block of data (no one's compliment) + * + * This version uses a different algorithm which doesn't use one's compliment. + * JFFS2 (and other things?) use this. + * + * @crc: Input crc to chain from a previous calculution (use 0 to start a new + * calculation) + * @buf: Bytes to checksum + * @len: Number of bytes to checksum + * @return checksum value + */ +uint32_t crc32_no_comp(uint32_t crc, const unsigned char *buf, uint len); /** * crc32_wd_buf - Perform CRC32 on a buffer and return result in buffer @@ -50,11 +88,34 @@ uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint); * @output: Place to put checksum result (4 bytes) * @chunk_sz: Trigger watchdog after processing this many bytes */ -void crc32_wd_buf(const unsigned char *input, uint ilen, - unsigned char *output, uint chunk_sz); +void crc32_wd_buf(const uint8_t *input, uint ilen, uint8_t *output, + uint chunk_sz); /* lib/crc32c.c */ -void crc32c_init(uint32_t *, uint32_t); -uint32_t crc32c_cal(uint32_t, const char *, int, uint32_t *); + +/** + * crc32c_init() - Set up a the CRC32 table + * + * This sets up 256-item table to aid in CRC32 calculation + * + * @crc32c_table: Place to put table + * @pol: polynomial to use + */ +void crc32c_init(uint32_t *crc32c_table, uint32_t pol); + +/** + * crc32c_cal() - Perform CRC32 on a buffer given a table + * + * This algorithm uses the table (set up by crc32c_init() to speed up + * processing. + * + * @crc: Previous crc (use 0 at start) + * @data: Data bytes to checksum + * @length: Number of bytes to process + * @crc32c_table:: CRC table + * @return checksum value + */ +uint32_t crc32c_cal(uint32_t crc, const char *data, int length, + uint32_t *crc32c_table); #endif /* _UBOOT_CRC_H */ diff --git a/lib/crc32.c b/lib/crc32.c index eee21f8d739..dc7e183f181 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -244,12 +244,12 @@ uint32_t crc32_wd(uint32_t crc, const unsigned char *buf, uInt len, chunk = end - curr; if (chunk > chunk_sz) chunk = chunk_sz; - crc = crc32 (crc, curr, chunk); + crc = crc32(crc, curr, chunk); curr += chunk; WATCHDOG_RESET (); } #else - crc = crc32 (crc, buf, len); + crc = crc32(crc, buf, len); #endif return crc; diff --git a/tools/envcrc.c b/tools/envcrc.c index 672ef4d675e..09b49b49f9d 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -64,7 +64,7 @@ extern unsigned int env_size; extern env_t embedded_environment; #endif /* CONFIG_BUILD_ENVCRC */ -extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); +extern uint32_t crc32(uint32_t, const unsigned char *, unsigned int); int main (int argc, char **argv) { @@ -94,7 +94,7 @@ int main (int argc, char **argv) memset(dataptr + eoe, pad, datasize - eoe); } - crc = crc32 (0, dataptr, datasize); + crc = crc32(0, dataptr, datasize); /* Check if verbose mode is activated passing a parameter to the program */ if (argc > 1) { From patchwork Mon Sep 30 14:40:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169425 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="A5INwV/P"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hldg74zCz9s00 for ; Tue, 1 Oct 2019 00:48:39 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 90117C21C51; Mon, 30 Sep 2019 14:46:30 +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 C2834C21E49; Mon, 30 Sep 2019 14:41:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A71D7C21EA7; Mon, 30 Sep 2019 14:41:32 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id BE16AC21E1A for ; Mon, 30 Sep 2019 14:41:27 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id c25so38867286iot.12 for ; Mon, 30 Sep 2019 07:41:27 -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=DNh9gubcyy4UFPXcOgbHLXYulNJIfhWvW6k0+sqyLWE=; b=A5INwV/PcxFmb4SqbPe5NxGf6F6NrIVhvF9n9uqoHpLP/4d/OOwEtzU/IJ6+I2tJgK WLayaOiBhlgS98YuAax9eObuBrn9ZrDMMEM9pV+p/iCJm0/GFEg1jx0XAT9C26bz6+uy PjKIWv6n2p1il8oVM6a1Wg2fkaqrvjZQiTnYo= 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=DNh9gubcyy4UFPXcOgbHLXYulNJIfhWvW6k0+sqyLWE=; b=kEzgbmhnj4Q1VOCAXAsevmgzX/qBxExdcOLi9NFRZMVkriZun3Dt4QBdKmPQNqcJz4 /3+7PbtcwEymF23Mvv5j1UiNLK21zcibouDf0mbTaplfWM4/7vArN4S0WJw9XhmtqXVp QfJb1uw55tn6nG4mcw5ZsLxfR4PdssmAnWO+Z9SGBOXXxzrUkwglXZr8x8Tls844upZ/ D+BXB9eYYxmyihzZcvskgQcNjIiFE++tfcQu6+x5uItx+tBM7u73s1roP6dlJP1q7e4f plii3W+Fx4gmJKU1teCihLbGAB21nFoyGQKEOTh6yCQJB7igvJO5Tts3XJnokRl9xRIO quNQ== X-Gm-Message-State: APjAAAW1XrFeS/dQaxmCZgitxfpiG92Ie4GyoFWLUwEyjliMozEDNk4b AdPLhi51nR/zbpIafnMEN4xZqC0xOEk= X-Google-Smtp-Source: APXvYqwFGU1NcPw/DVVo1AnzgMCoJAbDHijuAwyj3qL9ydpvojMJu7mBenrqTLGpFFR0uqr1juY0Hg== X-Received: by 2002:a92:2c0c:: with SMTP id t12mr19487306ile.67.1569854485659; Mon, 30 Sep 2019 07:41:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:39 -0600 Message-Id: <20190930144112.175618-9-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 08/41] crc32: Use the crc.h header for crc functions 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" Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass --- api/api.c | 1 + arch/arm/mach-meson/board-common.c | 1 + board/CZ.NIC/turris_omnia/turris_omnia.c | 1 + board/corscience/tricorder/tricorder-eeprom.c | 1 + board/freescale/common/sys_eeprom.c | 1 + board/freescale/mpc8323erdb/mpc8323erdb.c | 1 + board/gardena/smart-gateway-mt7688/board.c | 1 + board/gdsys/a38x/hre.c | 1 + board/gdsys/p1022/controlcenterd-id.c | 1 + board/sunxi/board.c | 1 + board/theobroma-systems/puma_rk3399/puma-rk3399.c | 1 + board/varisys/common/sys_eeprom.c | 1 + cmd/i2c.c | 1 + cmd/nvedit.c | 1 + common/android_ab.c | 1 + common/bloblist.c | 1 + common/board_r.c | 1 + common/hash.c | 1 + common/image-fit.c | 1 + common/image.c | 1 + common/iotrace.c | 1 + common/spl/spl.c | 1 + disk/part_efi.c | 1 + drivers/misc/atsha204a-i2c.c | 1 + drivers/mtd/ubi/attach.c | 1 + drivers/mtd/ubi/crc32.c | 1 + drivers/mtd/ubi/eba.c | 1 + drivers/mtd/ubi/fastmap.c | 1 + drivers/mtd/ubi/io.c | 1 + drivers/mtd/ubi/vtbl.c | 1 + drivers/mtd/ubispl/ubispl.c | 1 + drivers/net/fm/fdt.c | 1 + drivers/net/fm/fm.c | 1 + drivers/qe/qe.c | 1 + env/common.c | 1 + env/eeprom.c | 1 + env/flash.c | 1 + env/nand.c | 1 + env/nvram.c | 1 + env/remote.c | 1 + env/sf.c | 1 + examples/api/glue.c | 1 + fs/jffs2/jffs2_1pass.c | 1 + fs/ubifs/io.c | 1 + fs/ubifs/recovery.c | 1 + fs/ubifs/tnc.c | 1 + include/common.h | 3 --- lib/crc32.c | 1 + lib/efi_loader/efi_boottime.c | 1 + lib/efi_loader/efi_runtime.c | 1 + lib/efi_loader/efi_variable.c | 1 + lib/efi_selftest/efi_selftest_config_table.c | 1 + lib/efi_selftest/efi_selftest_crc32.c | 1 + lib/gunzip.c | 1 + lib/zlib/deflate.c | 1 + tools/default_image.c | 1 + tools/env/fw_env.c | 1 + tools/env/fw_env.h | 2 -- tools/envcrc.c | 1 + tools/mkenvimage.c | 1 + tools/mxsimage.c | 1 + tools/pbl_crc32.c | 1 + tools/pblimage.c | 1 + tools/socfpgaimage.c | 1 + 64 files changed, 62 insertions(+), 5 deletions(-) diff --git a/api/api.c b/api/api.c index bc9454eb4b6..278b1ed4a34 100644 --- a/api/api.c +++ b/api/api.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "api_private.h" diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index d261b4ea331..6c77e379669 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -13,6 +13,7 @@ #include #include #include +#include #if CONFIG_IS_ENABLED(FASTBOOT) #include diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 1d8d08a847d..4d21e62e733 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -18,6 +18,7 @@ #include #include #include +#include # include #include "../drivers/ddr/marvell/a38x/ddr3_init.h" diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c index 16bceea7ba7..b28189dafdc 100644 --- a/board/corscience/tricorder/tricorder-eeprom.c +++ b/board/corscience/tricorder/tricorder-eeprom.c @@ -6,6 +6,7 @@ */ #include #include +#include #include "tricorder-eeprom.h" diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index bb655ca7447..6f151b0f717 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -11,6 +11,7 @@ #include #include #include +#include #ifdef CONFIG_SYS_I2C_EEPROM_CCID #include "../common/eeprom.h" diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index e5aecc4e1f2..003e95cb6ba 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -17,6 +17,7 @@ #include #include #include +#include #if defined(CONFIG_PCI) #include #endif diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index bd494c84fc8..1a598395699 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gdsys/a38x/hre.c b/board/gdsys/a38x/hre.c index 82b84284ef1..027ad1f57e0 100644 --- a/board/gdsys/a38x/hre.c +++ b/board/gdsys/a38x/hre.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 43f5404231f..d6798bd3382 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sunxi/board.c b/board/sunxi/board.c index e3b2d13892c..b9450a0e36b 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -24,6 +24,7 @@ #include #include #include +#include #ifndef CONFIG_ARM64 #include #endif diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 47259b71496..9887d202071 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c index 77772a6923e..4c025087db0 100644 --- a/board/varisys/common/sys_eeprom.c +++ b/board/varisys/common/sys_eeprom.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "eeprom.h" diff --git a/cmd/i2c.c b/cmd/i2c.c index 038f97c261b..43a76299b3c 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -76,6 +76,7 @@ #include #include #include +#include /* Display values from last command. * Memory modify remembered values are different from display memory. diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 1cb0bc1460b..8a533173c07 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/common/android_ab.c b/common/android_ab.c index 05ffc6f4e50..6c4df419b29 100644 --- a/common/android_ab.c +++ b/common/android_ab.c @@ -8,6 +8,7 @@ #include #include #include +#include /** * Compute the CRC-32 of the bootloader control struct. diff --git a/common/bloblist.c b/common/bloblist.c index b4cf169b05a..ccf5e4b6f64 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -9,6 +9,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/board_r.c b/common/board_r.c index 646b99ba963..3b98fac4af4 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -11,6 +11,7 @@ #include #include +#include /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG) #include diff --git a/common/hash.c b/common/hash.c index d33e329897e..a5289157474 100644 --- a/common/hash.c +++ b/common/hash.c @@ -18,6 +18,7 @@ #include #include #include +#include #else #include "mkimage.h" #include diff --git a/common/image-fit.c b/common/image-fit.c index 5c63c769de2..c52f9451208 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -11,6 +11,7 @@ #ifdef USE_HOSTCC #include "mkimage.h" #include +#include #else #include #include diff --git a/common/image.c b/common/image.c index 179eef0bd2d..dc16f4429f8 100644 --- a/common/image.c +++ b/common/image.c @@ -9,6 +9,7 @@ #ifndef USE_HOSTCC #include #include +#include #include #ifdef CONFIG_SHOW_BOOT_PROGRESS diff --git a/common/iotrace.c b/common/iotrace.c index 49bee3c92a0..deb0b358ce3 100644 --- a/common/iotrace.c +++ b/common/iotrace.c @@ -8,6 +8,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/spl/spl.c b/common/spl/spl.c index 082fa2bd94d..7a443a0f322 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/disk/part_efi.c b/disk/part_efi.c index 51fa4a74ab2..b2e157d9c1e 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -19,6 +19,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index 934ba5e6b80..116c0661e75 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -15,6 +15,7 @@ #include #include #include +#include #define ATSHA204A_TWLO 60 #define ATSHA204A_TRANSACTION_TIMEOUT 100000 diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index b4ba339c804..19defd88318 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -74,6 +74,7 @@ #include #include #include +#include #else #include #include diff --git a/drivers/mtd/ubi/crc32.c b/drivers/mtd/ubi/crc32.c index 9c54ea4db0c..9ce061c8613 100644 --- a/drivers/mtd/ubi/crc32.c +++ b/drivers/mtd/ubi/crc32.c @@ -25,6 +25,7 @@ #include #include #include +#include #endif #include diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 809782b3726..0c8b998e7e1 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -31,6 +31,7 @@ #ifndef __UBOOT__ #include #include +#include #else #include #endif diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 14368f9738c..646c778e87c 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -8,6 +8,7 @@ #ifndef __UBOOT__ #include +#include #else #include #include diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 688fb509d2c..608dede4925 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -77,6 +77,7 @@ #include #include #include +#include #else #include #include diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index fe96d3a894d..d18cc1b84f3 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -50,6 +50,7 @@ #include #include #include +#include #else #include #endif diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c index 3f3b9b43675..00102fcf748 100644 --- a/drivers/mtd/ubispl/ubispl.c +++ b/drivers/mtd/ubispl/ubispl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c index 72d12947514..a6b0d87415f 100644 --- a/drivers/net/fm/fdt.c +++ b/drivers/net/fm/fdt.c @@ -5,6 +5,7 @@ #include #include #include /* For struct qe_firmware */ +#include #ifdef CONFIG_SYS_DPAA_FMAN /** diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index 4c9dce8dc57..926cf81a07f 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "fm.h" #include /* For struct qe_firmware */ diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 6e4d732a07a..24549ece653 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -14,6 +14,7 @@ #include #include #include +#include #ifdef CONFIG_ARCH_LS1021A #include diff --git a/env/common.c b/env/common.c index 3fb60509dd8..a23732bfd8b 100644 --- a/env/common.c +++ b/env/common.c @@ -15,6 +15,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/env/eeprom.c b/env/eeprom.c index cb04d2ac884..f0bdf2a1416 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -12,6 +12,7 @@ #include #include #include +#include #if defined(CONFIG_I2C_ENV_EEPROM_BUS) #include #endif diff --git a/env/flash.c b/env/flash.c index 231a5fdf24d..97e00245721 100644 --- a/env/flash.c +++ b/env/flash.c @@ -17,6 +17,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/env/nand.c b/env/nand.c index 9f3dc635cf1..4dce234c22d 100644 --- a/env/nand.c +++ b/env/nand.c @@ -23,6 +23,7 @@ #include #include #include +#include #if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_NAND) && \ !defined(CONFIG_SPL_BUILD) diff --git a/env/nvram.c b/env/nvram.c index 79201bd788b..a78db216236 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -30,6 +30,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/env/remote.c b/env/remote.c index 02531f427ba..7cdc61a5140 100644 --- a/env/remote.c +++ b/env/remote.c @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef ENV_IS_EMBEDDED env_t *env_ptr = &environment; diff --git a/env/sf.c b/env/sf.c index 590d0cedd85..5b55ee51adc 100644 --- a/env/sf.c +++ b/env/sf.c @@ -18,6 +18,7 @@ #include #include #include +#include #ifndef CONFIG_SPL_BUILD #define CMD_SAVEENV diff --git a/examples/api/glue.c b/examples/api/glue.c index 4086616a94b..91d13157a1e 100644 --- a/examples/api/glue.c +++ b/examples/api/glue.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "glue.h" diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 6bf19439582..5912cde8384 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -118,6 +118,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 8d7f8feebb5..7fe94e1093a 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -61,6 +61,7 @@ #ifndef __UBOOT__ #include #include +#include #else #include #include diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 621804c6fd2..b568012fec3 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -38,6 +38,7 @@ #ifndef __UBOOT__ #include #include +#include #else #include #endif diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 86774f8fa27..8afc08ad7d7 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -21,6 +21,7 @@ #ifndef __UBOOT__ #include #include +#include #else #include #include diff --git a/include/common.h b/include/common.h index b09c7aeddd4..9c454fb1c83 100644 --- a/include/common.h +++ b/include/common.h @@ -322,9 +322,6 @@ int strcmp_compar(const void *, const void *); /* lib/strmhz.c */ char * strmhz(char *buf, unsigned long hz); -/* lib/crc32.c */ -#include - /* * STDIO based functions (can always be used) */ diff --git a/lib/crc32.c b/lib/crc32.c index dc7e183f181..e9be3bf386e 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -10,6 +10,7 @@ #ifdef USE_HOSTCC #include +#include #else #include #include diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 493d906c641..ea52b9539d5 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -13,6 +13,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index ced00516f73..72555f07fc1 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -11,6 +11,7 @@ #include #include #include +#include /* For manual relocation support */ DECLARE_GLOBAL_DATA_PTR; diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 4c554c546b2..8a22d9e8c34 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #define READ_ONLY BIT(31) diff --git a/lib/efi_selftest/efi_selftest_config_table.c b/lib/efi_selftest/efi_selftest_config_table.c index 4467f492ac5..2bf12b5bb68 100644 --- a/lib/efi_selftest/efi_selftest_config_table.c +++ b/lib/efi_selftest/efi_selftest_config_table.c @@ -9,6 +9,7 @@ */ #include +#include static const struct efi_system_table *sys_table; static struct efi_boot_services *boottime; diff --git a/lib/efi_selftest/efi_selftest_crc32.c b/lib/efi_selftest/efi_selftest_crc32.c index 4881e8ac6f2..19153c759aa 100644 --- a/lib/efi_selftest/efi_selftest_crc32.c +++ b/lib/efi_selftest/efi_selftest_crc32.c @@ -10,6 +10,7 @@ */ #include +#include const struct efi_system_table *st; efi_status_t (EFIAPI *bs_crc32)(const void *data, efi_uintn_t data_size, diff --git a/lib/gunzip.c b/lib/gunzip.c index 1d65616c13d..9e6ccd692a3 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/lib/zlib/deflate.c b/lib/zlib/deflate.c index 9a20b703448..1fe58d5da6c 100644 --- a/lib/zlib/deflate.c +++ b/lib/zlib/deflate.c @@ -50,6 +50,7 @@ /* @(#) $Id$ */ #include "deflate.h" +#include const char deflate_copyright[] = " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; diff --git a/tools/default_image.c b/tools/default_image.c index 4b7d1ed4a1a..6ac0714435e 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -15,6 +15,7 @@ #include "imagetool.h" #include "mkimage.h" +#include #include #include diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index e2801f595f6..30b5a190ab9 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 3d2b457b31f..b60fbfc8f8d 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -160,5 +160,3 @@ int fw_env_close(struct env_opts *opts); * version string of the library */ char *fw_env_version(void); - -unsigned long crc32(unsigned long, const unsigned char *, unsigned); diff --git a/tools/envcrc.c b/tools/envcrc.c index 09b49b49f9d..037b6e8bec9 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index a8eebab6c33..b05f83415f0 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 0bb5c6aa6b9..002f4b525aa 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/tools/pbl_crc32.c b/tools/pbl_crc32.c index 06da1d92ffd..9b1ca55348b 100644 --- a/tools/pbl_crc32.c +++ b/tools/pbl_crc32.c @@ -5,6 +5,7 @@ * Cleaned up and refactored by Charles Manning. */ #include "pblimage.h" +#include static uint32_t crc_table[256]; static int crc_table_valid; diff --git a/tools/pblimage.c b/tools/pblimage.c index d11f9afe245..3c823e96cf1 100644 --- a/tools/pblimage.c +++ b/tools/pblimage.c @@ -6,6 +6,7 @@ #include #include "pblimage.h" #include "pbl_crc32.h" +#include #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define PBL_ACS_CONT_CMD 0x81000000 diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c index 72d8b96f541..8fa098338b2 100644 --- a/tools/socfpgaimage.c +++ b/tools/socfpgaimage.c @@ -55,6 +55,7 @@ #include "pbl_crc32.h" #include "imagetool.h" #include "mkimage.h" +#include #include From patchwork Mon Sep 30 14:40:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169446 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="FxvnafN7"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hltX3Vjgz9s7T for ; Tue, 1 Oct 2019 00:59:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 27BDCC21E73; Mon, 30 Sep 2019 14:45:35 +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 71E5AC21E3A; Mon, 30 Sep 2019 14:41:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0B7A6C21E42; Mon, 30 Sep 2019 14:41:31 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 82456C21E08 for ; Mon, 30 Sep 2019 14:41:27 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id n197so38885671iod.9 for ; Mon, 30 Sep 2019 07:41:27 -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=cNKd/t4z8o5nxwBrM81d9dUEKocazY1k3lhPEkOx8Fw=; b=FxvnafN7uOvz873zqNoUaMxkOvSQse50UukzGxqWyVW01NjMBLqDsvsf/9RfWosJUp WTvVrhIYCU1IeZyDpa1r2D0ueFFEfDbKk0skAkmgpawvylN/U0Y0Szs9SDGkV0r15KJF jVQdpXZi1k6KzNouQuiDOuIadInxDi6FwLisU= 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=cNKd/t4z8o5nxwBrM81d9dUEKocazY1k3lhPEkOx8Fw=; b=k+PUvuBVMUDzL42PuJBEIUWirnqoVTUATWQplqJt1D624LLsuQioaEQPIO1TYAUxDY OnQ4NGJVOvqjpbHZ3VZFD4lSYLW2DsDTLUC0rwRnA3bffqi6aycvdGth7IYCijQyhVal 5w+D8YziKf9bYYlKawzVnkeoolWQWx6dv+v0QM7l4r0lAJqu9jI/bmnnVnfYlzMm40MG zNS6PGo13e4114ci2F+qVO9V/mLGlL6XTJRVkC0Ozvvf2xBZvmSrP4q9dNjWDXmgASdo Sdu1ra46SaMCOYcem5ZxA0lnyd5OstbRyta8tr897LdcJPV1iAYcLJjEwc8TVm82S+O7 6bsQ== X-Gm-Message-State: APjAAAVjgYoeL0t07jzKgj3frLcxBobAL3PsjymXDKQUQCrY/6qpN1gw vsYGJHwOdA2Rf179QkjfQt+WWXrZwqU= X-Google-Smtp-Source: APXvYqxCGUG3rO6Zl89VC8eHk0xn99vrmegMrUOZ/tDukbLMvlO21kAuO1cXEkDqBF3BLpnwSI9GqA== X-Received: by 2002:a02:1ac5:: with SMTP id 188mr19305777jai.71.1569854486329; Mon, 30 Sep 2019 07:41:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:40 -0600 Message-Id: <20190930144112.175618-10-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 09/41] spl: bootcount: Move code out of header file 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" It is not good practice to write code in a header file. If it is included multiple times then the code can cause duplicate functions. Move the bootcount_store() and bootcount_load() functions into SPL. Note: bootcount is a bit strange in that it uses driver model but does not define proper drivers. This should be fixed. Signed-off-by: Simon Glass --- common/spl/spl.c | 11 +++++++++++ include/bootcount.h | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 7a443a0f322..6e3d4bd599d 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -790,3 +790,14 @@ ulong spl_relocate_stack_gd(void) return 0; #endif } + +#if defined(CONFIG_BOOTCOUNT_LIMIT) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT) +void bootcount_store(ulong a) +{ +} + +ulong bootcount_load(void) +{ + return 0; +} +#endif diff --git a/include/bootcount.h b/include/bootcount.h index 8fa8cf82181..a26a3852338 100644 --- a/include/bootcount.h +++ b/include/bootcount.h @@ -127,10 +127,6 @@ static inline void bootcount_inc(void) #endif /* !CONFIG_SPL_BUILD */ } -#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT) -void bootcount_store(ulong a) {}; -ulong bootcount_load(void) { return 0; } -#endif /* CONFIG_SPL_BUILD && !CONFIG_SPL_BOOTCOUNT_LIMIT */ #else static inline int bootcount_error(void) { return 0; } static inline void bootcount_inc(void) {} From patchwork Mon Sep 30 14:40:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169421 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="oatuuXDS"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlcb4DXMz9s00 for ; Tue, 1 Oct 2019 00:47:43 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 33DA7C21DE8; Mon, 30 Sep 2019 14:46:00 +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 A2A04C21E1A; Mon, 30 Sep 2019 14:41:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A13B9C21DC1; Mon, 30 Sep 2019 14:41:32 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 6B32FC21DF9 for ; Mon, 30 Sep 2019 14:41:28 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id a1so38963417ioc.6 for ; Mon, 30 Sep 2019 07:41:28 -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=dMwwuwHraLiGlUS6Hi2MGU9TqkxztxadMTCav/cuYsY=; b=oatuuXDStGXp5whGEEmCFfS9RGu4JCvRH8TKX8dKTdlJHNXOsNsxw8LTyspodHuJ5e ebPkC7V1KwkC44n8/Lk8Ykm1i5p7W3BsOuuT+qADS+WwQAovMfV9YnnPeU8Lwdo3cLfI JoOHfU1zVL857CvX5Oias7OlgjXM9z1JTg3N0= 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=dMwwuwHraLiGlUS6Hi2MGU9TqkxztxadMTCav/cuYsY=; b=BTjV+2MTUgrzIa/DlhymrnLy/aOIIRwJEm73Ej+B4zNY2zNAqZN+f8rTUvxuTRTgIa 5FgF9Hx4eif6cJXBs7bcARUBkTI7AB1oryFqzy/DDKMG3zX3GNH2e7SPksqL73p0zPsX Vcq13M0zs9QAgC/+BTcQ59olXEYHFsWinWAuv7DQDb3IXa0Fuhg/9ZXzlpd8TpxatSOh Egn/j+B9iMJOE6Y/4ZYKmLwkrsputYeUduz9+Iv/FRUFP+IXTH0Dhp0Kg65R5Fx6/JD2 495SIR/N5N+dNeo2jiWqH/adXTWjoRibjZYTU1571vdqPekkrrbCoFJd3XNSXS9pk1Pf SSJw== X-Gm-Message-State: APjAAAXkwLujP2sJdVdN7v/B14+nVzF5Sro3Hfqb+S3S6yhpIg2T4/sV r+MoH78pgAQAufT5e3gPFLwolHtbIJY= X-Google-Smtp-Source: APXvYqxZ/mt20D44a1/aM2S+HTn9RdRRBDV5hRVUq6TU3NchymTAXTmmIscFOULLoK0V18FY2ucxDg== X-Received: by 2002:a92:7608:: with SMTP id r8mr21526149ilc.255.1569854487217; Mon, 30 Sep 2019 07:41:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:41 -0600 Message-Id: <20190930144112.175618-11-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 10/41] common: Move bootcount functions to their header file 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" These don't need to be in common.h so move them out. Signed-off-by: Simon Glass --- board/BuR/brppt1/board.c | 1 + include/bootcount.h | 10 ++++++++++ include/common.h | 4 ---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index ef4f5c95014..e0d1707ac13 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/include/bootcount.h b/include/bootcount.h index a26a3852338..cd304039849 100644 --- a/include/bootcount.h +++ b/include/bootcount.h @@ -59,6 +59,16 @@ int dm_bootcount_set(struct udevice *dev, u32 bootcount); #endif +/** bootcount_store() - store the current bootcount */ +void bootcount_store(ulong); + +/** + * bootcount_load() - load the current bootcount + * + * @return bootcount, read from the appropriate location + */ +ulong bootcount_load(void); + #if defined(CONFIG_SPL_BOOTCOUNT_LIMIT) || defined(CONFIG_BOOTCOUNT_LIMIT) #if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE) diff --git a/include/common.h b/include/common.h index 9c454fb1c83..97b661181b0 100644 --- a/include/common.h +++ b/include/common.h @@ -266,10 +266,6 @@ unsigned long timer_get_us(void); void enable_interrupts (void); int disable_interrupts (void); -/* $(CPU)/.../commproc.c */ -void bootcount_store (ulong); -ulong bootcount_load (void); - /* $(CPU)/.../ */ void mii_init (void); From patchwork Mon Sep 30 14:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169428 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="S0FWLoze"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlhN1Xnlz9s7T for ; Tue, 1 Oct 2019 00:51:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D1412C21E4E; Mon, 30 Sep 2019 14:47:16 +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 EE88AC21E7D; Mon, 30 Sep 2019 14:42:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 07627C21E74; Mon, 30 Sep 2019 14:41:33 +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 22CB7C21E26 for ; Mon, 30 Sep 2019 14:41:29 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id n197so38885957iod.9 for ; Mon, 30 Sep 2019 07:41:29 -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=zVj9954DkK2VPEgZXsytt2cnyNWR3WDGxIQfQp87Yhw=; b=S0FWLozeHYANTJo8OjuHZn8Phj4MH7xQfLsO09CG0qIdhe+eYW+CmC6ACv0czcn4ky qT97owlf+pVBwgEw6p4Vp5NpSnke9a3uVQbR/1jGkHsOGTXMIqxc81Wc4NJgIhmAe84j dhORL1KLTBG2GcQuQPq4bBHfS+2fd1JkoX17Y= 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=zVj9954DkK2VPEgZXsytt2cnyNWR3WDGxIQfQp87Yhw=; b=GD8WZAe88RUWDeeDo+q1WH85ArNX93y2QQIJJ8HRhsY5zY0bhgLYxMA2hfl1NLy3Nk qvv5AWBBy7KPoTw03kXB6sx3/sWBE3JtAE1xST6Rd2qIsqtbVEelcenPOIihx+OE4IKh 1SQeezlLkW/iciWXrGUr3uLHMnC45oO4R2JypMjwOXNBWrWTuaTGBvvsnfev5ziAoIn8 /J7OXnp+/QeAIh4hPMIripJM6eSJkdbHWa8BlvRhroJfF3CM+z9Zt0MR3po3G+fFqcfb YCmR6V/2sV4BulmE/7t4MB9PJGKHutmaJZfgNCYHRYvY39CeOUZz2QsjAJrZNLYSYgWZ GCGw== X-Gm-Message-State: APjAAAXmaqfazMqlOFF1h0/r4i/4DpvjhZM/Kho+slIFVZqG45NK9W3e 7ovFZtHrKrxYVMDVvwDBDA+Ab6Lt/n4= X-Google-Smtp-Source: APXvYqxeOhPO3LhbiW/7HsLHvzxffRbB9edtpKmmt8mF21wuhuKaNt4A9yJA4PbisZMUOUJMutuYtw== X-Received: by 2002:a92:cf09:: with SMTP id c9mr2098607ilo.175.1569854487927; Mon, 30 Sep 2019 07:41:27 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:42 -0600 Message-Id: <20190930144112.175618-12-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 11/41] common: Move sorting functions to their own header file 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" These don't need to be in common.h so move them out into a new header. Also add some missing comments. Signed-off-by: Simon Glass --- cmd/efi.c | 1 + common/bootstage.c | 1 + env/common.c | 1 + fs/yaffs2/yaffs_qsort.c | 1 + include/common.h | 5 ----- include/sort.h | 34 ++++++++++++++++++++++++++++++++++ lib/hashtable.c | 1 + lib/qsort.c | 1 + 8 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 include/sort.h diff --git a/cmd/efi.c b/cmd/efi.c index 919cb2fcfd5..ea239a01f0b 100644 --- a/cmd/efi.c +++ b/cmd/efi.c @@ -9,6 +9,7 @@ #include #include #include +#include static const char *const type_name[] = { "reserved", diff --git a/common/bootstage.c b/common/bootstage.c index 56ef91ad859..d6744ee5bac 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/env/common.c b/env/common.c index a23732bfd8b..d6c86a7e6e6 100644 --- a/env/common.c +++ b/env/common.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/yaffs2/yaffs_qsort.c b/fs/yaffs2/yaffs_qsort.c index b463569815d..32c767f3599 100644 --- a/fs/yaffs2/yaffs_qsort.c +++ b/fs/yaffs2/yaffs_qsort.c @@ -5,6 +5,7 @@ */ #include "yportenv.h" +#include /* #include */ /* diff --git a/include/common.h b/include/common.h index 97b661181b0..d17a2b2642c 100644 --- a/include/common.h +++ b/include/common.h @@ -304,11 +304,6 @@ ulong ticks2usec (unsigned long ticks); /* lib/lz4_wrapper.c */ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); -/* lib/qsort.c */ -void qsort(void *base, size_t nmemb, size_t size, - int(*compar)(const void *, const void *)); -int strcmp_compar(const void *, const void *); - /* lib/uuid.c */ #include diff --git a/include/sort.h b/include/sort.h new file mode 100644 index 00000000000..0c6b588fcb0 --- /dev/null +++ b/include/sort.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Google LLC + */ + +#ifndef __SORT_H +#define __SORT_H + +/** + * qsort() - Use the quicksort algorithm to sort some values + * + * @base: Base address of array to sort + * @nmemb: Number of members to sort + * @size: Size of each member in bytes + * @compar: Comparison function which should return: + * < 0 if element at s1 < element at s2, + * 0 if element at s1 == element at s2, + * > 0 if element at s1 > element at s2, + */ +void qsort(void *base, size_t nmemb, size_t size, + int (*compar)(const void *s1, const void *s2)); + +/** + * strcmp_compar() - compar function for string arrays + * + * This can be passed to qsort when a string array is being sorted + * + * @s1: First string to compare + * @s2: Second string to compare + * @return comparison value (less than, equal to, or greater than 0) + */ +int strcmp_compar(const void *s1, const void *s2); + +#endif diff --git a/lib/hashtable.c b/lib/hashtable.c index 2caab0a4c6d..907e8a642f3 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -14,6 +14,7 @@ #include #include +#include #ifdef USE_HOSTCC /* HOST build */ # include diff --git a/lib/qsort.c b/lib/qsort.c index 57098841f9a..f63d4ef7268 100644 --- a/lib/qsort.c +++ b/lib/qsort.c @@ -18,6 +18,7 @@ #include #include #include +#include void qsort(void *base, size_t nel, From patchwork Mon Sep 30 14:40:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169455 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="UbQAMq2n"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlxd0dcTz9s7T for ; Tue, 1 Oct 2019 01:02:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 94320C21F01; Mon, 30 Sep 2019 14:47:48 +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 E0C23C21E77; Mon, 30 Sep 2019 14:42:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 04FE7C21E42; Mon, 30 Sep 2019 14:41:34 +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 505A2C21D9A for ; Mon, 30 Sep 2019 14:41:30 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id u8so38926079iom.5 for ; Mon, 30 Sep 2019 07:41:30 -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=wXAyxnPjfHvvteeG3mdaV5tGsLXV+yhwTxS0xDG1gsI=; b=UbQAMq2nJFFry2cxFD9NU1MBxfBy7HZdR9aJBqnkQ4bwGUn19v4o4h7kweyBPoprr/ Vd7BiGgnx/+a6oxd4ui8Qjn8ggqbsqh5B3Tlk+NWCW6dWnVWIiFB2F9PFatZja5q3PeX +5apohhPWEJEB3fNjfqgT3enC8zOPpsjXWDRo= 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=wXAyxnPjfHvvteeG3mdaV5tGsLXV+yhwTxS0xDG1gsI=; b=NJJg9j4+jx1LGbCmyWyRR1DuIWlAHTm+oBpql0lNT/3LQ0PZHhBMP6KA5k9ZUPXyL9 p4FA63F/+CFFAj+ve4SSdCUtPlcUEGe6TVCCWaZFbsdZCTPhp+i+TbUKXn/fcHm7nNap gGDenwYunXCBlSFU37tjV2CqI5icggSbF8x8F1CM/PkHmANvufu9YjVZglB4dKlxOU7J Bgxc/VbOf2i6+AZX7qhly1uE4pIUIjipdWxn+QPqIJ7S72vp6KvDmKcu7F8VWES822wK 9GyAPRG4L2rHckg5nCCP4POpJ8SnspCVhb+Ncii4+pDUoaSS67k3rlZ8LyZLkVU1E8Of X5vg== X-Gm-Message-State: APjAAAXV3FsgodWavpR4M2EjnyIgTOdwiLoPW3XvitKEruMEBN3bDEhS q7dnkyd64IDJZEbaPIlVrYnzc8m8dvE= X-Google-Smtp-Source: APXvYqxg+wMZuTKygbMIQ91BtFVtao6U8ok7rH7TpCl/gZ6t8RapFofP1YXkNn5/JC+k9QIOaagQkw== X-Received: by 2002:a92:af52:: with SMTP id n79mr20807370ili.4.1569854488676; Mon, 30 Sep 2019 07:41:28 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:43 -0600 Message-Id: <20190930144112.175618-13-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 12/41] Move strtomhz() to vsprintf.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" At present this function sits in its own file but it does not really justify it. There are similar string functions in vsprintf.h, so move it there. Also add the missing function comment. Use the vsprintf.h include file explicitly where needed. Signed-off-by: Simon Glass --- arch/arc/lib/cpu.c | 1 + arch/arm/cpu/arm926ejs/mx25/generic.c | 1 + arch/arm/cpu/arm926ejs/mx27/generic.c | 1 + arch/arm/cpu/armv7/ls102xa/cpu.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/mach-at91/arm926ejs/cpu.c | 1 + arch/arm/mach-at91/armv7/cpu.c | 1 + arch/m68k/cpu/mcf5227x/cpu.c | 1 + arch/m68k/cpu/mcf523x/cpu.c | 1 + arch/m68k/cpu/mcf52x2/cpu.c | 1 + arch/m68k/cpu/mcf530x/cpu.c | 1 + arch/m68k/cpu/mcf532x/cpu.c | 1 + arch/m68k/cpu/mcf5445x/cpu.c | 1 + arch/m68k/cpu/mcf547x_8x/cpu.c | 1 + arch/powerpc/cpu/mpc83xx/cpu.c | 1 + arch/powerpc/cpu/mpc83xx/spd_sdram.c | 1 + arch/powerpc/cpu/mpc83xx/speed.c | 1 + arch/powerpc/cpu/mpc85xx/cpu.c | 1 + arch/powerpc/cpu/mpc86xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xx/cpu.c | 1 + arch/xtensa/cpu/cpu.c | 1 + board/Arcturus/ucp1020/ddr.c | 1 + board/atmel/at91sam9261ek/at91sam9261ek.c | 1 + board/atmel/at91sam9263ek/at91sam9263ek.c | 1 + .../atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 1 + board/atmel/at91sam9n12ek/at91sam9n12ek.c | 1 + board/atmel/at91sam9rlek/at91sam9rlek.c | 1 + board/atmel/common/video_display.c | 1 + board/esd/meesc/meesc.c | 1 + board/freescale/bsc9131rdb/ddr.c | 1 + board/freescale/bsc9132qds/ddr.c | 1 + board/freescale/corenet_ds/ddr.c | 1 + board/freescale/ls1043ardb/ddr.c | 1 + board/freescale/mpc8541cds/mpc8541cds.c | 1 + board/freescale/mpc8548cds/mpc8548cds.c | 1 + board/freescale/mpc8555cds/mpc8555cds.c | 1 + board/freescale/p1010rdb/ddr.c | 1 + board/freescale/p1_p2_rdb_pc/ddr.c | 1 + board/freescale/p1_twr/ddr.c | 1 + board/mini-box/picosam9g45/picosam9g45.c | 1 + board/ronetix/pm9261/pm9261.c | 1 + cmd/bdinfo.c | 1 + drivers/clk/clk_stm32mp1.c | 1 + drivers/clk/mpc83xx_clk.c | 1 + drivers/cpu/mpc83xx_cpu.c | 1 + include/common.h | 3 --- include/vsprintf.h | 10 +++++++++ lib/Makefile | 4 ++-- lib/strmhz.c | 21 ------------------- lib/vsprintf.c | 17 +++++++++++++++ 50 files changed, 74 insertions(+), 26 deletions(-) delete mode 100644 lib/strmhz.c diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c index 01cca95d5b1..83246550ec1 100644 --- a/arch/arc/lib/cpu.c +++ b/arch/arc/lib/cpu.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index 5fcf06ae1a8..eeb61d0d102 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c index 08b1b4de717..9bed0e91bea 100644 --- a/arch/arm/cpu/arm926ejs/mx27/generic.c +++ b/arch/arm/cpu/arm926ejs/mx27/generic.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index 9ccfe1042ce..ec9984db795 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index a5d0b5370f8..fbbabc23a77 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-at91/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c index 6f5aa4274b5..e9b4e06595e 100644 --- a/arch/arm/mach-at91/arm926ejs/cpu.c +++ b/arch/arm/mach-at91/arm926ejs/cpu.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c index 5da067cda10..638645c7e40 100644 --- a/arch/arm/mach-at91/armv7/cpu.c +++ b/arch/arm/mach-at91/armv7/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c index 7ad023dac5a..34534d876bc 100644 --- a/arch/m68k/cpu/mcf5227x/cpu.c +++ b/arch/m68k/cpu/mcf5227x/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c index 79be04f7a0c..429781945bf 100644 --- a/arch/m68k/cpu/mcf523x/cpu.c +++ b/arch/m68k/cpu/mcf523x/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c index 29a17c57fce..b48a753f9b7 100644 --- a/arch/m68k/cpu/mcf52x2/cpu.c +++ b/arch/m68k/cpu/mcf52x2/cpu.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c index c7ae65afce9..a76deebc68a 100644 --- a/arch/m68k/cpu/mcf530x/cpu.c +++ b/arch/m68k/cpu/mcf530x/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c index a01b5e65a74..c8a1f205305 100644 --- a/arch/m68k/cpu/mcf532x/cpu.c +++ b/arch/m68k/cpu/mcf532x/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c index 56e5585e09e..2f79380c8be 100644 --- a/arch/m68k/cpu/mcf5445x/cpu.c +++ b/arch/m68k/cpu/mcf5445x/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c index 819b25f280b..dc5ed1aa79f 100644 --- a/arch/m68k/cpu/mcf547x_8x/cpu.c +++ b/arch/m68k/cpu/mcf547x_8x/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 3048ecf34ad..363c0ffd285 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/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c index 8b5ecdb9ad1..08918a9d75e 100644 --- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c +++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c @@ -13,6 +13,7 @@ #ifndef CONFIG_MPC83XX_SDRAM #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index e118a10fa8b..93af7f495fd 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -11,6 +11,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index bba71813bcb..8f58924b7ba 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index c023d0684f8..1c3c78217cb 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 798eabdc21c..6ad86e9a1d7 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/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c index 64bb0b6ee0b..6f4b88f88e1 100644 --- a/arch/xtensa/cpu/cpu.c +++ b/arch/xtensa/cpu/cpu.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/ddr.c b/board/Arcturus/ucp1020/ddr.c index 4b84a1a4c01..a3285ebe5cd 100644 --- a/board/Arcturus/ucp1020/ddr.c +++ b/board/Arcturus/ucp1020/ddr.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 6f15bc67767..28765315f74 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 2d882174de0..31bb72c0cdc 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index 3b277fc575e..85004310b1f 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index b2bb7ec9928..51b24e1d592 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index 03933073157..4e674d49b31 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c index c7d3f8addca..105712adc1b 100644 --- a/board/atmel/common/video_display.c +++ b/board/atmel/common/video_display.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c index b0d2f7b6f87..221048a91f1 100644 --- a/board/esd/meesc/meesc.c +++ b/board/esd/meesc/meesc.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/bsc9131rdb/ddr.c b/board/freescale/bsc9131rdb/ddr.c index f9f8d802135..4b6d91df219 100644 --- a/board/freescale/bsc9131rdb/ddr.c +++ b/board/freescale/bsc9131rdb/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/bsc9132qds/ddr.c b/board/freescale/bsc9132qds/ddr.c index 191ef01d23e..f4effe5a2d6 100644 --- a/board/freescale/bsc9132qds/ddr.c +++ b/board/freescale/bsc9132qds/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c index 38f13ce4b2e..9c8731ce780 100644 --- a/board/freescale/corenet_ds/ddr.c +++ b/board/freescale/corenet_ds/ddr.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c index 784e482f32f..2677b7928f5 100644 --- a/board/freescale/ls1043ardb/ddr.c +++ b/board/freescale/ls1043ardb/ddr.c @@ -7,6 +7,7 @@ #include #include #include "ddr.h" +#include #ifdef CONFIG_FSL_DEEP_SLEEP #include #endif diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c index 779c99c2686..be79a7ca7b8 100644 --- a/board/freescale/mpc8541cds/mpc8541cds.c +++ b/board/freescale/mpc8541cds/mpc8541cds.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index 2799b5b5a4b..28f8a998ce7 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c index 6cfb8d5191a..bc1ebc51edb 100644 --- a/board/freescale/mpc8555cds/mpc8555cds.c +++ b/board/freescale/mpc8555cds/mpc8555cds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1010rdb/ddr.c b/board/freescale/p1010rdb/ddr.c index 01e3eafd12a..71f6259b60e 100644 --- a/board/freescale/p1010rdb/ddr.c +++ b/board/freescale/p1010rdb/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/ddr.c b/board/freescale/p1_p2_rdb_pc/ddr.c index b9bd7b52765..2346f6a0c27 100644 --- a/board/freescale/p1_p2_rdb_pc/ddr.c +++ b/board/freescale/p1_p2_rdb_pc/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1_twr/ddr.c b/board/freescale/p1_twr/ddr.c index 7e8bd6b8c21..85f1f6344ad 100644 --- a/board/freescale/p1_twr/ddr.c +++ b/board/freescale/p1_twr/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c index 9554fefd4ec..9a724040b07 100644 --- a/board/mini-box/picosam9g45/picosam9g45.c +++ b/board/mini-box/picosam9g45/picosam9g45.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c index f1e7aab6296..bad673412a1 100644 --- a/board/ronetix/pm9261/pm9261.c +++ b/board/ronetix/pm9261/pm9261.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index ae6006f85ff..abd9151432e 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -10,6 +10,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c index e87307fa60c..e223f84eac0 100644 --- a/drivers/clk/clk_stm32mp1.c +++ b/drivers/clk/clk_stm32mp1.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c index 32d2db9edad..cbccda55943 100644 --- a/drivers/clk/mpc83xx_clk.c +++ b/drivers/clk/mpc83xx_clk.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c index 7bc86bf9b20..1e584577421 100644 --- a/drivers/cpu/mpc83xx_cpu.c +++ b/drivers/cpu/mpc83xx_cpu.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "mpc83xx_cpu.h" diff --git a/include/common.h b/include/common.h index d17a2b2642c..f993e4bef33 100644 --- a/include/common.h +++ b/include/common.h @@ -310,9 +310,6 @@ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); /* lib/vsprintf.c */ #include -/* lib/strmhz.c */ -char * strmhz(char *buf, unsigned long hz); - /* * STDIO based functions (can always be used) */ diff --git a/include/vsprintf.h b/include/vsprintf.h index d1740a378e0..56844dd2de8 100644 --- a/include/vsprintf.h +++ b/include/vsprintf.h @@ -212,4 +212,14 @@ void print_grouped_ull(unsigned long long int_val, int digits); bool str2off(const char *p, loff_t *num); bool str2long(const char *p, ulong *num); + +/** + * strmhz() - Convert a value to a Hz string + * + * This creates a string indicating the number of MHz of a value. For example, + * 2700000 produces "2.7". + * @buf: Buffer to hold output string, which must be large enough + * @hz: Value to convert + */ +char *strmhz(char *buf, unsigned long hz); #endif diff --git a/lib/Makefile b/lib/Makefile index 2fffd68f943..a0ac3f8b9bb 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -109,12 +109,12 @@ ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y) ifdef CONFIG_USE_TINY_PRINTF obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o else -obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o strmhz.o +obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o endif obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o else # Main U-Boot always uses the full printf support -obj-y += vsprintf.o strto.o strmhz.o +obj-y += vsprintf.o strto.o endif subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2 diff --git a/lib/strmhz.c b/lib/strmhz.c deleted file mode 100644 index 66afe91ab99..00000000000 --- a/lib/strmhz.c +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2002-2006 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ -#include - -char *strmhz (char *buf, unsigned long hz) -{ - long l, n; - long m; - - n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L; - l = sprintf (buf, "%ld", n); - - hz -= n * 1000000L; - m = DIV_ROUND_CLOSEST(hz, 1000L); - if (m != 0) - sprintf (buf + l, ".%03ld", m); - return (buf); -} diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 425f2f53f79..a03a076a0aa 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -873,3 +874,19 @@ bool str2long(const char *p, ulong *num) *num = simple_strtoul(p, &endptr, 16); return *p != '\0' && *endptr == '\0'; } + +char *strmhz(char *buf, unsigned long hz) +{ + long l, n; + long m; + + n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L; + l = sprintf(buf, "%ld", n); + + hz -= n * 1000000L; + m = DIV_ROUND_CLOSEST(hz, 1000L); + if (m != 0) + sprintf(buf + l, ".%03ld", m); + + return buf; +} From patchwork Mon Sep 30 14:40:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169431 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="lJZqTWQi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlkS27R1z9s7T for ; Tue, 1 Oct 2019 00:52:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C4BD2C21E57; Mon, 30 Sep 2019 14:44:30 +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 5992EC21E15; Mon, 30 Sep 2019 14:41:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5ED26C21E15; Mon, 30 Sep 2019 14:41:34 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 8D693C21E1D for ; Mon, 30 Sep 2019 14:41:30 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id b19so10863039iob.4 for ; Mon, 30 Sep 2019 07:41:30 -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=iA8gfLYayZl5Vy9bkJryRnOC9SscY4PxlpL9bQU/klU=; b=lJZqTWQiy3BQKq0tNW6z7F9/4VwJjDCyDbTVk9xlNagmi2c/ykHgRJMmvKPLXgWxYH f/IdCuL4qUCalFe1FN7HNJJ+kdQ+F01RzMyeq4y26Gf1yXzVTtDPXcyUf8OU2ESK0RfA jyEF9e/XnVVbcNvZBAT6T23eH4YEfE/ohurMw= 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=iA8gfLYayZl5Vy9bkJryRnOC9SscY4PxlpL9bQU/klU=; b=E/4WDe4yXFg08EapzQqdGbWOwfEQSatyio/Os06kfb8UkatnNOb9nvAlZvbjCdTK6K ulJOrNdQC9cd0QAnK0urCIto1qZXdap0g2p1Z+MBsIagI8y3bzR6z8Px3fh2L5y40mXk fN3zFFpeSqQ1wVXGC9TE1M1mQU7V4PMMiWeNoFoK3Hsd5OD2QkdtjjqdA1ta2IMnpa6V +oFkYDeEHTZvoi6NtdhBwM8eHovDTf9wG9UwF1oqpXB6UUkWUNAxIiY7/y3ZjNr9pNtH h26w+1r2b4H/FTbuaxki5w1fXYyYswk9qt2gVJ2uCp/uoy/UOB1KI0qUVER7h53sxMxg uf2w== X-Gm-Message-State: APjAAAW0Az9BmsYPuO6QRM03KQtZRSWFOJLXTBaFOKXGCJv1QDvgl6gQ g1oi6qzyeHPC21h7n/WuMM7LWUAev+g= X-Google-Smtp-Source: APXvYqwow4Fy4MUj5lUy1WzrwBejLQ13oEG49JyqxET3w8I9XTyTnu3LZHvEQjiCiEG6c97alvDrfw== X-Received: by 2002:a92:4a11:: with SMTP id m17mr20408992ilf.142.1569854489351; Mon, 30 Sep 2019 07:41:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:44 -0600 Message-Id: <20190930144112.175618-14-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 13/41] common: Move env_get_ip() to net.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 relates to networking, so move it out of the common.h header file. Signed-off-by: Simon Glass --- include/common.h | 4 ---- include/net.h | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/include/common.h b/include/common.h index f993e4bef33..4fda40cc1d6 100644 --- a/include/common.h +++ b/include/common.h @@ -319,10 +319,6 @@ int serial_printf (const char *fmt, ...) /* lib/net_utils.c */ #include -static inline struct in_addr env_get_ip(char *var) -{ - return string_to_ip(env_get(var)); -} #include diff --git a/include/net.h b/include/net.h index d8d187d8af9..11eca1bc6c3 100644 --- a/include/net.h +++ b/include/net.h @@ -829,7 +829,13 @@ static inline void net_random_ethaddr(uchar *addr) /* Convert an IP address to a string */ void ip_to_string(struct in_addr x, char *s); -/* Convert a string to ip address */ +/** + * string_to_ip() - Convert a string to ip address + * + * @s: String to conver, in the format format a.b.c.d, where each value is a + * decimal number from 0 to 255 + * @return IP address, or 0 if invalid + */ struct in_addr string_to_ip(const char *s); /* Convert a VLAN id to a string */ @@ -887,4 +893,17 @@ int update_tftp(ulong addr, char *interface, char *devstring); */ void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); +/** + * env_get_ip() - Convert an environment value to to an ip address + * + * @var: Environment variable to convert. The value of this variable must be + * in the format format a.b.c.d, where each value is a decimal number from + * 0 to 255 + * @return IP address, or 0 if invalid + */ +static inline struct in_addr env_get_ip(char *var) +{ + return string_to_ip(env_get(var)); +} + #endif /* __NET_H__ */ From patchwork Mon Sep 30 14:40:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169418 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="cgYpklTa"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlZV6wjHz9s00 for ; Tue, 1 Oct 2019 00:45:54 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9632DC21E2F; Mon, 30 Sep 2019 14:45:08 +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 64B69C21E73; Mon, 30 Sep 2019 14:41:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 04F4EC21E0B; Mon, 30 Sep 2019 14:41:36 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 17B3DC21DFD for ; Mon, 30 Sep 2019 14:41:32 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id n26so10434015ioj.8 for ; Mon, 30 Sep 2019 07:41:32 -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=PkICGYMUkeZeGqrIfupBx9IRm38HRSLAUiIknirzkOA=; b=cgYpklTaSEf2irKrtQ6Q9HNDcz8uikrnGKoK3/ZaoStPb5wGc3xnmMvNgUB/dzc9OO OKPYCOXr9T/H/k/P6Ci3pXSIDdLxsvgs8w0Mi2Hw8VpHoci+DrLa04Rctb8WftzQk+1h EFETJ4rxnBqqigbEHZcR94AIXstJSTt6YgwC0= 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=PkICGYMUkeZeGqrIfupBx9IRm38HRSLAUiIknirzkOA=; b=RQwsDJCbRgseO6ys9DtTP86c15L7010b/VuSvD2O/75gnYngx2XdS6NXmN91kYxOx2 8FHYLnSdu4MOGwQG9gf/9ursETe9iHK2SifHV7L3eXBR77X+VG1XSA9FTw7Kt5o36E+e tZaqsKraBlVy+UOix7/OxmulYLB6vzd1MOWIAEFzOKF5NNlS1ucZdiH03MC0qB1CmJq9 iLpMJQXPozi7SCuo5Hr0aVG7iu39jVckNb+zx669anAl3EjdIE73h+lH+fHIXjgCVc5a ZOYjJ483s9uuARiX38hAW+KO0OX41AsUcoKjL/ByuwsCxxeQNLrykaPZHufvaF1ODQFD R7Ug== X-Gm-Message-State: APjAAAWpObUnqZalvA6Eiq+9roxTdDMg0hsS58bpBl2J6GaEThsJzhOQ yZeEHQgvjQkvamd+bO3EuwWynAqx5BQ= X-Google-Smtp-Source: APXvYqwgquxQhW0krbXShXgiyOcn8lu/qrmZDA7ZygKPCRJJO+7FISGeBejzQNZMbXtNAUxC46fI3w== X-Received: by 2002:a6b:7802:: with SMTP id j2mr1878543iom.71.1569854490078; Mon, 30 Sep 2019 07:41:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:45 -0600 Message-Id: <20190930144112.175618-15-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: Marek Vasut , Tom Rini , Remy Bohmer Subject: [U-Boot] [PATCH 14/41] serial: usb: Correct the usbtty_...() prototypes 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" The function declarations in serial.h are not in sync with what is currently used in usbtty. Fix this by updating the header and including it, to help catch future such problems. Signed-off-by: Simon Glass --- drivers/serial/usbtty.c | 1 + include/serial.h | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index 76d9c8a3a6d..f1c1a260da5 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include "usbtty.h" diff --git a/include/serial.h b/include/serial.h index c1368c68b64..38a1cc99ae2 100644 --- a/include/serial.h +++ b/include/serial.h @@ -50,18 +50,20 @@ extern void serial_reinit_all(void); /* For usbtty */ #ifdef CONFIG_USB_TTY -extern int usbtty_getc(void); -extern void usbtty_putc(const char c); -extern void usbtty_puts(const char *str); -extern int usbtty_tstc(void); +struct stdio_dev; + +int usbtty_getc(struct stdio_dev *dev); +void usbtty_putc(struct stdio_dev *dev, const char c); +void usbtty_puts(struct stdio_dev *dev, const char *str); +int usbtty_tstc(struct stdio_dev *dev); #else /* stubs */ -#define usbtty_getc() 0 -#define usbtty_putc(a) -#define usbtty_puts(a) -#define usbtty_tstc() 0 +#define usbtty_getc(dev) 0 +#define usbtty_putc(dev, a) +#define usbtty_puts(dev, a) +#define usbtty_tstc(dev) 0 #endif /* CONFIG_USB_TTY */ From patchwork Mon Sep 30 14:40:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169433 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="SG2H692l"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlm80n2bz9s00 for ; Tue, 1 Oct 2019 00:54:16 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BE257C21E02; Mon, 30 Sep 2019 14:46:13 +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 2CE1EC21EA2; Mon, 30 Sep 2019 14:41:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 189C2C21C93; Mon, 30 Sep 2019 14:41:36 +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 EE21DC21E0D for ; Mon, 30 Sep 2019 14:41:31 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id b136so38938728iof.3 for ; Mon, 30 Sep 2019 07:41:31 -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=GQL0LZfcPohAtLE4SjmC4RN2nsJ2QsFllMLENWcLlLo=; b=SG2H692lkYsH23/zIWwGLMxEiEeEDFbCWsb5q69g+j7Lck3NnL340oUlDiY8vlmeAu 8A9vf1x57zwSIMpnwV9kYzGs7ME1y9aqiVJbn0wPqNSIUr4GI2D6TDy7Fv3V/dSYyl4Q 1NQK4zyFssdctwcQ2aLZZaYZvMfFmYOUABWLI= 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=GQL0LZfcPohAtLE4SjmC4RN2nsJ2QsFllMLENWcLlLo=; b=VXq+EniUp+snJKk50M4ZTzyjrLAkSjlSyBaDfye8EEGXRjj8lM2/hYy5V7vjeO1w7j H5F1yAg5+lQ07c0mfk1ZJkARjxLRUFgoORNI4atx4cBY24redDrqPoP8Pq1cAFxx5KYx grfujkcI+HVKqBXZnOTfpP9SoVLrycFfrJt3dle9tWdoRHxpTCG9NG2GsRvos+oRaaNw 19d+GVYE8b9JX86puSw0+y1upiQythYTTOPhacpp19sqUFjApmrASQ9sagfoxdFXD8Zx zmO4UIUlyj515Cp6n7t/F8m3oOx5H8r3DxEVvaI7l4tnvOhHN4fSabL98GO1K+i3oSO4 Orfw== X-Gm-Message-State: APjAAAUm1N36XwnaK40BVVZNdcYJRe+qSrqisiIsiTPbuXMi5YltDuW6 8wxpoWbuld8wV3jmcIQ3L27EEPVlc2c= X-Google-Smtp-Source: APXvYqwOiyIuja288CHIfT+Am3dvK5MiSWdm925+nySIqDwcGc0ZGDvAUPoIdzyyUbjaHqL9mQGKBQ== X-Received: by 2002:a5e:9917:: with SMTP id t23mr21126559ioj.141.1569854490698; Mon, 30 Sep 2019 07:41:30 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:30 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:46 -0600 Message-Id: <20190930144112.175618-16-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 15/41] common: Move serial_printf() to the serial header 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" Move this function header to serial.h since this function is clearly related to serial. The function itself stays in console.c since we don't have a single serial file. DM and non-DM each has a separate file so we would have to either create a new common serial file, or repeat the function in both serial.c and serial-uclass.c, neither of which seem worthwhile. Signed-off-by: Simon Glass --- drivers/usb/gadget/core.c | 1 + drivers/usb/gadget/designware_udc.c | 1 + drivers/usb/gadget/ep0.c | 3 ++- drivers/usb/musb-new/omap2430.c | 1 + drivers/usb/musb/musb_udc.c | 1 + drivers/usb/musb/omap3.c | 1 + include/common.h | 7 ------- include/serial.h | 11 +++++++++++ 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c index ffaf161fb7e..7e1e51db967 100644 --- a/drivers/usb/gadget/core.c +++ b/drivers/usb/gadget/core.c @@ -16,6 +16,7 @@ */ #include +#include #include #define MAX_INTERFACES 2 diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index 432f312cee4..70c5c678c3b 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c index a36d9ec03d8..6fabee24ce9 100644 --- a/drivers/usb/gadget/ep0.c +++ b/drivers/usb/gadget/ep0.c @@ -37,6 +37,7 @@ */ #include +#include #include #if 0 @@ -581,7 +582,7 @@ int ep0_recv_setup (struct urb *urb) device->interface = le16_to_cpu (request->wIndex); device->alternate = le16_to_cpu (request->wValue); /*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */ - serial_printf ("DEVICE_SET_INTERFACE.. event?\n"); + serial_printf("DEVICE_SET_INTERFACE.. event?\n"); return 0; case USB_REQ_GET_STATUS: diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c index cca1653f1e2..05059ce3cbd 100644 --- a/drivers/usb/musb-new/omap2430.c +++ b/drivers/usb/musb-new/omap2430.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c index 7620114bec4..584564bac2b 100644 --- a/drivers/usb/musb/musb_udc.c +++ b/drivers/usb/musb/musb_udc.c @@ -38,6 +38,7 @@ */ #include +#include #include #include #include "../gadget/ep0.h" diff --git a/drivers/usb/musb/omap3.c b/drivers/usb/musb/omap3.c index b2e4c32baff..080bd78523c 100644 --- a/drivers/usb/musb/omap3.c +++ b/drivers/usb/musb/omap3.c @@ -16,6 +16,7 @@ * ------------------------------------------------------------------------ */ +#include #include #include #include diff --git a/include/common.h b/include/common.h index 4fda40cc1d6..f97a7b6e14d 100644 --- a/include/common.h +++ b/include/common.h @@ -310,13 +310,6 @@ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); /* lib/vsprintf.c */ #include -/* - * STDIO based functions (can always be used) - */ -/* serial stuff */ -int serial_printf (const char *fmt, ...) - __attribute__ ((format (__printf__, 1, 2))); - /* lib/net_utils.c */ #include diff --git a/include/serial.h b/include/serial.h index 38a1cc99ae2..8d1803c8003 100644 --- a/include/serial.h +++ b/include/serial.h @@ -324,4 +324,15 @@ void pl01x_serial_initialize(void); void pxa_serial_initialize(void); void sh_serial_initialize(void); +/** + * serial_printf() - Write a formatted string to the serial console + * + * The total size of the output must be less than CONFIG_SYS_PBSIZE. + * + * @fmt: Printf format string, followed by format arguments + * @return number of characters written + */ +int serial_printf(const char *fmt, ...) + __attribute__ ((format (__printf__, 1, 2))); + #endif From patchwork Mon Sep 30 14:40:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169429 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="d1qLDqwB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hljQ6ggPz9s00 for ; Tue, 1 Oct 2019 00:51:54 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9858CC21E52; Mon, 30 Sep 2019 14:44:45 +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 D21D0C21E39; Mon, 30 Sep 2019 14:41:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 89182C21E29; Mon, 30 Sep 2019 14:41:37 +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 541D2C21E16 for ; Mon, 30 Sep 2019 14:41:33 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id n197so38886652iod.9 for ; Mon, 30 Sep 2019 07:41:33 -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=KcRkYvJrtzxTAZU3NVkKW8FTMZTad2kZqByIlrsYJGM=; b=d1qLDqwBRx3KD6b+r05rg6rXfrhD6rAbHb9SDyF3s1HknCAV9TzgkLGPQqVCgS95Re AMwkhHtqz4HEPptAe/z2Qrc2/0AWSAyasjAGXVOoQvz7PlG35Qwzor9miKbd0cwVk22k RFsE9xfBe2FBEb6OCFszWClmPt6H0ShmHrbXo= 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=KcRkYvJrtzxTAZU3NVkKW8FTMZTad2kZqByIlrsYJGM=; b=tmJAajOzyjdZIrDSxrGUXhpoyybPGl+6tvjCt6dyMbDQpKos84av/NEJZpMhVaaRBK qlj++lwmCqy11UHmS68JIhWK+uRAPTeMNOd/tV0cLydkEZKrPBhUz2DkPYb0LoniiCcO VSCxXLw6TfEkSkh68DpPrtw8D3KNiYQXj4yMCbZnOZ8j0G20JuPBsMJvr8g1aANx4SLY NPcOJezLMLWx1gDKdHxXcPHoJfT3mqbfCNHcIxYx+NjJxgLdf7trXZTIt3bymznaUgsA VKvuWPO/9tu/EMO8GC7NpkAcIm16W6qQhbMrztOQf7y2Mrhantc5NG9tYXkM9L+Wp1Ai DboQ== X-Gm-Message-State: APjAAAXLGVHgkAsy8g4dFGzbos0K+mbJuMeIEwhw+nrN082hzACk2OSC t1FFsYeWFTasCHXM5Joahrbj6rhEoRc= X-Google-Smtp-Source: APXvYqyujp+mKDeWwRHVwsaQTyjCx3/85T9oi5sEEJawZOp6esvSwR7gJtFQZ3/9JpKCE/q5KkRc+g== X-Received: by 2002:a6b:6c15:: with SMTP id a21mr403830ioh.60.1569854491759; Mon, 30 Sep 2019 07:41:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:47 -0600 Message-Id: <20190930144112.175618-17-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 16/41] common: Move serial functions 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" These functions belong in serial.h so move them over. Signed-off-by: Simon Glass --- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 1 + board/amarula/vyasa-rk3288/vyasa-rk3288.c | 1 + board/astro/mcf5373l/mcf5373l.c | 1 + board/birdland/bav335x/board.c | 1 + board/bticino/mamoj/spl.c | 1 + board/cssi/MCR3000/MCR3000.c | 1 + board/engicam/common/spl.c | 1 + board/esd/meesc/meesc.c | 1 + board/gumstix/pepper/board.c | 1 + board/isee/igep003x/board.c | 1 + board/isee/igep00x0/spl.c | 1 + board/liebherr/display5/spl.c | 1 + board/liebherr/mccmon6/mccmon6.c | 1 + board/logicpd/am3517evm/am3517evm.c | 1 + board/logicpd/imx6/imx6logic.c | 1 + board/logicpd/omap3som/omap3logic.c | 1 + board/overo/common.c | 1 + board/siemens/common/board.c | 1 + board/silica/pengwyn/board.c | 1 + board/st/stm32f746-disco/stm32f746-disco.c | 1 + board/tcl/sl50/board.c | 1 + board/ti/am57xx/board.c | 1 + board/ti/beagle/beagle.c | 1 + board/ti/dra7xx/evm.c | 1 + board/ti/evm/evm.c | 1 + board/vscom/baltos/board.c | 1 + cmd/load.c | 1 + common/board_f.c | 1 + common/kgdb_stubs.c | 1 + common/lcd_console.c | 1 + common/spl/spl.c | 1 + include/common.h | 9 --------- include/serial.h | 8 ++++++++ 33 files changed, 39 insertions(+), 9 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index cb361ac65c3..5b3b51ce15f 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/amarula/vyasa-rk3288/vyasa-rk3288.c b/board/amarula/vyasa-rk3288/vyasa-rk3288.c index baf197c4851..92e0698c534 100644 --- a/board/amarula/vyasa-rk3288/vyasa-rk3288.c +++ b/board/amarula/vyasa-rk3288/vyasa-rk3288.c @@ -4,6 +4,7 @@ */ #include +#include #ifndef CONFIG_TPL_BUILD diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c index 759ff495621..db157a83c8f 100644 --- a/board/astro/mcf5373l/mcf5373l.c +++ b/board/astro/mcf5373l/mcf5373l.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index 8811583ac62..1f3f44a8675 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c index c53bdce0ceb..620e4d1de0c 100644 --- a/board/bticino/mamoj/spl.c +++ b/board/bticino/mamoj/spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index 445b84c180f..dcd2c1c9753 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c index 4d293c8032d..a9820a9028e 100644 --- a/board/engicam/common/spl.c +++ b/board/engicam/common/spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c index 221048a91f1..4271b0db19c 100644 --- a/board/esd/meesc/meesc.c +++ b/board/esd/meesc/meesc.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c index f5beb8c940e..65e5e1e60f2 100644 --- a/board/gumstix/pepper/board.c +++ b/board/gumstix/pepper/board.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index a8c2b121a47..d59121296e4 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/isee/igep00x0/spl.c b/board/isee/igep00x0/spl.c index e092e1a418b..f814fe13542 100644 --- a/board/isee/igep00x0/spl.c +++ b/board/isee/igep00x0/spl.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ +#include #include #include #include diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 354b63e431f..be154e2dd64 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/liebherr/mccmon6/mccmon6.c b/board/liebherr/mccmon6/mccmon6.c index 7d2751ab039..60a43038899 100644 --- a/board/liebherr/mccmon6/mccmon6.c +++ b/board/liebherr/mccmon6/mccmon6.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index 95c4cfc75d3..18f3c3f9d9c 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c index 7a59b89d94a..be6e5a72c39 100644 --- a/board/logicpd/imx6/imx6logic.c +++ b/board/logicpd/imx6/imx6logic.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index ee77ce077c1..ab5e6e8b97a 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/overo/common.c b/board/overo/common.c index 2c4f412e5d3..67823e68b69 100644 --- a/board/overo/common.c +++ b/board/overo/common.c @@ -11,6 +11,7 @@ * (C) Copyright 2004-2008 * Texas Instruments, */ +#include #include #include #include diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c index 75462d1c34f..5f5e2eb544c 100644 --- a/board/siemens/common/board.c +++ b/board/siemens/common/board.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c index 345701fd52c..c0496c549ab 100644 --- a/board/silica/pengwyn/board.c +++ b/board/silica/pengwyn/board.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index e89ed2153bc..5be60af18ca 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index c7eed319461..a9588275076 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index f78e6c2e1f6..2451cb056ef 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 0138fc91fcb..12e657c9c61 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef CONFIG_LED_STATUS #include #endif diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 74d04bb1e39..ea8523541f8 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index d0b9bafbd1b..d26dd5ba840 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c index 1ba58d0f11d..588f6db1724 100644 --- a/board/vscom/baltos/board.c +++ b/board/vscom/baltos/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/load.c b/cmd/load.c index 713fe56b555..5811a99310a 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -14,6 +14,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/board_f.c b/common/board_f.c index 591f18f391e..9cfa465ac17 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -26,6 +26,7 @@ #include #include #include +#include #ifdef CONFIG_SPL #include #endif diff --git a/common/kgdb_stubs.c b/common/kgdb_stubs.c index 52782099094..afa7d6403a6 100644 --- a/common/kgdb_stubs.c +++ b/common/kgdb_stubs.c @@ -9,6 +9,7 @@ #include #include +#include int (*debugger_exception_handler)(struct pt_regs *); diff --git a/common/lcd_console.c b/common/lcd_console.c index 7d1f8830131..d34bc2fa830 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -8,6 +8,7 @@ #include #include +#include #include /* Get font data, width and height */ #if defined(CONFIG_LCD_LOGO) #include diff --git a/common/spl/spl.c b/common/spl/spl.c index 6e3d4bd599d..5b0927cecbb 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index f97a7b6e14d..f433db17aef 100644 --- a/include/common.h +++ b/include/common.h @@ -238,15 +238,6 @@ void ft_pci_setup(void *blob, bd_t *bd); void smp_set_core_boot_addr(unsigned long addr, int corenr); void smp_kick_all_cpus(void); -/* $(CPU)/serial.c */ -int serial_init (void); -void serial_setbrg (void); -void serial_putc (const char); -void serial_putc_raw(const char); -void serial_puts (const char *); -int serial_getc (void); -int serial_tstc (void); - /* $(CPU)/speed.c */ int get_clocks (void); ulong get_bus_freq (ulong); diff --git a/include/serial.h b/include/serial.h index 8d1803c8003..104f34ff914 100644 --- a/include/serial.h +++ b/include/serial.h @@ -335,4 +335,12 @@ void sh_serial_initialize(void); int serial_printf(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); +int serial_init(void); +void serial_setbrg(void); +void serial_putc(const char ch); +void serial_putc_raw(const char ch); +void serial_puts(const char *str); +int serial_getc(void); +int serial_tstc(void); + #endif From patchwork Mon Sep 30 14:40:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169420 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="MRTsOtpG"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlcY0YL1z9s00 for ; Tue, 1 Oct 2019 00:47:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C974CC21E70; Mon, 30 Sep 2019 14:47:03 +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 591F2C21DED; Mon, 30 Sep 2019 14:41:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 91235C21E31; Mon, 30 Sep 2019 14:41:38 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 79B5FC21C29 for ; Mon, 30 Sep 2019 14:41:34 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id b136so38939114iof.3 for ; Mon, 30 Sep 2019 07:41:34 -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=WVeu6k3UvzxCCFjEeTxoAIttkj1qrW0IBgl9OkoWuFQ=; b=MRTsOtpGjZMesJ0TFZ6qgAzODVWZAR58CpfoQebkP9Olu891UaKBspFYT6OmrFLJgx 0i7su4X/JW3fCA3wWydQtDwxXjGXMfe2j+1mnKP8kxllMT8bc5KahnF/31y5lZ6yruQT Kp+0zmiucsUldoSIDyA0T77hfGOigZdlCi/gk= 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=WVeu6k3UvzxCCFjEeTxoAIttkj1qrW0IBgl9OkoWuFQ=; b=k2HylG7ZPiWpjygtw6tVKkL0Sv5czH1HsYnYI3Lkg+zKhKb/WL5RE+9mtC0/cXMLYa YcCJJkCjFLQTsqgsnd/zhV8+yR8XdvBq3Y+A9HK8GjpbUao79Lr9D0BITwMrd6EnfzX7 KjZDeuZbjedLw+o9xElggOfwwhLpRbLOHgVt5wlYBtObBRwrpDNTNKAc2vDTZrZyabL/ 0eP4RKUv+5DeNLcqh89UbMi7tVEYDCLmhhKK7fb1YNyWwXUB0biNyG0gWXmGV8cpV4q2 QyXunqkUK/a1VT4iuMDgige8dFNfKPbisKdDl9Q2rMtot6S6FkIgt+fEGx+1nvtSdFZz Tbfw== X-Gm-Message-State: APjAAAV89j1ebfwSSuMLMz8XjplUxjHcJ0D3jO0VPgL2G0NkjGMSHq5Q czk6VDl6qhPRrNA6N81b3ul+Vz/gyuE= X-Google-Smtp-Source: APXvYqzp3PZCYJwEHkSHAbvYXipXbWwcM+Bs1BApt4nPDQwUpLv97rvwOoXD1GVJsWp73pFu2uMN/A== X-Received: by 2002:a5d:88d6:: with SMTP id i22mr11147159iol.228.1569854492388; Mon, 30 Sep 2019 07:41:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:32 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:48 -0600 Message-Id: <20190930144112.175618-18-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 17/41] common: Add a new lz4.h header file 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" Add a header file to house the lz4 compression function. Add a comment while we are here, since it not even clear from the name what the function actuall does. Signed-off-by: Simon Glass --- common/image.c | 1 + include/common.h | 3 --- include/lz4.h | 24 ++++++++++++++++++++++++ lib/lz4_wrapper.c | 1 + test/compression.c | 1 + 5 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 include/lz4.h diff --git a/common/image.c b/common/image.c index dc16f4429f8..70be47e2518 100644 --- a/common/image.c +++ b/common/image.c @@ -20,6 +20,7 @@ #include #include +#include #include #if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT diff --git a/include/common.h b/include/common.h index f433db17aef..1e77ed393e4 100644 --- a/include/common.h +++ b/include/common.h @@ -292,9 +292,6 @@ void wait_ticks (unsigned long); ulong usec2ticks (unsigned long usec); ulong ticks2usec (unsigned long ticks); -/* lib/lz4_wrapper.c */ -int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); - /* lib/uuid.c */ #include diff --git a/include/lz4.h b/include/lz4.h new file mode 100644 index 00000000000..1276fb98a34 --- /dev/null +++ b/include/lz4.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Google LLC + */ + +#ifndef __LZ4_H +#define __LZ4_H + +/** + * ulz4fn() - Decompress LZ4 data + * + * @src: Source data to decompress + * @srcn: Length of source data + * @dst: Destination for uncompressed data + * @dstn: Returns length of uncompressed data + * @return 0 if OK, -EPROTONOSUPPORT if the magic number or version number are + * not recognised or independent blocks are used, -EINVAL if the reserved + * fields are non-zero, or input is overrun, -EENOBUFS if the destination + * buffer is overrun, -EEPROTO if the compressed data causes an error in + * the decompression algorithm + */ +int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); + +#endif diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c index 1c68e67452d..1e1e8d50853 100644 --- a/lib/lz4_wrapper.c +++ b/lib/lz4_wrapper.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/test/compression.c b/test/compression.c index 08fef59d0aa..48dccc0e891 100644 --- a/test/compression.c +++ b/test/compression.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include From patchwork Mon Sep 30 14:40:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169419 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="VMRaMoup"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlcH26j5z9s7T for ; Tue, 1 Oct 2019 00:47:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F1B39C21E30; Mon, 30 Sep 2019 14:45:21 +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 EA3E9C21E70; Mon, 30 Sep 2019 14:41:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E64B9C21D9A; Mon, 30 Sep 2019 14:41:38 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 6886FC21DF9 for ; Mon, 30 Sep 2019 14:41:34 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id q10so39035984iop.2 for ; Mon, 30 Sep 2019 07:41:34 -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=Sv7UajEB4ulyqoxeDokzbAK+CttON+WYpw3fbcxvMt0=; b=VMRaMoupZpufn2H7ZTcFfSe8eJhEe04GblfvUUDQBj5FdOZemSfDT0VxdzIRC//11R ykum4X5lHJYmRmI65zEW9XgfXCYIdtqcGNgGTZFMKu+JClQ4OCfXzTecW6kjtE/nruDh lE9Etbi/IMdsbYY+Bi5Mqdobuzdo/gP+MxE7I= 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=Sv7UajEB4ulyqoxeDokzbAK+CttON+WYpw3fbcxvMt0=; b=Li7N3Q1P9kX8uJFDD/pU1UoRk956Y2MM4Jitjqc9mHkjnqS8EFk/abLkQx7M5vb6zk 16c/t+KDrjr9fXO4wSgXfoyopcywen36ve9l2vPlcU+CetRlgRxQtyKNW2hOvlxr2gdE pG6DTNL762B7uuuhH6N3mM8Ed1+eL/nMQNzikG8oyY/qyqCGLqn8gOK7UxYbOTQhA8PM TktjH2z7DDfZkB9ERHwgaTe7JeT9VW+oU7S6fnNnI2c0SS+BY3bK4KbtiJKoo+4K8ies 8J0P0nq+It3gNFGRRBYRuMusHy0LPWRKclGlPFaiPqp449wUhQGjG5TkbSPI3b7LsjQF HwkQ== X-Gm-Message-State: APjAAAXnIwiMdgfHg6c4zJM7BVigBIzhXbHqBVEj9vFU/PIiL34HaPka q2Q+Q8jGhERDmEv03+rROHzqYpo7DZY= X-Google-Smtp-Source: APXvYqxf832M6mlZG6YmzLpo11bUd/59rfa1iQcFE4i0+G+ISZS/R9ZHgLXBpNSkOqAMfg8M99a8nA== X-Received: by 2002:a6b:b291:: with SMTP id b139mr195775iof.281.1569854493161; Mon, 30 Sep 2019 07:41:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:32 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:49 -0600 Message-Id: <20190930144112.175618-19-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 18/41] common: Move some time functions 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" These functions belong in time.h so move them over and add comments. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/ls102xa/timer.c | 1 + arch/arm/cpu/armv8/generic_timer.c | 1 + arch/arm/mach-imx/syscounter.c | 1 + arch/arm/mach-imx/timer.c | 1 + arch/m68k/lib/time.c | 1 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 1 + arch/powerpc/cpu/mpc8xxx/srio.c | 1 + arch/powerpc/lib/time.c | 1 + drivers/crypto/fsl/jr.c | 1 + drivers/i2c/fsl_i2c.c | 1 + include/common.h | 4 ---- include/time.h | 16 ++++++++++++++++ 12 files changed, 26 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c index e79360ada88..a5f4e31ac70 100644 --- a/arch/arm/cpu/armv7/ls102xa/timer.c +++ b/arch/arm/cpu/armv7/ls102xa/timer.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c index c1706dcec18..46e63294fef 100644 --- a/arch/arm/cpu/armv8/generic_timer.c +++ b/arch/arm/cpu/armv8/generic_timer.c @@ -6,6 +6,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index c888a939385..5a292c39643 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c index ed5eb1c8a77..5fe5c51f6a6 100644 --- a/arch/arm/mach-imx/timer.c +++ b/arch/arm/mach-imx/timer.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index a6345a0bc9c..c76c5fedc99 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index fcfa7302334..ebdcd29c13d 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -5,6 +5,7 @@ #include #include +#include #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 #include #endif diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index ea7dac6e668..a1f94035596 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c index a22a73abfa5..e1494fa1292 100644 --- a/arch/powerpc/lib/time.c +++ b/arch/powerpc/lib/time.c @@ -5,6 +5,7 @@ */ #include +#include #include /* ------------------------------------------------------------------------- */ diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index 31217623649..1ea9db6850f 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -11,6 +11,7 @@ #include "jr.h" #include "jobdesc.h" #include "desc_constr.h" +#include #ifdef CONFIG_FSL_CORENET #include #endif diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index bf8d52d5ad5..bbbd6ef5bfd 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -9,6 +9,7 @@ #include #include #include /* Functional interface */ +#include #include #include /* HW definitions */ #include diff --git a/include/common.h b/include/common.h index 1e77ed393e4..20d143deb81 100644 --- a/include/common.h +++ b/include/common.h @@ -288,10 +288,6 @@ int cleanup_before_linux_select(int flags); uint64_t get_ticks(void); void wait_ticks (unsigned long); -/* arch/$(ARCH)/lib/time.c */ -ulong usec2ticks (unsigned long usec); -ulong ticks2usec (unsigned long ticks); - /* lib/uuid.c */ #include diff --git a/include/time.h b/include/time.h index 1e9b369be7c..5c6a0fd032c 100644 --- a/include/time.h +++ b/include/time.h @@ -69,4 +69,20 @@ uint64_t usec_to_tick(unsigned long usec); (time_after_eq(a,b) && \ time_before(a,c)) +/** + * usec2ticks() - Convert microseconds to internal ticks + * + * @usec: Value of microseconds to convert + * @return Corresponding internal ticks value, calculated using get_tbclk() + */ +ulong usec2ticks(unsigned long usec); + +/** + * ticks2usec() - Convert internal ticks to microseconds + * + * @ticks: Value of ticks to convert + * @return Corresponding microseconds value, calculated using get_tbclk() + */ +ulong ticks2usec(unsigned long ticks); + #endif /* _TIME_H */ From patchwork Mon Sep 30 14:40:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169432 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="Pv2xLSOu"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hll71fKSz9s00 for ; Tue, 1 Oct 2019 00:53:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CF24EC21D72; Mon, 30 Sep 2019 14:45:48 +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 0037AC21DC1; Mon, 30 Sep 2019 14:41:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6FC68C21E9F; Mon, 30 Sep 2019 14:41:39 +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 204F8C21E1B for ; Mon, 30 Sep 2019 14:41:35 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id q1so39004017ion.1 for ; Mon, 30 Sep 2019 07:41:35 -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=F5QZT4T7lf1ahkmmLDGnKttgaDaN6m38/wIaFDyDb+E=; b=Pv2xLSOuBoQgRn9GPjYM8CEzIvItLqAZ1T2lXHYIQLLdP8rhQbpai1qm1CQCWDNSuH jL/wEulV+O9DyygXndkoiILwpktruyn9LU5c0BGrQGZtWe1Dv/48pIIHTUww+V+/kd6i Xs7lC9sPW1pj6Ki+499l0wO0cZe4UH5DHeFVY= 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=F5QZT4T7lf1ahkmmLDGnKttgaDaN6m38/wIaFDyDb+E=; b=Lv1O+14MKmOxf8JEcZNsTO2Zfw23JjDkjb+ux9H9yk+3/QpCuWIyEbPe1fsF5/by47 jjbbbvSruj8ACmPdmC2uPlG9wruAAeyTJp5cQhD5V1RlmX5YwBeIbU9nJ2jLqLOKSEu9 dlYEsePJrC0cCFj2xwfXrDlCFNnYyJcV8n8b7uOouQh/DxxvmVPZIm8G+ca9jBmi51jO OItFUuiMUH6hRRk9/i6ppOv9O1Hhhf8n2tnVuvlPhAkLpwR9WnezWPDJaeOYkf5MHApN +QnUHjFyjtBrJ3pMrb4VY05dtRzhAM+jdJVZQTUcules5vVns+4b+e2IlcM0MlOcxzaK dz9A== X-Gm-Message-State: APjAAAXPp93tDjdWQsl9slxifIFUueet7KesOMvoS4owtQqqlv12VNqf dfRB6/p2cdDiWK1eLfbsMplYWCKdsLY= X-Google-Smtp-Source: APXvYqx8BAjpAH8DaL+oIXkc+z+wP1JqWtk20puX37tTUd/Xpt+Kmt7do3DJrwtcU5YqX953S6RmvA== X-Received: by 2002:a6b:6110:: with SMTP id v16mr12099421iob.199.1569854493901; Mon, 30 Sep 2019 07:41:33 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:33 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:50 -0600 Message-Id: <20190930144112.175618-20-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 19/41] common: Move wait_ticks functions 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 time.h so move it over and add a comment. Signed-off-by: Simon Glass --- arch/arm/cpu/pxa/pxa2xx.c | 1 + drivers/timer/mpc83xx_timer.c | 1 + include/common.h | 1 - include/time.h | 9 +++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 0b28f0a3ef6..43c206b2459 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index dfbc8672b29..69949d53338 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 20d143deb81..091b54787f7 100644 --- a/include/common.h +++ b/include/common.h @@ -286,7 +286,6 @@ int cleanup_before_linux_select(int flags); /* arch/$(ARCH)/lib/ticks.S */ uint64_t get_ticks(void); -void wait_ticks (unsigned long); /* lib/uuid.c */ #include diff --git a/include/time.h b/include/time.h index 5c6a0fd032c..e740858f816 100644 --- a/include/time.h +++ b/include/time.h @@ -85,4 +85,13 @@ ulong usec2ticks(unsigned long usec); */ ulong ticks2usec(unsigned long ticks); +/** + * wait_ticks() - waits a given number of ticks + * + * This is an internal funciton. Normally you should use udelay() or mdelay() + * + * @ticks: Number of ticks to wait + */ +void wait_ticks(unsigned long ticks); + #endif /* _TIME_H */ From patchwork Mon Sep 30 14:40:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169427 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="FVpu2Zur"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlg843VSz9s7T for ; Tue, 1 Oct 2019 00:49:56 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1C602C21E08; Mon, 30 Sep 2019 14:48:20 +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 52301C21C93; Mon, 30 Sep 2019 14:42:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 17563C21EBA; Mon, 30 Sep 2019 14:41:39 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id F41F8C21E49 for ; Mon, 30 Sep 2019 14:41:35 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id w12so10842539iol.11 for ; Mon, 30 Sep 2019 07:41:35 -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=6jewAi2pWGlaIssZD/wnCSrccycsfGwTQmoTP5b9sGk=; b=FVpu2ZurxrJl1fZzJWcASlX3gLP3KYqyt02oI0ZZITip8zVCMuQSsqrJYy/KDO9eO9 rjLDE3Dhhuy74yTJwUSQrTAnGIxKFTTvPaoCdWhRcRl1AbTf/oYfjXQB8Pjy7t4OkgwQ FQwvzrApJUTnKcQgo7IghQ7z/uK5B7o1vj7p0= 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=6jewAi2pWGlaIssZD/wnCSrccycsfGwTQmoTP5b9sGk=; b=QSLLKVlHNTFuKbdHkROtCGFuqTDxKTNN+0aAW6tUUB6KrZs5yDkyywu0F6L1DdAaLE Bhqf8+elV2pLqCnit+EYOzDYqtZjZgP0JW6PBG64je7uxVehqiER+5mG8XhXk01SQ3/d Ur97Em/gNHeMzylk60OR+M3zZ0lObbTeyy5AcXFH36pQY3oVow9oy0HI2ULluMHwy3oY D2NNoZZIjdaO1cgiDbz7L89CCfLmp4NAPPlcDDIlyajSs9fpnSWaS8hnh2PSVUdvgew+ UVjZ+BCseUNKWGzE2qIlfsMj+Njaz23t4UqEJHNXkH2DIFdYY1mW8n2+6M1bWd5u9jj6 yZYQ== X-Gm-Message-State: APjAAAWOALIEZEhMd3jfCfzD9ZvAt0u3jbBG3nv3+MiJRUoes+V9qt/l DmitMLsl2sYhkb1T4n4UpZQEHXy9doY= X-Google-Smtp-Source: APXvYqyvODO0lLzZE2oBqPho85P2uiobqro1kpS6TYGXawYfEAOGitv7ZmcKOzWIQKCKNkIZNfRLXQ== X-Received: by 2002:a5e:c745:: with SMTP id g5mr21417922iop.9.1569854494758; Mon, 30 Sep 2019 07:41:34 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:34 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:51 -0600 Message-Id: <20190930144112.175618-21-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 20/41] common: Move timer_get_us() function 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 time.h so move it over and update the comment style. Signed-off-by: Simon Glass --- include/common.h | 3 --- include/time.h | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/common.h b/include/common.h index 091b54787f7..e68bed64078 100644 --- a/include/common.h +++ b/include/common.h @@ -251,9 +251,6 @@ void irq_install_handler(int, interrupt_handler_t *, void *); void irq_free_handler (int); void reset_timer (void); -/* Return value of monotonic microsecond timer */ -unsigned long timer_get_us(void); - void enable_interrupts (void); int disable_interrupts (void); diff --git a/include/time.h b/include/time.h index e740858f816..4d16f12d76a 100644 --- a/include/time.h +++ b/include/time.h @@ -94,4 +94,11 @@ ulong ticks2usec(unsigned long ticks); */ void wait_ticks(unsigned long ticks); +/** + * timer_get_us() - Get monotonic microsecond timer + * + * @return value of monotonic microsecond timer + */ +unsigned long timer_get_us(void); + #endif /* _TIME_H */ From patchwork Mon Sep 30 14:40:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169451 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="DGqsqdUJ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlvJ56XPz9s00 for ; Tue, 1 Oct 2019 01:00:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 71380C21EB1; Mon, 30 Sep 2019 14:50:12 +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 ED6E5C21F06; Mon, 30 Sep 2019 14:42:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 88B69C21D83; Mon, 30 Sep 2019 14:41:41 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 3AA60C21E08 for ; Mon, 30 Sep 2019 14:41:37 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id z19so39054030ior.0 for ; Mon, 30 Sep 2019 07:41:37 -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=Nu0pl6Ww5JV/yWLV95/8BjMQX74Gd7S+GM3lVA4vrOE=; b=DGqsqdUJt3wxV2kdEFkSX8GwoLBsUXDmnXl13FAYtiB6eFJGc+Mrcy/8i30tZa2eFr GFwpet9GbOd9S/fJlk88wmiOP1y8ubJQKFa3UML3ObKQ0ON9LySeI4FGLzOf5BYlt39G Hs5RG3cgbbamslJehZKRRJIghMNqwqc45DiQU= 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=Nu0pl6Ww5JV/yWLV95/8BjMQX74Gd7S+GM3lVA4vrOE=; b=Z/YLeXKqsSnuWIiB46wD4+vKpqHm0b4cBdbjW0DXaxNzg6b77Cinf+8I4/cYDsHOUG JfXQedTUObLnmtP5pXfuaedGMKu5xuV4b8ZWTzmoe32vM4OnOANxK8t6f0FUd0lhe9B8 78JKcPyn1XFiDEBH6DjPi6TuqhIV0++BsaEG54Lb6Te0Ipuu/NZ0P2xLBBZbLOE9cWcK wqbfHGAuqkcOhKrA7udSb4Gg9ErWK2J3BsWHPH8Wxws/dg3n0diIh8YbXaml1Ke7+haE fm34/jiWul08ZfLaY3O5YvZESj2LYyPVqqmqoYOhG5JCi88qjP7U+2IIajZszMlFGmKP b4LQ== X-Gm-Message-State: APjAAAUzwRYwJ9+WOfsJsFXU0WsiEkjHN0m3CROVWqcT5I6kjiBl8nel Nla2hg9VUL/TPR5IX0HL3YtkobdK7Ak= X-Google-Smtp-Source: APXvYqyYbUQyOVj7K/N+VcxxwYhUNkQPaH6urp9fAsMu9OW1tcKGHLtEw7odWtFeiV9sx2GbMX8l/Q== X-Received: by 2002:a6b:fe09:: with SMTP id x9mr1274980ioh.144.1569854495555; Mon, 30 Sep 2019 07:41:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:35 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:52 -0600 Message-Id: <20190930144112.175618-22-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 21/41] common: Move get_ticks() function 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 time.h so move it over and add a comment. Signed-off-by: Simon Glass --- arch/arm/cpu/arm920t/ep93xx/timer.c | 1 + arch/arm/cpu/arm920t/imx/timer.c | 1 + arch/arm/cpu/arm926ejs/armada100/timer.c | 1 + arch/arm/cpu/arm926ejs/lpc32xx/timer.c | 1 + arch/arm/cpu/arm926ejs/mx27/timer.c | 1 + arch/arm/cpu/arm926ejs/mxs/timer.c | 1 + arch/arm/cpu/arm926ejs/spear/timer.c | 1 + arch/arm/cpu/armv7/arch_timer.c | 1 + arch/arm/cpu/armv7/iproc-common/timer.c | 1 + arch/arm/cpu/armv7/s5p-common/timer.c | 1 + arch/arm/cpu/armv7/stv0991/timer.c | 1 + arch/arm/cpu/armv7/sunxi/timer.c | 1 + arch/arm/cpu/armv7/vf610/timer.c | 1 + arch/arm/cpu/armv7m/systick-timer.c | 1 + arch/arm/cpu/sa1100/timer.c | 1 + arch/arm/mach-at91/arm920t/timer.c | 1 + arch/arm/mach-davinci/timer.c | 1 + arch/arm/mach-omap2/timer.c | 1 + arch/arm/mach-orion5x/timer.c | 1 + arch/arm/mach-rmobile/timer.c | 1 + arch/arm/mach-socfpga/clock_manager_gen5.c | 1 + arch/arm/mach-sunxi/dram_helpers.c | 1 + arch/arm/mach-sunxi/p2wi.c | 1 + arch/arm/mach-sunxi/rsb.c | 1 + arch/arm/mach-tegra/clock.c | 1 + arch/microblaze/cpu/timer.c | 1 + arch/mips/mach-jz47xx/jz4780/timer.c | 1 + arch/nds32/cpu/n1213/ag101/timer.c | 1 + arch/sh/lib/time_sh2.c | 1 + arch/xtensa/lib/time.c | 1 + board/armltd/integrator/timer.c | 1 + board/broadcom/bcmstb/bcmstb.c | 1 + board/xilinx/versal/board.c | 1 + common/autoboot.c | 1 + common/bootretry.c | 1 + common/cli_readline.c | 1 + common/iotrace.c | 1 + drivers/clk/clk_stm32mp1.c | 1 + drivers/mailbox/mailbox-uclass.c | 1 + drivers/misc/tegra186_bpmp.c | 1 + drivers/mmc/bcm2835_sdhci.c | 1 + drivers/mmc/mxcmmc.c | 1 + drivers/net/pic32_eth.c | 1 + drivers/nvme/nvme.c | 1 + drivers/power/pmic/stpmic1.c | 1 + drivers/sound/broadwell_i2s.c | 1 + drivers/spi/ath79_spi.c | 1 + drivers/spi/exynos_spi.c | 1 + drivers/spi/rk_spi.c | 1 + drivers/spi/tegra114_spi.c | 1 + drivers/spi/tegra20_sflash.c | 1 + drivers/spi/tegra20_slink.c | 1 + drivers/spi/tegra210_qspi.c | 1 + drivers/spi/uniphier_spi.c | 1 + drivers/spi/zynq_spi.c | 1 + drivers/timer/tsc_timer.c | 1 + drivers/video/sunxi/sunxi_display.c | 1 + drivers/video/sunxi/sunxi_dw_hdmi.c | 1 + include/common.h | 7 ++----- include/time.h | 10 ++++++++++ lib/efi_loader/efi_boottime.c | 1 + lib/efi_loader/efi_console.c | 1 + lib/time.c | 1 + lib/trace.c | 1 + lib/uuid.c | 1 + net/nfs.c | 1 + post/post.c | 1 + test/time_ut.c | 1 + 68 files changed, 78 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c index 49bf49bbd36..4829c996be8 100644 --- a/arch/arm/cpu/arm920t/ep93xx/timer.c +++ b/arch/arm/cpu/arm920t/ep93xx/timer.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c index 96fff3f683f..17081ddb6d8 100644 --- a/arch/arm/cpu/arm920t/imx/timer.c +++ b/arch/arm/cpu/arm920t/imx/timer.c @@ -13,6 +13,7 @@ */ #include +#include #if defined (CONFIG_IMX) #include diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index d2ecbd07e2f..6c6948a8ef4 100644 --- a/arch/arm/cpu/arm926ejs/armada100/timer.c +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c index b3ca6860409..3a896d10ca5 100644 --- a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c +++ b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c index 94b5d454e92..f51f0df8ec7 100644 --- a/arch/arm/cpu/arm926ejs/mx27/timer.c +++ b/arch/arm/cpu/arm926ejs/mx27/timer.c @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c index 7492ba46dc7..226401dd6e2 100644 --- a/arch/arm/cpu/arm926ejs/mxs/timer.c +++ b/arch/arm/cpu/arm926ejs/mxs/timer.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c index e7b5bda1bc9..28c09e9fd67 100644 --- a/arch/arm/cpu/arm926ejs/spear/timer.c +++ b/arch/arm/cpu/arm926ejs/spear/timer.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c index 5de63053d59..2eb571050a3 100644 --- a/arch/arm/cpu/armv7/arch_timer.c +++ b/arch/arm/cpu/armv7/arch_timer.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c index aaa767db13c..668b5e11a68 100644 --- a/arch/arm/cpu/armv7/iproc-common/timer.c +++ b/arch/arm/cpu/armv7/iproc-common/timer.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index 0048cd8067c..e54cfb06dcb 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c index d1b763df8e3..695bdd7a5cc 100644 --- a/arch/arm/cpu/armv7/stv0991/timer.c +++ b/arch/arm/cpu/armv7/stv0991/timer.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c index 304c1ac5f9e..6bda5fbbb66 100644 --- a/arch/arm/cpu/armv7/sunxi/timer.c +++ b/arch/arm/cpu/armv7/sunxi/timer.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c index 821a279b630..f858de953d4 100644 --- a/arch/arm/cpu/armv7/vf610/timer.c +++ b/arch/arm/cpu/armv7/vf610/timer.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c index d04f67ae164..5c310d306d0 100644 --- a/arch/arm/cpu/armv7m/systick-timer.c +++ b/arch/arm/cpu/armv7m/systick-timer.c @@ -22,6 +22,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c index 0fac5c1707f..c6b1b2c1775 100644 --- a/arch/arm/cpu/sa1100/timer.c +++ b/arch/arm/cpu/sa1100/timer.c @@ -11,6 +11,7 @@ #include #include +#include static ulong get_timer_masked (void) { diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c index 6db541a7b3b..3aef9538b4a 100644 --- a/arch/arm/mach-at91/arm920t/timer.c +++ b/arch/arm/mach-at91/arm920t/timer.c @@ -14,6 +14,7 @@ */ #include +#include #include #include diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c index 99f1eabf5f8..9846463c606 100644 --- a/arch/arm/mach-davinci/timer.c +++ b/arch/arm/mach-davinci/timer.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 87b674e6948..dbb68f718d6 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -16,6 +16,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c index 6aaf94ae087..9da97838220 100644 --- a/arch/arm/mach-orion5x/timer.c +++ b/arch/arm/mach-orion5x/timer.c @@ -8,6 +8,7 @@ */ #include +#include #include #define UBOOT_CNTR 0 /* counter to use for uboot timer */ diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c index bf74955793f..9fcab446a5d 100644 --- a/arch/arm/mach-rmobile/timer.c +++ b/arch/arm/mach-rmobile/timer.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/clock_manager_gen5.c b/arch/arm/mach-socfpga/clock_manager_gen5.c index 3a646008612..54a821a27f7 100644 --- a/arch/arm/mach-socfpga/clock_manager_gen5.c +++ b/arch/arm/mach-socfpga/clock_manager_gen5.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c index 239ab421a8b..520b597fcc0 100644 --- a/arch/arm/mach-sunxi/dram_helpers.c +++ b/arch/arm/mach-sunxi/dram_helpers.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-sunxi/p2wi.c b/arch/arm/mach-sunxi/p2wi.c index e84e1d8d5c8..7c5c12254ea 100644 --- a/arch/arm/mach-sunxi/p2wi.c +++ b/arch/arm/mach-sunxi/p2wi.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-sunxi/rsb.c b/arch/arm/mach-sunxi/rsb.c index 005ca58db58..01bb09b7478 100644 --- a/arch/arm/mach-sunxi/rsb.c +++ b/arch/arm/mach-sunxi/rsb.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index e539ad8b30a..31b6aa2cfc8 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index 58e5c307508..805eac7fa3f 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c index a689b9d71ac..988ebd26715 100644 --- a/arch/mips/mach-jz47xx/jz4780/timer.c +++ b/arch/mips/mach-jz47xx/jz4780/timer.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c index dfec5b3e96b..cbfe07e3514 100644 --- a/arch/nds32/cpu/n1213/ag101/timer.c +++ b/arch/nds32/cpu/n1213/ag101/timer.c @@ -9,6 +9,7 @@ */ #ifndef CONFIG_TIMER #include +#include #include #include diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c index 14bef6b45bc..d82c1d2feb3 100644 --- a/arch/sh/lib/time_sh2.c +++ b/arch/sh/lib/time_sh2.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c index 81459b4c287..62bbe37b806 100644 --- a/arch/xtensa/lib/time.c +++ b/arch/xtensa/lib/time.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c index 7ecfa49c70a..e65ae997fd6 100644 --- a/board/armltd/integrator/timer.c +++ b/board/armltd/integrator/timer.c @@ -18,6 +18,7 @@ #include #include +#include #ifdef CONFIG_ARCH_CINTEGRATOR #define DIV_CLOCK_INIT 1 diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index 5fc2c0591b8..23500dfa698 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -6,6 +6,7 @@ * Author: Thomas Fitzsimmons */ +#include #include #include #include diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 90751477b5e..50013c83cc9 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/common/autoboot.c b/common/autoboot.c index b28bd6823d8..8faac2005df 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/common/bootretry.c b/common/bootretry.c index 47aaaa82201..dac891fbc5e 100644 --- a/common/bootretry.c +++ b/common/bootretry.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #ifndef CONFIG_BOOT_RETRY_MIN diff --git a/common/cli_readline.c b/common/cli_readline.c index ea510ed6395..6ef7a3e5642 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -11,6 +11,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/iotrace.c b/common/iotrace.c index deb0b358ce3..74b07e8c5f3 100644 --- a/common/iotrace.c +++ b/common/iotrace.c @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c index e223f84eac0..3718970dc7c 100644 --- a/drivers/clk/clk_stm32mp1.c +++ b/drivers/clk/clk_stm32mp1.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c index 1b4a5863c9e..efd601615a0 100644 --- a/drivers/mailbox/mailbox-uclass.c +++ b/drivers/mailbox/mailbox-uclass.c @@ -7,6 +7,7 @@ #include #include #include +#include static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev) { diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c index b3ed03e9dab..89e27dd526a 100644 --- a/drivers/misc/tegra186_bpmp.c +++ b/drivers/misc/tegra186_bpmp.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index bc9ee95fd5c..39c93db2754 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mmc/mxcmmc.c b/drivers/mmc/mxcmmc.c index dcf17c5d60e..269882b2027 100644 --- a/drivers/mmc/mxcmmc.c +++ b/drivers/mmc/mxcmmc.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c index 5c706c04c5e..b0f76771545 100644 --- a/drivers/net/pic32_eth.c +++ b/drivers/net/pic32_eth.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 47f101e2808..f279c758683 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "nvme.h" diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c index de31934f41a..2297af4157a 100644 --- a/drivers/power/pmic/stpmic1.c +++ b/drivers/power/pmic/stpmic1.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c index 998792b2399..3d577401bdd 100644 --- a/drivers/sound/broadwell_i2s.c +++ b/drivers/sound/broadwell_i2s.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "broadwell_i2s.h" diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c index 4fd3c050e8e..dffd91cb740 100644 --- a/drivers/spi/ath79_spi.c +++ b/drivers/spi/ath79_spi.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c index a9691c7603a..d682a11013a 100644 --- a/drivers/spi/exynos_spi.c +++ b/drivers/spi/exynos_spi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c index a68553b75bf..c04535ac445 100644 --- a/drivers/spi/rk_spi.c +++ b/drivers/spi/rk_spi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c index 5c35c22592c..bb34b20f545 100644 --- a/drivers/spi/tegra114_spi.c +++ b/drivers/spi/tegra114_spi.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c index a54b10fdebf..84ece6f18ad 100644 --- a/drivers/spi/tegra20_sflash.c +++ b/drivers/spi/tegra20_sflash.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c index d55e833cc24..ae2fc3e76dc 100644 --- a/drivers/spi/tegra20_slink.c +++ b/drivers/spi/tegra20_slink.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c index e4b82767f82..d82ecaa61fa 100644 --- a/drivers/spi/tegra210_qspi.c +++ b/drivers/spi/tegra210_qspi.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c index ef02d07aa46..e47b969864b 100644 --- a/drivers/spi/uniphier_spi.c +++ b/drivers/spi/uniphier_spi.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c index 2a02942d413..0b2b2f48103 100644 --- a/drivers/spi/zynq_spi.c +++ b/drivers/spi/zynq_spi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index 919caba8a14..6617f906780 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index 46436b88c57..c45b3ebe6ea 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 66a319187c2..c87c919a52a 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index e68bed64078..cc5f13ec7e7 100644 --- a/include/common.h +++ b/include/common.h @@ -3,8 +3,8 @@ * Common header file for U-Boot * * This file still includes quite a bit of stuff that should be in separate - * headers like command.h, cpu.h and timer.h. Please think before adding more - * things. Patches to remove things are welcome. + * headers like command.h and cpu.h. Please think before adding more things. + * Patches to remove things are welcome. * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -281,9 +281,6 @@ enum { */ int cleanup_before_linux_select(int flags); -/* arch/$(ARCH)/lib/ticks.S */ -uint64_t get_ticks(void); - /* lib/uuid.c */ #include diff --git a/include/time.h b/include/time.h index 4d16f12d76a..b8de1d468c9 100644 --- a/include/time.h +++ b/include/time.h @@ -101,4 +101,14 @@ void wait_ticks(unsigned long ticks); */ unsigned long timer_get_us(void); +/** + * get_ticks() - Get the current tick value + * + * This is an internal value used by the timer on the system. Ticks increase + * monotonically at the rate given by get_tbclk(). + * + * @return current tick value + */ +uint64_t get_ticks(void); + #endif /* _TIME_H */ diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index ea52b9539d5..265297ed46f 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index a55e4b33ece..218f7caa12f 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/lib/time.c b/lib/time.c index f5751ab162b..ffc4f3ccf1b 100644 --- a/lib/time.c +++ b/lib/time.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/trace.c b/lib/trace.c index f2402b93593..6716c7c2f09 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/lib/uuid.c b/lib/uuid.c index a48e19c06ea..3d3c7abcaea 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/net/nfs.c b/net/nfs.c index aca0ca55f3f..97e62f1dceb 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -33,6 +33,7 @@ #include #include "nfs.h" #include "bootp.h" +#include #define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 diff --git a/post/post.c b/post/post.c index fb751d9a83a..f27138ddaaf 100644 --- a/post/post.c +++ b/post/post.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/test/time_ut.c b/test/time_ut.c index 28c934e4268..40a19a50d93 100644 --- a/test/time_ut.c +++ b/test/time_ut.c @@ -7,6 +7,7 @@ #include #include #include +#include static int test_get_timer(void) { From patchwork Mon Sep 30 14:40:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169438 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="RepDpv5m"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlrg63V7z9s7T for ; Tue, 1 Oct 2019 00:58:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7D3BBC21E50; Mon, 30 Sep 2019 14:49:26 +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 722ABC21EFB; Mon, 30 Sep 2019 14:42:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A210DC21E35; Mon, 30 Sep 2019 14:41:41 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 7E91CC21DED for ; Mon, 30 Sep 2019 14:41:37 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id q10so39036506iop.2 for ; Mon, 30 Sep 2019 07:41:37 -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=yFenhxvDWwP4T0wl+lAmYHZ0h6lla0VUK4rt3ZM/XZ4=; b=RepDpv5mdDlxMDZ82/Rc5eXvyr+a6DP+aKnUsH1vsrna/XmGv/T4je+hW9epsb4y9M teQ5Onac632fsq+zV2O+CKPPpA1e01nQ7wSgjOhHZMOuDz440d9qe5GwKUJLtayRUmlN qgs2rzC2cZzI6Ns4gkfA9tPDQc9aNzDJvnyY4= 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=yFenhxvDWwP4T0wl+lAmYHZ0h6lla0VUK4rt3ZM/XZ4=; b=KuOkbdoxcFUiHBYxgmVqjDVCh3J9w6yzG1hPmTVNY9OYB+HyjfIG+mrctcZZV4ugRV Qa4Tz1YUmmij3sZl159NTIlhrymK8mjlaLi+2kaTCHrvHQA1GLi7VlVZx8KeHBL7Qw4x YrlTRikLBWPUr81Mc7RB+4YjN5BFBMObe4znDCCEJ7I+tDXGNbxRl3h+Ct9IU0GLvmcv 3nqtHizKIYwvZO4+SvlKxtmgEHSE9v/orUrEiy9i66js9aDr6yBpejuU7JJTQcwrJNIh xXNlItHcPIrxk9dUhk7ePFY54nlOhL47R2XJzI4DLr+sRm2xOUXSS5jF57U5Jhb2D1pb bOnQ== X-Gm-Message-State: APjAAAUjJ/Scm1va4atna1JSxNGz12iZlFTxeaB4atmBBNmn5y05aSgi Y1jp6xxFwrS17N6yRXUa6VTvveMmPC4= X-Google-Smtp-Source: APXvYqy345R+o3Ps0wZQlF2XVwcvME7jM0IySUMsxcb2bXSGZRPrMb/Xc/GG97WxPLhPi2fcA96ztg== X-Received: by 2002:a6b:b792:: with SMTP id h140mr21241825iof.225.1569854496266; Mon, 30 Sep 2019 07:41:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:35 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:53 -0600 Message-Id: <20190930144112.175618-23-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 22/41] common: Move mii_init() function 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 mii.h so move it over. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + drivers/net/fsl_mcdmafec.c | 1 + drivers/net/ldpaa_eth/ls1088a.c | 1 + drivers/net/ldpaa_eth/lx2160a.c | 1 + drivers/net/mcffec.c | 1 + drivers/net/mcfmii.c | 1 + drivers/net/mpc8xx_fec.c | 1 + drivers/net/pic32_eth.c | 1 + include/common.h | 3 --- include/linux/mii.h | 2 ++ 10 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index fbbabc23a77..705b66cd2a3 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -39,6 +39,7 @@ #include #endif #endif +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index e66fb16de87..b2936b78d7b 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -14,6 +14,7 @@ #include #include #include +#include #undef ET_DEBUG #undef MII_DEBUG diff --git a/drivers/net/ldpaa_eth/ls1088a.c b/drivers/net/ldpaa_eth/ls1088a.c index c3260d318cc..54cb16e51b1 100644 --- a/drivers/net/ldpaa_eth/ls1088a.c +++ b/drivers/net/ldpaa_eth/ls1088a.c @@ -8,6 +8,7 @@ #include #include #include +#include u32 dpmac_to_devdisr[] = { [WRIOP1_DPMAC1] = FSL_CHASSIS3_DEVDISR2_DPMAC1, diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c index 1fbeb0d14b6..9432b6eb85c 100644 --- a/drivers/net/ldpaa_eth/lx2160a.c +++ b/drivers/net/ldpaa_eth/lx2160a.c @@ -8,6 +8,7 @@ #include #include #include +#include u32 dpmac_to_devdisr[] = { [WRIOP1_DPMAC1] = FSL_CHASSIS3_DEVDISR2_DPMAC1, diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index fb930412569..9a3a8455a11 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -18,6 +18,7 @@ #include #include +#include #undef ET_DEBUG #undef MII_DEBUG diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 961618b4109..b8af2cc44be 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -15,6 +15,7 @@ #include #endif #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c index f45f1e46773..0a809851922 100644 --- a/drivers/net/mpc8xx_fec.c +++ b/drivers/net/mpc8xx_fec.c @@ -13,6 +13,7 @@ #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c index b0f76771545..39c4b10ab83 100644 --- a/drivers/net/pic32_eth.c +++ b/drivers/net/pic32_eth.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "pic32_eth.h" diff --git a/include/common.h b/include/common.h index cc5f13ec7e7..992675100d5 100644 --- a/include/common.h +++ b/include/common.h @@ -254,9 +254,6 @@ void reset_timer (void); void enable_interrupts (void); int disable_interrupts (void); -/* $(CPU)/.../ */ -void mii_init (void); - /* arch/$(ARCH)/lib/cache.c */ void enable_caches(void); void flush_cache (unsigned long, unsigned long); diff --git a/include/linux/mii.h b/include/linux/mii.h index 21db032340e..49e29ac314a 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h @@ -225,4 +225,6 @@ static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv) return cap; } +void mii_init(void); + #endif /* __LINUX_MII_H__ */ From patchwork Mon Sep 30 14:40:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169440 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="FjVjvGwe"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlsT3Jctz9s7T for ; Tue, 1 Oct 2019 00:58:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 17341C21EB9; Mon, 30 Sep 2019 14:53:14 +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 8CD6FC21EE7; Mon, 30 Sep 2019 14:42:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 38422C21EE5; Mon, 30 Sep 2019 14:41:44 +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 3F2DCC21DB5 for ; Mon, 30 Sep 2019 14:41:38 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id a1so38964979ioc.6 for ; Mon, 30 Sep 2019 07:41:38 -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=efgwREJiTJbaAnmOMDWDOTWUnPwUmd6vWJxkb/n+xzA=; b=FjVjvGwee7kmx4kMM0NWppqczckmZJrgmRaDWCJj2ugJ0cmfS8ei3zE3I9s9ZdCwz8 D/ycDM2DFFJHT1nG9Hk1wvP4jD1Op0kaC7Dd6jJomz0tcb44G6s9tvfbQJbVGDAjW5Dr Zeg/ehYs5SG64sRUAGnNMoHeRkThzkmgPuDhw= 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=efgwREJiTJbaAnmOMDWDOTWUnPwUmd6vWJxkb/n+xzA=; b=itlalWGhRhDUYfyjdj45TOr+7vqJ8+Yewc9YJrbWaI3txgCv1YL6+1zEShHbVFR8BD ih7tkuHRoO1Bil0WdOnx6Ue8MHdjKhSSNzhQCYYQR4utHe4vwse4D0Ag/n9oXy9J32eL 2PwNxQ6MxHE0Z85nmAcgqPu5qZ55IsomWjNtqjmyjGweNNqIVE+xBWzYR6b9c/GLXTOm t5IQoUfVJCxge7rIZnz51QT7cc7TBcjo1YQisYY6a6BG7Lh1XkSvq1p4k1wB32+oiZ/2 wYyIW2Fme9sZJkpol/Znz8AyUHSd22bGtf2CCXu8dbFv+EEqBBsMnZ9CxsvVBGU07Act hMVA== X-Gm-Message-State: APjAAAUaEG2mSN9M3++XmhexMr7AQaSljVb5Yk84tR0MNQKBE0KkmQSM 5OsnUySud3tK4+6Dsy9QrzWtOHEbok8= X-Google-Smtp-Source: APXvYqzBaf/+3ExyqqJ8K0l3MH0yYJ84/ailrP9Qtamas+t5QtQ8hHVjXiGjP9aHEvwB24B3s84BPQ== X-Received: by 2002:a6b:e007:: with SMTP id z7mr12006175iog.167.1569854497009; Mon, 30 Sep 2019 07:41:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:36 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:54 -0600 Message-Id: <20190930144112.175618-24-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 23/41] common: Move some CPU functions 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" These functions belong in cpu_legacy.h since they do not use driver model. Move them over. Don't bother adding comments since these functions should be deleted. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + .../armv8/fsl-layerscape/fsl_lsch2_speed.c | 1 + .../armv8/fsl-layerscape/fsl_lsch3_speed.c | 1 + arch/arm/cpu/armv8/s32v234/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/speed.c | 1 + arch/powerpc/cpu/mpc86xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xxx/cpu.c | 1 + arch/powerpc/cpu/mpc8xxx/fdt.c | 1 + board/freescale/qemu-ppce500/qemu-ppce500.c | 1 + include/common.h | 20 ------------------- include/cpu_legacy.h | 19 ++++++++++++++++++ 11 files changed, 28 insertions(+), 20 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 705b66cd2a3..b52f3694e05 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c index df4df9aca79..500c06642bd 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c index b3e67321b48..d14b3087181 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c index b4cb67a66a3..bc4b8bf86f1 100644 --- a/arch/arm/cpu/armv8/s32v234/cpu.c +++ b/arch/arm/cpu/armv8/s32v234/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index acc2f2bb818..c6026f33811 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index 1c3c78217cb..5ee3a56b47b 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 467eac4a2e2..333dfa30904 100644 --- a/arch/powerpc/cpu/mpc8xxx/cpu.c +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index 0d877c43be8..40ee46c24a0 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index fb36d8366c9..6814bed27c7 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 992675100d5..4de05032b2b 100644 --- a/include/common.h +++ b/include/common.h @@ -203,26 +203,6 @@ void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); ulong get_endaddr (void); void trap_init (ulong); -/* $(CPU)/cpu.c */ -static inline int cpumask_next(int cpu, unsigned int mask) -{ - for (cpu++; !((1 << cpu) & mask); cpu++) - ; - - return cpu; -} - -#define for_each_cpu(iter, cpu, num_cpus, mask) \ - for (iter = 0, cpu = cpumask_next(-1, mask); \ - iter < num_cpus; \ - iter++, cpu = cpumask_next(cpu, mask)) \ - -int cpu_numcores (void); -int cpu_num_dspcores(void); -u32 cpu_mask (void); -u32 cpu_dsp_mask(void); -int is_core_valid (unsigned int); - void s_init(void); int checkcpu (void); diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h index a99b69b9764..75b93bc11ee 100644 --- a/include/cpu_legacy.h +++ b/include/cpu_legacy.h @@ -20,4 +20,23 @@ int cpu_reset(u32 nr); int cpu_disable(u32 nr); int cpu_release(u32 nr, int argc, char * const argv[]); +static inline int cpumask_next(int cpu, unsigned int mask) +{ + for (cpu++; !((1 << cpu) & mask); cpu++) + ; + + return cpu; +} + +#define for_each_cpu(iter, cpu, num_cpus, mask) \ + for (iter = 0, cpu = cpumask_next(-1, mask); \ + iter < num_cpus; \ + iter++, cpu = cpumask_next(cpu, mask)) \ + +int cpu_numcores(void); +int cpu_num_dspcores(void); +u32 cpu_mask(void); +u32 cpu_dsp_mask(void); +int is_core_valid(unsigned int core); + #endif From patchwork Mon Sep 30 14:40:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169430 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="CIKYISV9"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlk239BYz9s00 for ; Tue, 1 Oct 2019 00:52:26 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2673FC21E52; Mon, 30 Sep 2019 14:48:46 +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 54D70C21EE3; Mon, 30 Sep 2019 14:42:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 72216C21EBA; Mon, 30 Sep 2019 14:41:48 +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 02B8DC21E0D for ; Mon, 30 Sep 2019 14:41:39 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id u8so38927546iom.5 for ; Mon, 30 Sep 2019 07:41:38 -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=+F+R61UUxJACyr35/tfBouMLxm3PSzuD/NXksd/1n2U=; b=CIKYISV9s7mT2IdeMM4gRbYq2eUmDNukV0NPa01ALtsxOCvKuI1x3xkMYaUA8gkZod 0KUmVrn9SkkH95MJHcYKlIAM5wEq5hZ4jZbh32K8aaWUNiAT7a4k9qSXsWpx23kfvXGG ECEygem3mO6ePu3DEUIHWZgs72L3Mt5d8E2Fo= 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=+F+R61UUxJACyr35/tfBouMLxm3PSzuD/NXksd/1n2U=; b=QP+5s9DeNyfMmU3x8B8mhz3hspnMDdnVTaK7VepPE5iK07S4m34E9jpn5tc2wTQx30 nI86WaHmODtG9t5QIPDcro607LZFpO8SstfGLx5Th+MRGvcrap1VZ5J5V175q/UZL9Q2 3/J+0nDfDgcE2+txr+5nZVrj54u+kwHs3XLh12Pb/YtZzT8kXLwvWDHJc24haXS10F+X +vQziyuEs0EoE3vCIUXYMk3X7o61zkJt7sDXuqWeTWBhVb9V+wvp6tdWicVY3hmK70Cb QsHKn7SEpcpIcD+Qqr9hh8gFpz7jM7WO8U6kQEpTgBQm9yrQOyMYUczdYRvZfzpM562B JCiQ== X-Gm-Message-State: APjAAAVb33V0wH0VWCoswCcU4E9vq/0kCg5AyKW6yDnhDwn7eBHgTon2 Vun3pMaA8npQ9NJASMVPraUiS8/pbJ8= X-Google-Smtp-Source: APXvYqy4iFgR+TmDjRyz/6EZQeO0BnFru/PLrNBGrz35NMNZjkHewf3qzt9j+27VXcROSEYShbKF2w== X-Received: by 2002:a02:6616:: with SMTP id k22mr19218427jac.129.1569854497758; Mon, 30 Sep 2019 07:41:37 -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:37 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:55 -0600 Message-Id: <20190930144112.175618-25-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 24/41] common: Drop cpu_init() 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 is not defined anywhere. Drop it. Signed-off-by: Simon Glass --- include/common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/common.h b/include/common.h index 4de05032b2b..ce08bfe11fe 100644 --- a/include/common.h +++ b/include/common.h @@ -64,8 +64,6 @@ typedef void (interrupt_handler_t)(void *); */ void hang (void) __attribute__ ((noreturn)); -int cpu_init(void); - #include /* common/main.c */ 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 From patchwork Mon Sep 30 14:40:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169434 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="PdEthsYX"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlp56GV7z9s00 for ; Tue, 1 Oct 2019 00:55:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0CB31C21E57; Mon, 30 Sep 2019 14:49:39 +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 07779C21E47; Mon, 30 Sep 2019 14:42:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F1B42C21EBA; Mon, 30 Sep 2019 14:41:52 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 9EE66C21E26 for ; Mon, 30 Sep 2019 14:41:40 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id b136so38940021iof.3 for ; Mon, 30 Sep 2019 07:41:40 -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=5Z55uPPQtRd19NVAujevVCh7lqDzVEhOa1POPXUwjmI=; b=PdEthsYXv94VL+WVjiFGYuNqMaUWBKqdUdXqy460BLZms0I8JC3l4U1eJTbFvonUM/ okkt+iKrJkieI//iFmjfhoiqK6hEmbLRwDjfJobG4U4dsXZjYlud887+n3qxjH8BoDH5 9gnZC6PKDpxaK7JolTAO2t24LXffJPWyXweto= 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=5Z55uPPQtRd19NVAujevVCh7lqDzVEhOa1POPXUwjmI=; b=VMtCHONF2v0kMU/o/V5n3lWOGgzRXNXpo7EYCUyjlSXfSqKT1NomHZRZ7OrF9w5jEy UJNjvZQQLxjU1UnQ+LxirwRryJfDNywcRLiWYwzsWVN4tLRNcIBUjoekYD9ZiL8ZXx3d EhlapJQx7kvh34ELeK8eA1qkHwx6rWwMq1N9NJrOFH1QWnQL6JTYEGpssX+JHI+BaAPj 5ZNRCVUuIOpuw3bqiuBOSA+QZ8sQ3WiLx6z+pKwMEK/pwd9J1d+XbftvIpatPmtS/M/H EIPucJejxEbipvJ3VhWBuexRaugNKfX9oFxwR90EeGmq5AZTjTdNBTb4wV5QslxFeW9B 03tg== X-Gm-Message-State: APjAAAVuMsZcRKrJVN/xeGRL3C+7rfpEorgiW5A0bMpwHOV7IK/3uqw1 asV0v/Q4MOS4KY7EI5esnd3BMcZAmpc= X-Google-Smtp-Source: APXvYqyLIsvys5ysk1BT+pmHtEKKqGlcoWA/XggTDCQ4JzJq7pI8EshVwqyWJJksltyMaxAo478/OQ== X-Received: by 2002:a05:6638:928:: with SMTP id 8mr19158455jak.124.1569854499251; Mon, 30 Sep 2019 07:41:39 -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.38 (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:57 -0600 Message-Id: <20190930144112.175618-27-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 26/41] common: Move some SMP functions 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" These functions belong in cpu_legacy.h so move them over. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/ls102xa/cpu.c | 1 + arch/arm/cpu/armv7/virt-v7.c | 1 + arch/arm/lib/bootm.c | 1 + arch/arm/mach-uniphier/arm32/psci.c | 1 + board/armltd/vexpress/vexpress_common.c | 1 + board/broadcom/bcm_ep/board.c | 1 + board/samsung/arndale/arndale.c | 1 + board/synopsys/axs10x/axs10x.c | 1 + board/xilinx/zynqmp/zynqmp.c | 1 + cmd/elf.c | 1 + include/common.h | 3 --- include/cpu_legacy.h | 3 +++ 12 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index ec9984db795..0c61f31516d 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c index be14eb9376f..1f01a7fd197 100644 --- a/arch/arm/cpu/armv7/virt-v7.c +++ b/arch/arm/cpu/armv7/virt-v7.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 1638f1e81d7..af774a53c27 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c index ef35923f6ac..7f9c9d1fe59 100644 --- a/arch/arm/mach-uniphier/arm32/psci.c +++ b/arch/arm/mach-uniphier/arm32/psci.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c index 30b9dbbe8a7..25da4c39046 100644 --- a/board/armltd/vexpress/vexpress_common.c +++ b/board/armltd/vexpress/vexpress_common.c @@ -16,6 +16,7 @@ * Philippe Robin, */ #include +#include #include #include #include diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c index b2469dcb52a..0c3aa3b05f5 100644 --- a/board/broadcom/bcm_ep/board.c +++ b/board/broadcom/bcm_ep/board.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index d06ab8f3c0c..0d33f5c4491 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c index 7c4fcf281cb..bd39d0c7d81 100644 --- a/board/synopsys/axs10x/axs10x.c +++ b/board/synopsys/axs10x/axs10x.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index d649daba96d..babec5f34fd 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/cmd/elf.c b/cmd/elf.c index 538562fda58..690c61791d4 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 96bb42ce71c..3f6a95d7e02 100644 --- a/include/common.h +++ b/include/common.h @@ -212,9 +212,6 @@ void reset_cpu (ulong addr); void ft_cpu_setup(void *blob, bd_t *bd); void ft_pci_setup(void *blob, bd_t *bd); -void smp_set_core_boot_addr(unsigned long addr, int corenr); -void smp_kick_all_cpus(void); - /* $(CPU)/speed.c */ int get_clocks (void); ulong get_bus_freq (ulong); diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h index 03feaa63e96..1741f7f7a63 100644 --- a/include/cpu_legacy.h +++ b/include/cpu_legacy.h @@ -49,4 +49,7 @@ int is_core_valid(unsigned int core); */ int checkcpu(void); +void smp_set_core_boot_addr(unsigned long addr, int corenr); +void smp_kick_all_cpus(void); + #endif From patchwork Mon Sep 30 14:40:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169443 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="f8Nm3Xo5"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hltN4c4Tz9s7T for ; Tue, 1 Oct 2019 00:59:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2645DC21EF2; Mon, 30 Sep 2019 14:48:33 +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 C6E3BC21DFB; Mon, 30 Sep 2019 14:42:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 47323C21E0D; Mon, 30 Sep 2019 14:41:53 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 68178C21E16 for ; Mon, 30 Sep 2019 14:41:41 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id v2so38842687iob.10 for ; Mon, 30 Sep 2019 07:41:41 -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=ubiiGG2t9WdkTdnjk+dOtFQAiDpB+gKccqCmR0lfDqQ=; b=f8Nm3Xo568ZYM/ZFSRKlCx5IBHU0Tf7aZmve/HDG/i1f3gTBZnb8PsUkfzqGY6tgff WqqF5zQsGCIMMvuqUkXX6hFf7QSzKYQqVQ41zrMhCY4G3zFUSOTzxAfEy8AuuZu9r0W1 D3rktzy4owYw6rF1YGz1BKIal+gIdbTvxPP/k= 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=ubiiGG2t9WdkTdnjk+dOtFQAiDpB+gKccqCmR0lfDqQ=; b=art3D4iGaV0H9tB/wNuLs2+6SboJ6XE3lnfmgznlVdNjnBPe80zd1lc/5TSdoeGacj Qd/O/1yKtBQPTVvkqAuoUpQQ5z/2rRxMGSv/nydPuppLqZUkrr0M15dSRx5KrfatOufm o9W+0377JbKhDK5LnQ0fB3b7y4QfgnKTsAPQNvsWWEfCdna3Z0o4mY4Im0uFF1q7AfPZ MIwV1CxTikqrPqqHBbRt6xLMQjUVp+oDg4oZE1MS+HixK7gpPplNXU2rAH5qSUHkozhO hwVh74PnNEXsQW3vb70SAj2w9iHeUKW7GuwLb3yhaa1Ulf4k5S7bKdlSYz50zaBZSQc1 eg+A== X-Gm-Message-State: APjAAAWtbgMze3IOZCRGALvQEo8MN8LvE32JD3Fbe7pEFVSDNyh7UxZs xP4Kmq9HMJ4o7m1TnZz2KBoFz9muzT0= X-Google-Smtp-Source: APXvYqxJzcsuNGNyJjvJITakIyMclo3EKGNsCGFpyUYzRoXmeRLjcFE0PmAap2n6rGNUDnnCdq9w8w== X-Received: by 2002:a92:6506:: with SMTP id z6mr20889231ilb.161.1569854500171; Mon, 30 Sep 2019 07:41:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:39 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:58 -0600 Message-Id: <20190930144112.175618-28-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 , Andy Fleming , Stefan Roese Subject: [U-Boot] [PATCH 27/41] arm: powerpc: Tidy up code style for cache functions 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" Remove the unwanted space before the bracket. Signed-off-by: Simon Glass --- arch/arm/lib/cache-cp15.c | 12 ++++++------ arch/microblaze/cpu/cache.c | 18 +++++++++++------- board/armltd/integrator/integrator.c | 2 +- board/cobra5272/flash.c | 12 ++++++------ include/common.h | 2 +- post/lib_powerpc/cpu.c | 6 +++--- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index b2913e8165a..fc6d69134ce 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -247,17 +247,17 @@ static void cache_disable(uint32_t cache_bit) #endif #if CONFIG_IS_ENABLED(SYS_ICACHE_OFF) -void icache_enable (void) +void icache_enable(void) { return; } -void icache_disable (void) +void icache_disable(void) { return; } -int icache_status (void) +int icache_status(void) { return 0; /* always off */ } @@ -279,17 +279,17 @@ int icache_status(void) #endif #if CONFIG_IS_ENABLED(SYS_DCACHE_OFF) -void dcache_enable (void) +void dcache_enable(void) { return; } -void dcache_disable (void) +void dcache_disable(void) { return; } -int dcache_status (void) +int dcache_status(void) { return 0; /* always off */ } diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c index eebeb37830b..94114555ff5 100644 --- a/arch/microblaze/cpu/cache.c +++ b/arch/microblaze/cpu/cache.c @@ -8,7 +8,7 @@ #include #include -int dcache_status (void) +int dcache_status(void) { int i = 0; int mask = 0x80; @@ -18,7 +18,7 @@ int dcache_status (void) return i; } -int icache_status (void) +int icache_status(void) { int i = 0; int mask = 0x20; @@ -28,28 +28,32 @@ int icache_status (void) return i; } -void icache_enable (void) { +void icache_enable(void) +{ MSRSET(0x20); } -void icache_disable(void) { +void icache_disable(void) +{ /* we are not generate ICACHE size -> flush whole cache */ flush_cache(0, 32768); MSRCLR(0x20); } -void dcache_enable (void) { +void dcache_enable(void) +{ MSRSET(0x80); } -void dcache_disable(void) { +void dcache_disable(void) +{ #ifdef XILINX_USE_DCACHE flush_cache(0, XILINX_DCACHE_BYTE_SIZE); #endif MSRCLR(0x80); } -void flush_cache (ulong addr, ulong size) +void flush_cache(ulong addr, ulong size) { int i; for (i = 0; i < size; i += 4) diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index 0a2baa72976..f0fbe2b4176 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -109,7 +109,7 @@ extern void cm_remap(void); writel(SC_CTRL_FLASHVPP | SC_CTRL_FLASHWP, SC_CTRLS); #endif - icache_enable (); + icache_enable(); return 0; } diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index e5edc2a0401..9bf824889a1 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -164,8 +164,8 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) * chip is in programming mode. */ - cflag = icache_status (); - icache_disable (); + cflag = icache_status(); + icache_disable(); iflag = disable_interrupts (); printf ("\n"); @@ -237,7 +237,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) enable_interrupts (); if (cflag) - icache_enable (); + icache_enable(); return rc; } @@ -267,8 +267,8 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) * chip is in programming mode. */ - cflag = icache_status (); - icache_disable (); + cflag = icache_status(); + icache_disable(); iflag = disable_interrupts (); MEM_FLASH_ADDR1 = CMD_UNLOCK1; @@ -303,7 +303,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) enable_interrupts (); if (cflag) - icache_enable (); + icache_enable(); return rc; } diff --git a/include/common.h b/include/common.h index 3f6a95d7e02..82b1abe698d 100644 --- a/include/common.h +++ b/include/common.h @@ -189,7 +189,7 @@ int testdram(void); int icache_status (void); void icache_enable (void); void icache_disable(void); -int dcache_status (void); +int dcache_status(void); void dcache_enable (void); void dcache_disable(void); void mmu_disable(void); diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c index 109be38e166..67130393307 100644 --- a/post/lib_powerpc/cpu.c +++ b/post/lib_powerpc/cpu.c @@ -57,12 +57,12 @@ ulong cpu_post_makecr (long v) int cpu_post_test (int flags) { - int ic = icache_status (); + int ic = icache_status(); int ret = 0; WATCHDOG_RESET(); if (ic) - icache_disable (); + icache_disable(); if (ret == 0) ret = cpu_post_test_cmp (); @@ -110,7 +110,7 @@ int cpu_post_test (int flags) WATCHDOG_RESET(); if (ic) - icache_enable (); + icache_enable(); WATCHDOG_RESET(); From patchwork Mon Sep 30 14:40:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169454 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="SW8FaZW3"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlxK3JByz9s00 for ; Tue, 1 Oct 2019 01:02:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C058BC21EBD; Mon, 30 Sep 2019 14:50:54 +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 99EABC21F16; Mon, 30 Sep 2019 14:42:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 929F9C21DF8; Mon, 30 Sep 2019 14:41:58 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 387A8C21E49 for ; Mon, 30 Sep 2019 14:41:43 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id z19so39054972ior.0 for ; Mon, 30 Sep 2019 07:41:43 -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=+2mgwrTQhEYTTZYaJB2pOxlVvW4MP3/rjdQC7hwYYbU=; b=SW8FaZW3kfrE5dOwuEdnnM9o+KLCzOUVfXu9OSETknJoYkJC5OrdYgn2eo3MyZBbNt ORmMKVFo9YoVRl9WCL34pAludKcI60c4vocpcxbyBN6N4UnWtL/geJXMqN5ZbnIi4fko EVKPZCxrTu5O16jkywVyQtH+KVnn7XQHWvD8s= 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=+2mgwrTQhEYTTZYaJB2pOxlVvW4MP3/rjdQC7hwYYbU=; b=FtdhP2rICmxqk451DR646SmcfDCi7hNY1uLDGTdAp+9G8XXl2Ac8aypmSNnV/qhrP1 mfW9+6+v0obNkZgPgmVD9YeLNwR0/0upia8J0R66ltkr4ATTUJM/Zp68UyERHhOnQpDg YXxkoQem7TeWl53wol2qOXW1xhJVJtohUhByo6GfFON7nYG4DE/1LUgm5XnEAeXD7axT zf0PC5RCsVPyhXeeLC1QS90lefoACd4K+XOtJDQIxF804JGdI4oMyJkaLnPqLV4cJpyg 6zbIqaMpsiJfAZ3N/KWhgd/JOxXH/zWgPm8yGxuFpjzbtNT4mw5wkOQJtufL8QuNwa4f I+mg== X-Gm-Message-State: APjAAAV8lu7Dnl609icd41BpJf+OGmiMboFXBAkLpQPEjVlajy3w0ZOW 8h4MOkj0NI8kB6OfwD8DiBQTtOwNR+o= X-Google-Smtp-Source: APXvYqyOEZresnSTG7dVgtj2/LRxV5p68t2x6goah68xh5ie02GrUYwGrHDUae/cUwgtAQF2FE1NAA== X-Received: by 2002:a92:502:: with SMTP id q2mr20477333ile.141.1569854501081; Mon, 30 Sep 2019 07:41:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:40 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:40:59 -0600 Message-Id: <20190930144112.175618-29-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 28/41] common: Move some cache and MMU functions 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" These functions belong in cpu_legacy.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass --- arch/arc/lib/cache.c | 1 + arch/arm/cpu/arm11/cpu.c | 1 + arch/arm/cpu/arm920t/cpu.c | 1 + arch/arm/cpu/arm926ejs/armada100/cpu.c | 1 + arch/arm/cpu/arm926ejs/cache.c | 1 + arch/arm/cpu/arm926ejs/cpu.c | 1 + arch/arm/cpu/arm926ejs/spear/spr_misc.c | 1 + arch/arm/cpu/arm946es/cpu.c | 1 + arch/arm/cpu/armv7/cpu.c | 1 + arch/arm/cpu/armv7/exception_level.c | 1 + arch/arm/cpu/armv7/iproc-common/hwinit-common.c | 1 + arch/arm/cpu/armv7/kona-common/hwinit-common.c | 1 + arch/arm/cpu/armv7/mpu_v7r.c | 1 + arch/arm/cpu/armv7/vf610/generic.c | 1 + arch/arm/cpu/armv7m/cache.c | 1 + arch/arm/cpu/armv7m/cpu.c | 1 + arch/arm/cpu/armv8/cache_v8.c | 1 + arch/arm/cpu/armv8/cpu.c | 1 + arch/arm/cpu/armv8/exception_level.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/spl.c | 1 + arch/arm/cpu/pxa/pxa2xx.c | 1 + arch/arm/cpu/sa1100/cpu.c | 1 + arch/arm/lib/cache-cp15.c | 1 + arch/arm/mach-at91/armv7/cpu.c | 1 + arch/arm/mach-bcm283x/init.c | 1 + arch/arm/mach-exynos/soc.c | 1 + arch/arm/mach-imx/cache.c | 1 + arch/arm/mach-imx/imx8/cpu.c | 1 + arch/arm/mach-imx/mx5/soc.c | 1 + arch/arm/mach-keystone/init.c | 1 + arch/arm/mach-mediatek/cpu.c | 1 + arch/arm/mach-mvebu/armada8k/cpu.c | 1 + arch/arm/mach-mvebu/cpu.c | 1 + arch/arm/mach-omap2/omap-cache.c | 1 + arch/arm/mach-orion5x/cpu.c | 1 + arch/arm/mach-rmobile/cpu_info.c | 1 + arch/arm/mach-rmobile/memmap-gen3.c | 1 + arch/arm/mach-rockchip/board.c | 1 + arch/arm/mach-s5pc1xx/cache.c | 1 + arch/arm/mach-socfpga/misc.c | 1 + arch/arm/mach-socfpga/spl_a10.c | 1 + arch/arm/mach-stm32mp/cpu.c | 1 + arch/arm/mach-sunxi/board.c | 1 + arch/arm/mach-tegra/board.c | 1 + arch/arm/mach-uniphier/arm32/cache-uniphier.c | 1 + arch/arm/mach-zynq/cpu.c | 1 + arch/m68k/cpu/mcf5227x/cpu_init.c | 1 + arch/m68k/cpu/mcf523x/cpu_init.c | 1 + arch/m68k/cpu/mcf52x2/cpu_init.c | 1 + arch/m68k/cpu/mcf530x/cpu_init.c | 1 + arch/m68k/cpu/mcf532x/cpu_init.c | 1 + arch/m68k/cpu/mcf5445x/cpu_init.c | 1 + arch/m68k/cpu/mcf547x_8x/cpu_init.c | 1 + arch/m68k/lib/cache.c | 1 + arch/microblaze/cpu/cache.c | 1 + arch/mips/lib/cache.c | 1 + arch/nds32/cpu/n1213/ae3xx/cpu.c | 1 + arch/nds32/cpu/n1213/ag101/cpu.c | 1 + arch/nds32/lib/cache.c | 1 + arch/nios2/lib/cache.c | 1 + arch/powerpc/cpu/mpc83xx/spd_sdram.c | 1 + arch/powerpc/cpu/mpc8xx/cache.c | 1 + arch/riscv/cpu/ax25/cache.c | 1 + arch/riscv/cpu/ax25/cpu.c | 1 + arch/riscv/lib/cache.c | 1 + arch/sh/cpu/sh4/cache.c | 1 + arch/x86/cpu/cpu.c | 1 + arch/x86/cpu/i386/cpu.c | 1 + arch/x86/cpu/mtrr.c | 1 + arch/x86/cpu/x86_64/cpu.c | 1 + arch/x86/lib/spl.c | 1 + arch/xtensa/lib/cache.c | 1 + board/armltd/integrator/integrator.c | 1 + board/cirrus/edb93xx/edb93xx.c | 1 + board/cobra5272/flash.c | 1 + board/h2200/h2200.c | 1 + board/highbank/highbank.c | 1 + board/st/stih410-b2260/board.c | 1 + board/synopsys/hsdk/hsdk.c | 1 + board/syteco/zmx25/zmx25.c | 1 + board/toradex/colibri_pxa270/colibri_pxa270.c | 1 + board/xilinx/zynqmp/cmds.c | 1 + cmd/cache.c | 1 + cmd/ti/ddr3.c | 1 + common/bootm_os.c | 1 + common/kgdb_stubs.c | 1 + common/spl/spl_atf.c | 1 + drivers/ddr/altera/sdram_arria10.c | 1 + drivers/ddr/altera/sdram_s10.c | 1 + drivers/fpga/zynqpl.c | 1 + drivers/video/cfb_console.c | 1 + include/common.h | 10 +--------- include/cpu_legacy.h | 8 ++++++++ post/cpu/mpc83xx/ecc.c | 1 + post/lib_powerpc/cpu.c | 1 + 95 files changed, 102 insertions(+), 9 deletions(-) diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c index 8c1cb6e8009..6172b8b9025 100644 --- a/arch/arc/lib/cache.c +++ b/arch/arc/lib/cache.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c index 8aee1539a9d..a546ec21de4 100644 --- a/arch/arm/cpu/arm11/cpu.c +++ b/arch/arm/cpu/arm11/cpu.c @@ -16,6 +16,7 @@ #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c index 2ef133f1331..a98c86eaf3f 100644 --- a/arch/arm/cpu/arm920t/cpu.c +++ b/arch/arm/cpu/arm920t/cpu.c @@ -14,6 +14,7 @@ #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c index 4cd85114140..b7926e40b11 100644 --- a/arch/arm/cpu/arm926ejs/armada100/cpu.c +++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c index 16eea693d12..6ae8e8b380a 100644 --- a/arch/arm/cpu/arm926ejs/cache.c +++ b/arch/arm/cpu/arm926ejs/cache.c @@ -3,6 +3,7 @@ * (C) Copyright 2011 * Ilya Yanok, EmCraft Systems */ +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index d7cffe8b690..6d06fb758ab 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -14,6 +14,7 @@ #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c index d36484c9d69..47c7c5b6e9a 100644 --- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c +++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c index 3b4f5de8f6c..0a78ffbae1a 100644 --- a/arch/arm/cpu/arm946es/cpu.c +++ b/arch/arm/cpu/arm946es/cpu.c @@ -14,6 +14,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index 44f27572674..bf3ebba0523 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c index 274f03d8bbb..9d7dcb1681d 100644 --- a/arch/arm/cpu/armv7/exception_level.c +++ b/arch/arm/cpu/armv7/exception_level.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c index 70431ecf6b1..70ba24072a3 100644 --- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c @@ -4,6 +4,7 @@ */ #include +#include #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) void enable_caches(void) diff --git a/arch/arm/cpu/armv7/kona-common/hwinit-common.c b/arch/arm/cpu/armv7/kona-common/hwinit-common.c index 10e74888792..07e7b1fea19 100644 --- a/arch/arm/cpu/armv7/kona-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/kona-common/hwinit-common.c @@ -4,6 +4,7 @@ */ #include +#include #include #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) diff --git a/arch/arm/cpu/armv7/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c index 7adecffff87..c1a0079900a 100644 --- a/arch/arm/cpu/armv7/mpu_v7r.c +++ b/arch/arm/cpu/armv7/mpu_v7r.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index 7e4641fd325..9307c343b0c 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c index 1106bead411..b2915661522 100644 --- a/arch/arm/cpu/armv7m/cache.c +++ b/arch/arm/cpu/armv7m/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c index 55ea0787a73..fed17bd6490 100644 --- a/arch/arm/cpu/armv7m/cpu.c +++ b/arch/arm/cpu/armv7m/cpu.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index e500e722e51..f92dd4daaf0 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c index b312b3be356..6fdc94ec081 100644 --- a/arch/arm/cpu/armv8/cpu.c +++ b/arch/arm/cpu/armv8/cpu.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c index 57824eb2ac8..1407d1b9cad 100644 --- a/arch/arm/cpu/armv8/exception_level.c +++ b/arch/arm/cpu/armv8/exception_level.c @@ -10,6 +10,7 @@ #include #include +#include #include /** diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 8eeeef199b1..9acb4548546 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 43c206b2459..aad4b52e7b2 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index f81ebc9ba29..8ef9f294f23 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index fc6d69134ce..7b002f14f56 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c index 638645c7e40..f301fae89bf 100644 --- a/arch/arm/mach-at91/armv7/cpu.c +++ b/arch/arm/mach-at91/armv7/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c index 97414415a6c..1ca1c4f99b4 100644 --- a/arch/arm/mach-bcm283x/init.c +++ b/arch/arm/mach-bcm283x/init.c @@ -7,6 +7,7 @@ */ #include +#include int arch_cpu_init(void) { diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c index 2ae9a43b4e8..b718f6fff6f 100644 --- a/arch/arm/mach-exynos/soc.c +++ b/arch/arm/mach-exynos/soc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c index a6059425033..65a9a7ede46 100644 --- a/arch/arm/mach-imx/cache.c +++ b/arch/arm/mach-imx/cache.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index f2fa262ac89..91995696d78 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c index bbb335e275b..35b5a372708 100644 --- a/arch/arm/mach-imx/mx5/soc.c +++ b/arch/arm/mach-imx/mx5/soc.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c index 3dee300d77f..f53920f1dd4 100644 --- a/arch/arm/mach-keystone/init.c +++ b/arch/arm/mach-keystone/init.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c index 1923c9e527d..7f9996163d0 100644 --- a/arch/arm/mach-mediatek/cpu.c +++ b/arch/arm/mach-mediatek/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c index 959a7cff764..e0b8b6568b2 100644 --- a/arch/arm/mach-mvebu/armada8k/cpu.c +++ b/arch/arm/mach-mvebu/armada8k/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index f4b7a4fa801..4a5c8f959ab 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c index d58a0a15fff..27029f59b6f 100644 --- a/arch/arm/mach-omap2/omap-cache.c +++ b/arch/arm/mach-omap2/omap-cache.c @@ -12,6 +12,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c index 79b5f4f34f4..364f1ec9869 100644 --- a/arch/arm/mach-orion5x/cpu.c +++ b/arch/arm/mach-orion5x/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 9ef94a48993..7a6a790b554 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -4,6 +4,7 @@ * (C) Copyright 2012 Renesas Solutions Corp. */ #include +#include #include #include #include diff --git a/arch/arm/mach-rmobile/memmap-gen3.c b/arch/arm/mach-rmobile/memmap-gen3.c index 1a9eb72bb97..f69c68f57af 100644 --- a/arch/arm/mach-rmobile/memmap-gen3.c +++ b/arch/arm/mach-rmobile/memmap-gen3.c @@ -6,6 +6,7 @@ */ #include +#include #include #define GEN3_NR_REGIONS 16 diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 8ca34637315..d1cff2424c3 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c index 0b879b545dd..c686ff0a2cf 100644 --- a/arch/arm/mach-s5pc1xx/cache.c +++ b/arch/arm/mach-s5pc1xx/cache.c @@ -8,6 +8,7 @@ */ #include +#include #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) void enable_caches(void) diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c index 49dadd4c3d8..2cee6a25cb6 100644 --- a/arch/arm/mach-socfpga/misc.c +++ b/arch/arm/mach-socfpga/misc.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c index b820cb0673d..2b85d16ba15 100644 --- a/arch/arm/mach-socfpga/spl_a10.c +++ b/arch/arm/mach-socfpga/spl_a10.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index a46e8438f7c..d949fed2098 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 8e9bb63d9d2..459f8ac6477 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c index abcae15ea33..ef08428a141 100644 --- a/arch/arm/mach-tegra/board.c +++ b/arch/arm/mach-tegra/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-uniphier/arm32/cache-uniphier.c b/arch/arm/mach-uniphier/arm32/cache-uniphier.c index 023b3396f55..5075ca6396d 100644 --- a/arch/arm/mach-uniphier/arm32/cache-uniphier.c +++ b/arch/arm/mach-uniphier/arm32/cache-uniphier.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c index e5f557716b7..d4375a482fd 100644 --- a/arch/arm/mach-zynq/cpu.c +++ b/arch/arm/mach-zynq/cpu.c @@ -4,6 +4,7 @@ * Copyright (C) 2012 Xilinx, Inc. All rights reserved. */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c index 3bbc42f508c..1672400f29a 100644 --- a/arch/m68k/cpu/mcf5227x/cpu_init.c +++ b/arch/m68k/cpu/mcf5227x/cpu_init.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c index 339fbeb4292..5231e349839 100644 --- a/arch/m68k/cpu/mcf523x/cpu_init.c +++ b/arch/m68k/cpu/mcf523x/cpu_init.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c index f4a38726670..a57c2e82f44 100644 --- a/arch/m68k/cpu/mcf52x2/cpu_init.c +++ b/arch/m68k/cpu/mcf52x2/cpu_init.c @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c index 27d06d92e2d..31fbddbb65c 100644 --- a/arch/m68k/cpu/mcf530x/cpu_init.c +++ b/arch/m68k/cpu/mcf530x/cpu_init.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c index cbf840f76e8..aa61fcdb3ba 100644 --- a/arch/m68k/cpu/mcf532x/cpu_init.c +++ b/arch/m68k/cpu/mcf532x/cpu_init.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c index 134510b00f9..7f7ed26b687 100644 --- a/arch/m68k/cpu/mcf5445x/cpu_init.c +++ b/arch/m68k/cpu/mcf5445x/cpu_init.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c index 81ffc6c0943..c0aa62da3be 100644 --- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c +++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c index 29f863b8b44..598d0045fd9 100644 --- a/arch/m68k/lib/cache.c +++ b/arch/m68k/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c index 94114555ff5..952066b16eb 100644 --- a/arch/microblaze/cpu/cache.c +++ b/arch/microblaze/cpu/cache.c @@ -6,6 +6,7 @@ */ #include +#include #include int dcache_status(void) diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c index d56fd1e0f4c..6509bd4289f 100644 --- a/arch/mips/lib/cache.c +++ b/arch/mips/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #ifdef CONFIG_MIPS_L2_CACHE #include diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c index c5a7a3fd0a4..ca8e6a140e7 100644 --- a/arch/nds32/cpu/n1213/ae3xx/cpu.c +++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c @@ -15,6 +15,7 @@ /* CPU specific code */ #include #include +#include #include #include diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c index c9cb4333bae..f43b6960590 100644 --- a/arch/nds32/cpu/n1213/ag101/cpu.c +++ b/arch/nds32/cpu/n1213/ag101/cpu.c @@ -15,6 +15,7 @@ /* CPU specific code */ #include #include +#include #include #include diff --git a/arch/nds32/lib/cache.c b/arch/nds32/lib/cache.c index 27065136dd2..05e469da2fa 100644 --- a/arch/nds32/lib/cache.c +++ b/arch/nds32/lib/cache.c @@ -6,6 +6,7 @@ */ #include +#include #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) static inline unsigned long CACHE_SET(unsigned char cache) { diff --git a/arch/nios2/lib/cache.c b/arch/nios2/lib/cache.c index c2cdee3e9e6..90bcd7c1e85 100644 --- a/arch/nios2/lib/cache.c +++ b/arch/nios2/lib/cache.c @@ -6,6 +6,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c index 08918a9d75e..0d38d6c8f36 100644 --- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c +++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c @@ -13,6 +13,7 @@ #ifndef CONFIG_MPC83XX_SDRAM #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/cache.c b/arch/powerpc/cpu/mpc8xx/cache.c index 8051d3e8d23..4407a5c68ab 100644 --- a/arch/powerpc/cpu/mpc8xx/cache.c +++ b/arch/powerpc/cpu/mpc8xx/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c index 41de30cc024..415e57b3c59 100644 --- a/arch/riscv/cpu/ax25/cache.c +++ b/arch/riscv/cpu/ax25/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c index 76689b21d3d..e7176757137 100644 --- a/arch/riscv/cpu/ax25/cpu.c +++ b/arch/riscv/cpu/ax25/cpu.c @@ -6,6 +6,7 @@ /* CPU specific code */ #include +#include #include /* diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c index 5437a122a10..b1525c046bd 100644 --- a/arch/riscv/lib/cache.c +++ b/arch/riscv/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include void invalidate_icache_all(void) { diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c index 50490904249..98f7b59f93d 100644 --- a/arch/sh/cpu/sh4/cache.c +++ b/arch/sh/cpu/sh4/cache.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 290ee084e5e..975d25686a1 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index 90b546e7410..94d4347c8bb 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c index 0939736164d..53bbbb55b5c 100644 --- a/arch/x86/cpu/mtrr.c +++ b/arch/x86/cpu/mtrr.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 7d291f60f5b..5418543fbe2 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -6,6 +6,7 @@ #include #include +#include #include /* diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 5d5d1a9ca74..8594ec56b61 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/xtensa/lib/cache.c b/arch/xtensa/lib/cache.c index 8f13f1fb630..c2db450cad1 100644 --- a/arch/xtensa/lib/cache.c +++ b/arch/xtensa/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include /* diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index f0fbe2b4176..9dd76701061 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c index 88fac76ea52..64d8e4d9f76 100644 --- a/board/cirrus/edb93xx/edb93xx.c +++ b/board/cirrus/edb93xx/edb93xx.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 9bf824889a1..0e1d9ce8d35 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -6,6 +6,7 @@ #include #include +#include #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE #define FLASH_BANK_SIZE 0x200000 diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c index e1b7b2ce8a1..22276b41c94 100644 --- a/board/h2200/h2200.c +++ b/board/h2200/h2200.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 9563763dfa5..f0862c7cecd 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c index 111e64b995f..69d9f7e91d0 100644 --- a/board/st/stih410-b2260/board.c +++ b/board/st/stih410-b2260/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 8a7642a0aaa..13607557103 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c index d2318457b43..f64fadde033 100644 --- a/board/syteco/zmx25/zmx25.c +++ b/board/syteco/zmx25/zmx25.c @@ -14,6 +14,7 @@ * RedBoot tx25_misc.c Copyright (C) 2009 Red Hat */ #include +#include #include #include #include diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index e9e17508a57..e64dd14afff 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c index ed7ba58c647..dd6ed5f062a 100644 --- a/board/xilinx/zynqmp/cmds.c +++ b/board/xilinx/zynqmp/cmds.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/cmd/cache.c b/cmd/cache.c index 2c687173a8b..96c7512cd74 100644 --- a/cmd/cache.c +++ b/cmd/cache.c @@ -9,6 +9,7 @@ */ #include #include +#include #include static int parse_argv(const char *); diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c index b82cbe152dc..53e143b2220 100644 --- a/cmd/ti/ddr3.c +++ b/cmd/ti/ddr3.c @@ -5,6 +5,7 @@ * Copyright (C) 2012-2017 Texas Instruments Incorporated, */ +#include #include #include #include diff --git a/common/bootm_os.c b/common/bootm_os.c index 6fb7d658da6..93d2a3f53df 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/common/kgdb_stubs.c b/common/kgdb_stubs.c index afa7d6403a6..43c7103b8d9 100644 --- a/common/kgdb_stubs.c +++ b/common/kgdb_stubs.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 4715f9d3719..b8ec515129e 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -11,6 +11,7 @@ #include #include +#include #include #include diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c index 1777e7e1a50..46b1dda3de5 100644 --- a/drivers/ddr/altera/sdram_arria10.c +++ b/drivers/ddr/altera/sdram_arria10.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index 56cbbac9fe1..90846d9c2b2 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index 069c63ba456..23587e56782 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index e5c077e4f52..6d11986fde0 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -65,6 +65,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 82b1abe698d..48eb2236279 100644 --- a/include/common.h +++ b/include/common.h @@ -3,7 +3,7 @@ * Common header file for U-Boot * * This file still includes quite a bit of stuff that should be in separate - * headers like command.h and cpu.h. Please think before adding more things. + * headers like command.h. Please think before adding more things. * Patches to remove things are welcome. * * (C) Copyright 2000-2009 @@ -185,14 +185,6 @@ int board_early_init_r (void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -/* $(CPU)/start.S */ -int icache_status (void); -void icache_enable (void); -void icache_disable(void); -int dcache_status(void); -void dcache_enable (void); -void dcache_disable(void); -void mmu_disable(void); #if defined(CONFIG_ARM) void relocate_code(ulong); #else diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h index 1741f7f7a63..a14d23a36de 100644 --- a/include/cpu_legacy.h +++ b/include/cpu_legacy.h @@ -52,4 +52,12 @@ int checkcpu(void); void smp_set_core_boot_addr(unsigned long addr, int corenr); void smp_kick_all_cpus(void); +int icache_status(void); +void icache_enable(void); +void icache_disable(void); +int dcache_status(void); +void dcache_enable(void); +void dcache_disable(void); +void mmu_disable(void); + #endif diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c index 03b6d65fe9b..ce247057774 100644 --- a/post/cpu/mpc83xx/ecc.c +++ b/post/cpu/mpc83xx/ecc.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c index 67130393307..b2a6fbde005 100644 --- a/post/lib_powerpc/cpu.c +++ b/post/lib_powerpc/cpu.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test From patchwork Mon Sep 30 14:41:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169441 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="dpkZvxD5"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlsT32Scz9s00 for ; Tue, 1 Oct 2019 00:58:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E2440C21EC2; Mon, 30 Sep 2019 14:53:28 +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 20E8BC21F1B; Mon, 30 Sep 2019 14:42:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 706B4C21EB9; Mon, 30 Sep 2019 14:41:57 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 14814C21DED for ; Mon, 30 Sep 2019 14:41:43 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id z19so39054953ior.0 for ; Mon, 30 Sep 2019 07:41:43 -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=pi4emL3TJCtvjSDl4QWKnWSwK6CqQGN6EmNNngrY6do=; b=dpkZvxD5yPmC9frbl1SK+EqXLIjJR4iCaTNEgn33CoVcHe9dIjeoAFBhVlMLXlTmd7 GYlUOBkJkhVX3YWOo0uqLbmhw2PuguIjk35UbpuE/Ldc9/YCE7R+N3+YkL3ioGrHzXkZ yPluNDeLGU5H/jqE9ZXa41lPAVpze3NPoWN1o= 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=pi4emL3TJCtvjSDl4QWKnWSwK6CqQGN6EmNNngrY6do=; b=V3bIwU1KYhXcC/6oJuq7YtjmUaURdkmqX84wxHaxEdFuGhNiZHv17EzquPcPjlk5m0 wxR/ubKiT0IwMfkoRwWgnpYT+QUu/z1jSley9uJaYWNpYek4fYm7kJbxbUvz0cvAbeLF 2uJ9ZrAAFh+2ZRq2cuIa2FljjS4GyTsYDRfJH++0AoU+AR8R2cuzU8IKMUa1zy36ETVZ qhdvGoDBTkqH+JJqD7j2YbYPPCfa/sCqUzDSQxBExqHMZx67DnI4ROrdhjmqlD6YViz5 3Q5aEZvpYCq/JlPkmPRSSOoeA0zy6bGY5ngmZX1NSV6cQirbBnVj+3HPQGrnsHSJv+1X 3MzQ== X-Gm-Message-State: APjAAAW+9YXN+O6ihcjLpaZsiAL72YOX2ETvgQ9JeWVTDIFnfY/sIHNs mzWLSVm9m92NCyuSmKnvH5ZIXro4fHM= X-Google-Smtp-Source: APXvYqw959KparyBYI2VKtfI4BgRfUvQ50C2tzHOXK1gXX+tx64NnfWrDKgEKGkZmozOWMNKKdup5w== X-Received: by 2002:a92:d110:: with SMTP id a16mr19019222ilb.97.1569854501838; Mon, 30 Sep 2019 07:41:41 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:41 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:00 -0600 Message-Id: <20190930144112.175618-30-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 29/41] common: Drop checkicache() and checkdcache() 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" These are used by only one arch and only within a single file. Drop the declarations from the common file. Signed-off-by: Simon Glass --- arch/powerpc/cpu/mpc8xx/cpu.c | 130 +++++++++++++++++----------------- include/common.h | 2 - 2 files changed, 65 insertions(+), 67 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 36af7c16125..787c1bdc11d 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -35,70 +35,6 @@ DECLARE_GLOBAL_DATA_PTR; -static int check_CPU(long clock, uint pvr, uint immr) -{ - immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; - uint k; - char buf[32]; - - /* the highest 16 bits should be 0x0050 for a 860 */ - - if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) - return -1; - - k = (immr << 16) | - in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]); - - /* - * Some boards use sockets so different CPUs can be used. - * We have to check chip version in run time. - */ - switch (k) { - /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ - case 0x08010004: /* Rev. A.0 */ - printf("MPC866xxxZPnnA"); - break; - case 0x08000003: /* Rev. 0.3 */ - printf("MPC866xxxZPnn"); - break; - case 0x09000000: /* 870/875/880/885 */ - puts("MPC885ZPnn"); - break; - - default: - printf("unknown MPC86x (0x%08x)", k); - break; - } - - printf(" at %s MHz: ", strmhz(buf, clock)); - - print_size(checkicache(), " I-Cache "); - print_size(checkdcache(), " D-Cache"); - - /* do we have a FEC (860T/P or 852/859/866/885)? */ - - out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678); - if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678) - printf(" FEC present"); - - putc('\n'); - - return 0; -} - -/* ------------------------------------------------------------------------- */ - -int checkcpu(void) -{ - ulong clock = gd->cpu_clk; - uint immr = get_immr(); /* Return full IMMR contents */ - uint pvr = get_pvr(); - - puts("CPU: "); - - return check_CPU(clock, pvr, immr); -} - /* ------------------------------------------------------------------------- */ /* L1 i-cache */ @@ -143,7 +79,7 @@ int checkicache(void) /* L1 d-cache */ /* call with cache disabled */ -int checkdcache(void) +static int checkdcache(void) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; memctl8xx_t __iomem *memctl = &immap->im_memctl; @@ -175,6 +111,70 @@ int checkdcache(void) return lines << 4; }; +static int check_CPU(long clock, uint pvr, uint immr) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + uint k; + char buf[32]; + + /* the highest 16 bits should be 0x0050 for a 860 */ + + if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) + return -1; + + k = (immr << 16) | + in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]); + + /* + * Some boards use sockets so different CPUs can be used. + * We have to check chip version in run time. + */ + switch (k) { + /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ + case 0x08010004: /* Rev. A.0 */ + printf("MPC866xxxZPnnA"); + break; + case 0x08000003: /* Rev. 0.3 */ + printf("MPC866xxxZPnn"); + break; + case 0x09000000: /* 870/875/880/885 */ + puts("MPC885ZPnn"); + break; + + default: + printf("unknown MPC86x (0x%08x)", k); + break; + } + + printf(" at %s MHz: ", strmhz(buf, clock)); + + print_size(checkicache(), " I-Cache "); + print_size(checkdcache(), " D-Cache"); + + /* do we have a FEC (860T/P or 852/859/866/885)? */ + + out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678); + if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678) + printf(" FEC present"); + + putc('\n'); + + return 0; +} + +/* ------------------------------------------------------------------------- */ + +int checkcpu(void) +{ + ulong clock = gd->cpu_clk; + uint immr = get_immr(); /* Return full IMMR contents */ + uint pvr = get_pvr(); + + puts("CPU: "); + + return check_CPU(clock, pvr, immr); +} + /* ------------------------------------------------------------------------- */ void upmconfig(uint upm, uint *table, uint size) diff --git a/include/common.h b/include/common.h index 48eb2236279..423f1023ad1 100644 --- a/include/common.h +++ b/include/common.h @@ -195,8 +195,6 @@ void trap_init (ulong); void s_init(void); -int checkicache (void); -int checkdcache (void); void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_misc (void); From patchwork Mon Sep 30 14:41:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169456 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="dtLjbHVy"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlxk4r2Rz9s7T for ; Tue, 1 Oct 2019 01:02:34 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2D5A4C21EA8; Mon, 30 Sep 2019 14:51:49 +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 2B8BEC21F1A; Mon, 30 Sep 2019 14:42:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9D4DFC21EE5; Mon, 30 Sep 2019 14:42:00 +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 6531DC21E4E for ; Mon, 30 Sep 2019 14:41:45 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id n26so10436159ioj.8 for ; Mon, 30 Sep 2019 07:41:45 -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=ChZ0xWGLEXy/etmfixgjT/PmF29nvWzn7ZNsXai8OTM=; b=dtLjbHVy0qkfm3rTyLQCNMZn2jq7cuwE81PBpSX0yAmzto/wX2e2qicVFuQlCnFzGX YGU4mMrZb9UrEWWGt8WCLoTrtUZ02mFW2ynL4EmPGOqnkpIDzJWZ9aK754GYRx+d4uyF U7NQ/8L8kzEbIHNahR/KrF1vdX2A8QMCCcqNM= 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=ChZ0xWGLEXy/etmfixgjT/PmF29nvWzn7ZNsXai8OTM=; b=F5XbWTp8NeaYGlFzH37FrKD5sC0A6rOEm90lDfn4/g1POnGuDee6AkwnCSR9fVQ/55 4+z/F8/tkoCle5j016QxxR4z1sc9dnfOYpuNLjKdii11WHBZTgNcKXtMcouvWPGYj5/f ANBgNBjbdgNRtMm+iqQ2E1Sf4IGWmNQ2gX1SjemaHfPo2smWBGEOnN63FkTu3m+JJ3UY esBzt2MZBpFw76qoFWPQBbA4E6aIdiPUiO9UOgvj/5pP7T0luFvS8rmzheW02KnP2sec mG6WJReK3G26N+smK9O7x5CLAKzeVZTzfNONjD+v4RW3UWLTmsKTjj8o3WZ3GlJ4azM9 nWcA== X-Gm-Message-State: APjAAAXY2YbK6Ca4c/Vr7K3Lhl4RC6/4BejN9nYmJDGBcXvSYnb2Qvel DECScraN39K7NfQKsTLkG0XwAjew8Gs= X-Google-Smtp-Source: APXvYqxysez2dRxfL8T+3AmSuykTzVpOwBBW2sIjoVILTbp06PRh5ewpL7ccSntmfq4Cd6xEYzBFxw== X-Received: by 2002:a92:3841:: with SMTP id f62mr21210395ila.103.1569854502808; Mon, 30 Sep 2019 07:41:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:01 -0600 Message-Id: <20190930144112.175618-31-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 30/41] common: Move ARM cache operations 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" These functions are CPU-related and do not use driver model. Move them to cpu_legacy.h Signed-off-by: Simon Glass --- arch/arm/cpu/arm926ejs/lpc32xx/cpu.c | 1 + arch/arm/cpu/armv7/cache_v7.c | 1 + arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 1 + arch/arm/cpu/armv8/sec_firmware.c | 1 + arch/arm/cpu/pxa/cache.c | 1 + arch/arm/lib/cache.c | 1 + arch/arm/mach-bcm283x/mbox.c | 1 + arch/arm/mach-imx/mx7/psci-mx7.c | 1 + arch/arm/mach-omap2/sec-common.c | 1 + arch/arm/mach-tegra/ivc.c | 1 + arch/microblaze/lib/bootm.c | 1 + arch/mips/lib/reloc.c | 1 + arch/mips/lib/traps.c | 1 + arch/mips/mach-jz47xx/jz4780/jz4780.c | 1 + arch/mips/mach-mtmips/ddr_calibrate.c | 1 + arch/nds32/cpu/n1213/ae3xx/cpu.c | 1 + arch/nios2/cpu/cpu.c | 1 + arch/nios2/lib/bootm.c | 1 + arch/powerpc/lib/bootm.c | 1 + arch/powerpc/lib/cache.c | 1 + arch/riscv/cpu/ax25/cpu.c | 1 + arch/riscv/lib/smp.c | 1 + arch/riscv/lib/spl.c | 1 + arch/sandbox/cpu/cpu.c | 1 + arch/x86/cpu/quark/dram.c | 1 + arch/x86/cpu/quark/quark.c | 1 + arch/xtensa/lib/bootm.c | 1 + board/Arcturus/ucp1020/cmd_arc.c | 1 + board/beckhoff/mx53cx9020/mx53cx9020.c | 1 + board/broadcom/bcmstb/bcmstb.c | 1 + board/cirrus/edb93xx/edb93xx.c | 1 + board/phytec/pfla02/pfla02.c | 1 + board/sandbox/sandbox.c | 1 + cmd/disk.c | 1 + cmd/load.c | 1 + cmd/ximg.c | 1 + common/avb_verify.c | 1 + common/board_r.c | 1 + common/bootm.c | 1 + common/bouncebuf.c | 1 + common/image.c | 1 + common/lcd.c | 1 + common/spl/spl_opensbi.c | 1 + common/update.c | 1 + drivers/ata/ahci.c | 1 + drivers/ata/dwc_ahsata.c | 1 + drivers/ata/fsl_ahci.c | 1 + drivers/ata/fsl_sata.c | 1 + drivers/ata/sata_mv.c | 1 + drivers/ata/sata_sil.c | 1 + drivers/bootcount/bootcount.c | 1 + drivers/bootcount/bootcount_ram.c | 1 + drivers/core/device.c | 1 + drivers/crypto/fsl/fsl_blob.c | 1 + drivers/crypto/fsl/fsl_hash.c | 1 + drivers/crypto/fsl/jobdesc.c | 1 + drivers/crypto/fsl/jr.c | 1 + drivers/dma/apbh_dma.c | 1 + drivers/dma/bcm6348-iudma.c | 1 + drivers/dma/dma-uclass.c | 1 + drivers/dma/ti/k3-udma.c | 1 + drivers/fpga/zynqmppl.c | 1 + drivers/mmc/dw_mmc.c | 1 + drivers/mmc/fsl_esdhc.c | 1 + drivers/mmc/fsl_esdhc_imx.c | 1 + drivers/mmc/fsl_esdhc_spl.c | 1 + drivers/mmc/meson_gx_mmc.c | 1 + drivers/mmc/omap_hsmmc.c | 1 + drivers/mmc/sdhci.c | 1 + drivers/mmc/stm32_sdmmc2.c | 1 + drivers/mmc/tmio-common.c | 1 + drivers/mtd/nand/raw/denali.c | 1 + drivers/mtd/nand/raw/fsl_elbc_spl.c | 1 + drivers/mtd/nand/raw/fsl_ifc_spl.c | 1 + drivers/mtd/nand/raw/mxs_nand.c | 1 + drivers/mtd/pic32_flash.c | 1 + drivers/mtd/spi/fsl_espi_spl.c | 1 + drivers/net/ag7xxx.c | 1 + drivers/net/altera_tse.c | 1 + drivers/net/bcm-sf2-eth-gmac.c | 1 + drivers/net/designware.c | 1 + drivers/net/dwc_eth_qos.c | 1 + drivers/net/e1000.c | 1 + drivers/net/ethoc.c | 1 + drivers/net/fec_mxc.c | 1 + drivers/net/fsl-mc/mc.c | 1 + drivers/net/ftgmac100.c | 1 + drivers/net/ftmac100.c | 1 + drivers/net/higmacv300.c | 1 + drivers/net/ldpaa_eth/ldpaa_eth.c | 1 + drivers/net/macb.c | 1 + drivers/net/mt7628-eth.c | 1 + drivers/net/mtk_eth.c | 1 + drivers/net/mvneta.c | 1 + drivers/net/mvpp2.c | 1 + drivers/net/pch_gbe.c | 1 + drivers/net/pcnet.c | 1 + drivers/net/pic32_eth.c | 1 + drivers/net/ravb.c | 1 + drivers/net/rtl8139.c | 1 + drivers/net/rtl8169.c | 1 + drivers/net/sh_eth.c | 1 + drivers/net/sni_ave.c | 1 + drivers/net/sun8i_emac.c | 1 + drivers/net/ti/cpsw.c | 1 + drivers/net/ti/davinci_emac.c | 1 + drivers/net/xilinx_axi_emac.c | 1 + drivers/net/zynq_gem.c | 1 + drivers/nvme/nvme.c | 1 + drivers/remoteproc/rproc-elf-loader.c | 1 + drivers/spi/mxs_spi.c | 1 + drivers/spi/ti_qspi.c | 1 + drivers/spi/zynqmp_gqspi.c | 1 + drivers/usb/dwc3/core.c | 1 + drivers/usb/dwc3/dwc3-generic.c | 1 + drivers/usb/dwc3/ep0.c | 1 + drivers/usb/dwc3/gadget.c | 1 + drivers/usb/dwc3/io.h | 1 + drivers/usb/gadget/ci_udc.c | 1 + drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 3 +++ drivers/usb/gadget/fotg210.c | 1 + drivers/usb/host/dwc2.c | 1 + drivers/usb/host/ehci-hcd.c | 1 + drivers/usb/host/ohci-hcd.c | 1 + drivers/usb/host/xhci-mem.c | 1 + drivers/usb/host/xhci-ring.c | 1 + drivers/usb/host/xhci.c | 1 + drivers/video/atmel_hlcdfb.c | 1 + drivers/video/sunxi/sunxi_display.c | 1 + drivers/video/video-uclass.c | 1 + include/common.h | 24 ---------------------- include/cpu_legacy.h | 24 ++++++++++++++++++++++ lib/efi_loader/efi_image_loader.c | 1 + lib/efi_loader/efi_runtime.c | 1 + post/cpu/mpc83xx/ecc.c | 1 + 135 files changed, 159 insertions(+), 24 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c index 51171774741..855d921aa95 100644 --- a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c +++ b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c index 0dc4ebf6943..c8ff9dcc56a 100644 --- a/arch/arm/cpu/armv7/cache_v7.c +++ b/arch/arm/cpu/armv7/cache_v7.c @@ -4,6 +4,7 @@ * Texas Instruments, * Aneesh V */ +#include #include #include #include diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c index bb169aaaf4b..11a6b03105c 100644 --- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c index 8dc0ac92668..25a5b45c63c 100644 --- a/arch/arm/cpu/armv8/sec_firmware.c +++ b/arch/arm/cpu/armv8/sec_firmware.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c index 5cd4a9524bc..8054ea57f45 100644 --- a/arch/arm/cpu/pxa/cache.c +++ b/arch/arm/cpu/pxa/cache.c @@ -3,6 +3,7 @@ * (C) Copyright 2016 Vasily Khoruzhick */ +#include #include #include diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 463d283cb76..d5d748ff937 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -7,6 +7,7 @@ /* for now: just dummy functions to satisfy the linker */ #include +#include #include /* diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c index 3c67f68c178..b9301a2ae08 100644 --- a/arch/arm/mach-bcm283x/mbox.c +++ b/arch/arm/mach-bcm283x/mbox.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c index c98d2e96af5..c91d315a5c2 100644 --- a/arch/arm/mach-imx/mx7/psci-mx7.c +++ b/arch/arm/mach-imx/mx7/psci-mx7.c @@ -4,6 +4,7 @@ * Copyright 2017 NXP */ +#include #include #include #include diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index b45d3ee5449..31ebf41f687 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -13,6 +13,7 @@ */ #include +#include #include #include diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c index 65b1cfc07d4..f5b52fe6bf2 100644 --- a/arch/arm/mach-tegra/ivc.c +++ b/arch/arm/mach-tegra/ivc.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index ec332944d8e..ba633af5981 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c index c6a517d66f8..c9c3a0aaed9 100644 --- a/arch/mips/lib/reloc.c +++ b/arch/mips/lib/reloc.c @@ -27,6 +27,7 @@ */ #include +#include #include #include diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index 976978c3e96..ff02d437a87 100644 --- a/arch/mips/lib/traps.c +++ b/arch/mips/lib/traps.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c index dbd328cb49f..0949cbc3d09 100644 --- a/arch/mips/mach-jz47xx/jz4780/jz4780.c +++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c index 75763c45286..b0c64305869 100644 --- a/arch/mips/mach-mtmips/ddr_calibrate.c +++ b/arch/mips/mach-mtmips/ddr_calibrate.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c index ca8e6a140e7..d32d5be39f5 100644 --- a/arch/nds32/cpu/n1213/ae3xx/cpu.c +++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index 1fc79213e20..54b6741d4e4 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index 485d5ae540c..c671e032148 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -5,6 +5,7 @@ */ #include +#include #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */ diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 84691b75546..a7d6f20d1c3 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -8,6 +8,7 @@ #include +#include #include #include #include diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c index 2d36c3aa082..192a50c08d7 100644 --- a/arch/powerpc/lib/cache.c +++ b/arch/powerpc/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c index e7176757137..682ad22de21 100644 --- a/arch/riscv/cpu/ax25/cpu.c +++ b/arch/riscv/cpu/ax25/cpu.c @@ -7,6 +7,7 @@ /* CPU specific code */ #include #include +#include #include /* diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c index cc66f15567a..44ea470b8ef 100644 --- a/arch/riscv/lib/smp.c +++ b/arch/riscv/lib/smp.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c index bea86959872..6a2b8f71629 100644 --- a/arch/riscv/lib/spl.c +++ b/arch/riscv/lib/spl.c @@ -4,6 +4,7 @@ * Lukas Auer */ #include +#include #include #include diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index fdfb209f77d..6cb81f0dd43 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c index 51f9659ab15..1c5d6a963c9 100644 --- a/arch/x86/cpu/quark/dram.c +++ b/arch/x86/cpu/quark/dram.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 f598666a6b0..91b68433d4d 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index 93eea53c5f2..c62612709a5 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index 2e8477ed3b7..e2b65052e82 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c index 9450d925f6f..73cf8b1194a 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index 23500dfa698..6af49a368d9 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -6,6 +6,7 @@ * Author: Thomas Fitzsimmons */ +#include #include #include #include diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c index 64d8e4d9f76..35893bd0b03 100644 --- a/board/cirrus/edb93xx/edb93xx.c +++ b/board/cirrus/edb93xx/edb93xx.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c index ae9ffe0390c..57de1f8e556 100644 --- a/board/phytec/pfla02/pfla02.c +++ b/board/phytec/pfla02/pfla02.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 9ca1eca027a..68e8071d262 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/cmd/disk.c b/cmd/disk.c index 9e635c1172d..afb633faa39 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -5,6 +5,7 @@ */ #include #include +#include #include int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, diff --git a/cmd/load.c b/cmd/load.c index 5811a99310a..c120231538c 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/ximg.c b/cmd/ximg.c index a9481004f03..3f67aa98f52 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -13,6 +13,7 @@ */ #include #include +#include #include #include #include diff --git a/common/avb_verify.c b/common/avb_verify.c index 36898a610f8..2f5bd576ec3 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index 3b98fac4af4..1aee896e438 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -11,6 +11,7 @@ #include #include +#include #include /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG) diff --git a/common/bootm.c b/common/bootm.c index 02295daf79f..b031c5ce205 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -7,6 +7,7 @@ #ifndef USE_HOSTCC #include #include +#include #include #include #include diff --git a/common/bouncebuf.c b/common/bouncebuf.c index a7098e2caf4..8363613b007 100644 --- a/common/bouncebuf.c +++ b/common/bouncebuf.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/common/image.c b/common/image.c index 70be47e2518..c2978186cd2 100644 --- a/common/image.c +++ b/common/image.c @@ -8,6 +8,7 @@ #ifndef USE_HOSTCC #include +#include #include #include #include diff --git a/common/lcd.c b/common/lcd.c index b34754fe518..6e1f471231d 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c index a6b4480ed22..7bb91c064dc 100644 --- a/common/spl/spl_opensbi.c +++ b/common/spl/spl_opensbi.c @@ -6,6 +6,7 @@ * Based on common/spl/spl_atf.c */ #include +#include #include #include #include diff --git a/common/update.c b/common/update.c index 457b29f42aa..fe116626798 100644 --- a/common/update.c +++ b/common/update.c @@ -7,6 +7,7 @@ */ #include +#include #if !(defined(CONFIG_FIT) && defined(CONFIG_OF_LIBFDT)) #error "CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature" diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 9a08575053d..ebee137e241 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -9,6 +9,7 @@ * This driver provides a SCSI interface to SATA. */ #include +#include #include #include diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index afced8e7e3f..b17c3da9d6d 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/drivers/ata/dwc_ahsata.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ata/fsl_ahci.c b/drivers/ata/fsl_ahci.c index d04cff3ee71..02bcb19dc86 100644 --- a/drivers/ata/fsl_ahci.c +++ b/drivers/ata/fsl_ahci.c @@ -6,6 +6,7 @@ * */ #include +#include #include #include #include diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c index e70a515effd..1c97e932f67 100644 --- a/drivers/ata/fsl_sata.c +++ b/drivers/ata/fsl_sata.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 2a630d46c14..435fdacce38 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index a8598d9f21d..b42bd929dd5 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c index 66c1284c5bb..9c459b5b372 100644 --- a/drivers/bootcount/bootcount.c +++ b/drivers/bootcount/bootcount.c @@ -5,6 +5,7 @@ */ #include +#include #include /* Now implement the generic default functions */ diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c index edef36724b0..1895bc0f6a3 100644 --- a/drivers/bootcount/bootcount_ram.c +++ b/drivers/bootcount/bootcount_ram.c @@ -5,6 +5,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/core/device.c b/drivers/core/device.c index 05dadf98f95..983ec9840ef 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c index ce6aa05fe7f..9726df17f54 100644 --- a/drivers/crypto/fsl/fsl_blob.c +++ b/drivers/crypto/fsl/fsl_blob.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c index c2686df02f1..f0f8c3bd989 100644 --- a/drivers/crypto/fsl/fsl_hash.c +++ b/drivers/crypto/fsl/fsl_hash.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include "jobdesc.h" diff --git a/drivers/crypto/fsl/jobdesc.c b/drivers/crypto/fsl/jobdesc.c index 317f73c42bd..8c4e313559e 100644 --- a/drivers/crypto/fsl/jobdesc.c +++ b/drivers/crypto/fsl/jobdesc.c @@ -8,6 +8,7 @@ */ #include +#include #include #include "desc_constr.h" #include "jobdesc.h" diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index 1ea9db6850f..13336a25e1b 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -6,6 +6,7 @@ */ #include +#include #include #include "fsl_sec.h" #include "jr.h" diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index ac589feeb7d..5755965a9fe 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -9,6 +9,7 @@ * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. */ +#include #include #include diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c index e7bd1b2350f..ea803493edb 100644 --- a/drivers/dma/bcm6348-iudma.c +++ b/drivers/dma/bcm6348-iudma.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c index 9c961cf1e2c..8f81cc1eec9 100644 --- a/drivers/dma/dma-uclass.c +++ b/drivers/dma/dma-uclass.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index a5fc7809bc4..fe486d2cc10 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -6,6 +6,7 @@ #define pr_fmt(fmt) "udma: " fmt #include +#include #include #include #include diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c index 22bfdd8dce6..a957e1ce479 100644 --- a/drivers/fpga/zynqmppl.c +++ b/drivers/fpga/zynqmppl.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index ebe7bcdd900..584e14f932f 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 28d2312ef75..045dde319c6 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 43106dec756..91c19d7c8a7 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c index 4557cd3dd78..dc374b2eed8 100644 --- a/drivers/mmc/fsl_esdhc_spl.c +++ b/drivers/mmc/fsl_esdhc_spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index 767dfff8055..f1c3e6b894e 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index bade129aea9..bdc92ecb9b7 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index fbc576fd726..8d93a3efa47 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 32434a4762f..d1acc45f5a8 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c index 812205a21f6..75967445cd5 100644 --- a/drivers/mmc/tmio-common.c +++ b/drivers/mmc/tmio-common.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index e0eb1339ecd..eb1d50c8c60 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -5,6 +5,7 @@ * Copyright (C) 2009-2010, Intel Corporation and its suppliers. */ +#include #include #include #include diff --git a/drivers/mtd/nand/raw/fsl_elbc_spl.c b/drivers/mtd/nand/raw/fsl_elbc_spl.c index 099d86427c5..523173174d6 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_spl.c +++ b/drivers/mtd/nand/raw/fsl_elbc_spl.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/fsl_ifc_spl.c b/drivers/mtd/nand/raw/fsl_ifc_spl.c index 7137eb4108c..c97beec581b 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_spl.c +++ b/drivers/mtd/nand/raw/fsl_ifc_spl.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index a41b9620d0a..06f212452dc 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c index 5c55f1557f5..910aa53a640 100644 --- a/drivers/mtd/pic32_flash.c +++ b/drivers/mtd/pic32_flash.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c index b90e6a5527a..6b31029776d 100644 --- a/drivers/mtd/spi/fsl_espi_spl.c +++ b/drivers/mtd/spi/fsl_espi_spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c index 7f1dee4b3e4..c7c398f85b0 100644 --- a/drivers/net/ag7xxx.c +++ b/drivers/net/ag7xxx.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index fb878d4e636..d27b4873dea 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c index db3e79ade37..98034393ca4 100644 --- a/drivers/net/bcm-sf2-eth-gmac.c +++ b/drivers/net/bcm-sf2-eth-gmac.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 145eeac45fd..6ef41d5ee06 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 455709338ce..5289ce01e7e 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -28,6 +28,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index a34f6974611..0cba942afc8 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -30,6 +30,7 @@ tested on both gig copper and gig fiber boards */ #include +#include #include #include #include diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 3d43a58d4af..bae481977be 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 080dbcf7db4..04020cfe80b 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index c980ba4edb9..1a06fad8725 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -5,6 +5,7 @@ * Copyright 2017-2018 NXP */ #include +#include #include #include #include diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c index 92c38a81bd3..2dbc66e8774 100644 --- a/drivers/net/ftgmac100.c +++ b/drivers/net/ftgmac100.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index d8f1dde6579..58f4dc79ce1 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c index 1be8359133d..d7de4db14ac 100644 --- a/drivers/net/higmacv300.c +++ b/drivers/net/higmacv300.c @@ -3,6 +3,7 @@ * Copyright (c) 2019, Linaro Limited */ +#include #include #include #include diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index 34253e39249..21d1bbe53ac 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 377188e361c..c21f6ee583d 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -4,6 +4,7 @@ */ #include #include +#include #include /* diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c index 7833b2f47aa..11e187a869a 100644 --- a/drivers/net/mt7628-eth.c +++ b/drivers/net/mt7628-eth.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c index 0ef814c78b9..c9a10beefa9 100644 --- a/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 333be8ff28b..e906d0d62f9 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index bd89725e777..5b23c11714d 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c index 2286dd07e93..55810787438 100644 --- a/drivers/net/pch_gbe.c +++ b/drivers/net/pch_gbe.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index eda6743ec35..aff15ca6496 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c index 39c4b10ab83..9d6b9e0d650 100644 --- a/drivers/net/pic32_eth.c +++ b/drivers/net/pic32_eth.c @@ -4,6 +4,7 @@ * */ #include +#include #include #include #include diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 11abe5e0c9e..51c975b1cf9 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 13309970e2c..f1250199024 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -72,6 +72,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 521e5909a25..9d32ba13a6e 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -40,6 +40,7 @@ * Modified to use le32_to_cpu and cpu_to_le32 properly */ #include +#include #include #include #include diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 749f6519208..93acb86082e 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c index ba51ea5e386..a0c1bba6a6a 100644 --- a/drivers/net/sni_ave.c +++ b/drivers/net/sni_ave.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 0629b16e57c..1dd8a5eca62 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index 20ddb44dd89..df5a8f4346a 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c index 2bd9c51079d..98628ced444 100644 --- a/drivers/net/ti/davinci_emac.c +++ b/drivers/net/ti/davinci_emac.c @@ -23,6 +23,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 26c21c6d70f..bc5aa24f00c 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 033efb81956..0d9985eedce 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index f279c758683..9296800c2b4 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c index 67937a75957..e83de62c927 100644 --- a/drivers/remoteproc/rproc-elf-loader.c +++ b/drivers/remoteproc/rproc-elf-loader.c @@ -3,6 +3,7 @@ * Copyright (C) 2019, STMicroelectronics - All Rights Reserved */ #include +#include #include #include #include diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index 3a9756fbf1b..77c8fabeb72 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 77fa17ee8ab..fdaad40a8b4 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c index 04ea42cbccc..c6e393139df 100644 --- a/drivers/spi/zynqmp_gqspi.c +++ b/drivers/spi/zynqmp_gqspi.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 56e2a046bf0..b5b9d6f75b5 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 406bf0b3628..ef431083a90 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 818efb3e8d7..cfc73f3992b 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -13,6 +13,7 @@ * commit c00552ebaf : Merge 3.18-rc7 into usb-next */ #include +#include #include #include diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 085f7b89688..742e114b55b 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h index f660d53231b..7fbc886233c 100644 --- a/drivers/usb/dwc3/io.h +++ b/drivers/usb/dwc3/io.h @@ -17,6 +17,7 @@ #ifndef __DRIVERS_USB_DWC3_IO_H #define __DRIVERS_USB_DWC3_IO_H +#include #include #define CACHELINE_SIZE CONFIG_SYS_CACHELINE_SIZE diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index bd596ce9773..e3bf6d5dec5 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c index 7eb632d3b14..7dddbfb5e3e 100644 --- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c +++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c @@ -17,6 +17,9 @@ * Lukasz Majewski */ +#include +#include + static u8 clear_feature_num; int clear_feature_flag; diff --git a/drivers/usb/gadget/fotg210.c b/drivers/usb/gadget/fotg210.c index 176068cbfb8..dfc057ca7ce 100644 --- a/drivers/usb/gadget/fotg210.c +++ b/drivers/usb/gadget/fotg210.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 350d820a6e5..bbf0273c0e5 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 61a61abb211..65809c4f86f 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -7,6 +7,7 @@ * All rights reserved. */ #include +#include #include #include #include diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 57e92a9c893..b9d9ba2b28a 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -28,6 +28,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 84c2c3344ad..821ec32484a 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index b2cfd948f81..b9f0b2bfba9 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index b3e4dcd66fa..26e7a8b37cc 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c index 120d41f41f6..ebe2249e329 100644 --- a/drivers/video/atmel_hlcdfb.c +++ b/drivers/video/atmel_hlcdfb.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index c45b3ebe6ea..9172a3b0113 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index d4071c06615..8700aae2942 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 423f1023ad1..6dedb37a067 100644 --- a/include/common.h +++ b/include/common.h @@ -218,30 +218,6 @@ void reset_timer (void); void enable_interrupts (void); int disable_interrupts (void); -/* arch/$(ARCH)/lib/cache.c */ -void enable_caches(void); -void flush_cache (unsigned long, unsigned long); -void flush_dcache_all(void); -void flush_dcache_range(unsigned long start, unsigned long stop); -void invalidate_dcache_range(unsigned long start, unsigned long stop); -void invalidate_dcache_all(void); -void invalidate_icache_all(void); - -enum { - /* Disable caches (else flush caches but leave them active) */ - CBL_DISABLE_CACHES = 1 << 0, - CBL_SHOW_BOOTSTAGE_REPORT = 1 << 1, - - CBL_ALL = 3, -}; - -/** - * Clean up ready for linux - * - * @param flags Flags to control what is done - */ -int cleanup_before_linux_select(int flags); - /* lib/uuid.c */ #include diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h index a14d23a36de..46f3d92459b 100644 --- a/include/cpu_legacy.h +++ b/include/cpu_legacy.h @@ -60,4 +60,28 @@ void dcache_enable(void); void dcache_disable(void); void mmu_disable(void); +/* arch/$(ARCH)/lib/cache.c */ +void enable_caches(void); +void flush_cache(unsigned long addr, unsigned long size); +void flush_dcache_all(void); +void flush_dcache_range(unsigned long start, unsigned long stop); +void invalidate_dcache_range(unsigned long start, unsigned long stop); +void invalidate_dcache_all(void); +void invalidate_icache_all(void); + +enum { + /* Disable caches (else flush caches but leave them active) */ + CBL_DISABLE_CACHES = 1 << 0, + CBL_SHOW_BOOTSTAGE_REPORT = 1 << 1, + + CBL_ALL = 3, +}; + +/** + * Clean up ready for linux + * + * @param flags Flags to control what is done + */ +int cleanup_before_linux_select(int flags); +; #endif diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 13541cfa7a2..25023511c96 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 72555f07fc1..334576b1f72 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c index ce247057774..d3c5773f7b3 100644 --- a/post/cpu/mpc83xx/ecc.c +++ b/post/cpu/mpc83xx/ecc.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include From patchwork Mon Sep 30 14:41:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169445 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="YTmSB8QP"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hltX1Xz7z9s00 for ; Tue, 1 Oct 2019 00:59:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D1E55C21E50; Mon, 30 Sep 2019 14:52:54 +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 C984BC21F05; Mon, 30 Sep 2019 14:42:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B6D06C21DFD; Mon, 30 Sep 2019 14:41:58 +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 EBABDC21E47 for ; Mon, 30 Sep 2019 14:41:44 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id b136so38940683iof.3 for ; Mon, 30 Sep 2019 07:41:44 -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=i5PPqiLtT8sRhfcunpxYDZYR1TYdTm8yQETxp8cs4iQ=; b=YTmSB8QPXNyz9S9Rj513p7KAlAYrxzwQFZN/QzzjM6FL3XQWKd9fFz1wHfjxeDjuj1 o/zv0iUGb1U8Xa6S+AR06dA0N0S4owiKftCk1ZuaY3u0l5TSfzBk+RaqJFGQ5lIoKVbZ k1LqeOOdWOmPabgK0EzFs5dd8X6yzqWQU3r38= 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=i5PPqiLtT8sRhfcunpxYDZYR1TYdTm8yQETxp8cs4iQ=; b=QtK4VBXzaxjUDkaUn0xomXud6TtYPewJqpNIwtK+zywpfXNGn1fbiWCX6rq4G2cR4k RnsIXW4+OSicCI8OFz+NCYr+X7Lc0aJ+7aAEAG5Pt2A0AYhnM+dIZJt2MvinR8KnopiR Were7gJ3xjEwN9I9tQ2SPzaKz09EpLDeWzY+lOYdS32EMygqzTP0kYB4sVn2V4vC802W hgOJAW0tf9SGEFpUToW2bJpoZ1r/Jau8GCNulejvcQx8srkbkh5qrrcbMWcmRo4X7Im/ Fyltpibm6N7u1RYkByws85TO5WHvxT1e1oTRwROqnMBJWR/wV6xLZGVzpEKg5paiYK5L SqHA== X-Gm-Message-State: APjAAAXojaQsttdNxUyUtnPlArqyx80gysan8hlTOsMWh+vBP4fT8tac HgBcPdaHBE27I1GjsFsWdUK8AdABSBU= X-Google-Smtp-Source: APXvYqyQtVtERq8Z7Q4f3Zw3hyifbya5bLJJ5bduYVFaZNoVKAonmOFXuINePp7Qtj7f4lrrz2fWPw== X-Received: by 2002:a92:ce48:: with SMTP id a8mr19187339ilr.281.1569854503648; Mon, 30 Sep 2019 07:41:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:43 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:02 -0600 Message-Id: <20190930144112.175618-32-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 , Andy Fleming , Stefan Roese Subject: [U-Boot] [PATCH 31/41] arm: powerpc: Tidy up code style for interrupt functions 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" Remove the unwanted space before the bracket. Signed-off-by: Simon Glass --- arch/arm/cpu/arm11/cpu.c | 2 +- arch/arm/cpu/arm920t/cpu.c | 2 +- arch/arm/cpu/arm926ejs/cpu.c | 2 +- arch/arm/cpu/arm946es/cpu.c | 2 +- arch/arm/cpu/sa1100/cpu.c | 2 +- arch/arm/lib/interrupts.c | 6 +++--- arch/m68k/lib/interrupts.c | 8 ++++---- arch/nios2/cpu/interrupts.c | 14 +++++++------- arch/powerpc/cpu/mpc83xx/cpu.c | 2 +- arch/powerpc/cpu/mpc83xx/interrupts.c | 6 +++--- arch/powerpc/cpu/mpc86xx/interrupts.c | 2 +- arch/powerpc/lib/interrupts.c | 8 ++++---- arch/sh/cpu/sh4/interrupts.c | 6 +++--- board/cobra5272/flash.c | 8 ++++---- 14 files changed, 35 insertions(+), 35 deletions(-) diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c index a546ec21de4..280622fe33a 100644 --- a/arch/arm/cpu/arm11/cpu.c +++ b/arch/arm/cpu/arm11/cpu.c @@ -30,7 +30,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* turn off I/D-cache */ icache_disable(); diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c index a98c86eaf3f..e632aa52f8c 100644 --- a/arch/arm/cpu/arm920t/cpu.c +++ b/arch/arm/cpu/arm920t/cpu.c @@ -28,7 +28,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* turn off I/D-cache */ icache_disable(); diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index 6d06fb758ab..f4b27d93be6 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -28,7 +28,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* turn off I/D-cache */ diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c index 0a78ffbae1a..19b805096f4 100644 --- a/arch/arm/cpu/arm946es/cpu.c +++ b/arch/arm/cpu/arm946es/cpu.c @@ -29,7 +29,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* ARM926E-S needs the protection unit enabled for the icache to have * been enabled - left for possible later use diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index 8ef9f294f23..ec408564c1e 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -30,7 +30,7 @@ int cleanup_before_linux (void) * just disable everything that can disturb booting linux */ - disable_interrupts (); + disable_interrupts(); /* turn off I-cache */ icache_disable(); diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index ee775ce5d26..e78ca56d253 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; -int interrupt_init (void) +int interrupt_init(void) { /* * setup up stacks if necessary @@ -35,11 +35,11 @@ int interrupt_init (void) return 0; } -void enable_interrupts (void) +void enable_interrupts(void) { return; } -int disable_interrupts (void) +int disable_interrupts(void) { return 0; } diff --git a/arch/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c index 2d1c6136a11..85ae3b4ee07 100644 --- a/arch/m68k/lib/interrupts.c +++ b/arch/m68k/lib/interrupts.c @@ -42,7 +42,7 @@ static __inline__ void set_sr (unsigned short sr) /* * Install and free an interrupt handler */ -void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg) +void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg) { if ((vec < 0) || (vec >= NR_IRQS)) { printf ("irq_install_handler: wrong interrupt vector %d\n", @@ -54,7 +54,7 @@ void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg) irq_vecs[vec].arg = arg; } -void irq_free_handler (int vec) +void irq_free_handler(int vec) { if ((vec < 0) || (vec >= NR_IRQS)) { return; @@ -64,7 +64,7 @@ void irq_free_handler (int vec) irq_vecs[vec].arg = NULL; } -void enable_interrupts (void) +void enable_interrupts(void) { unsigned short sr; @@ -72,7 +72,7 @@ void enable_interrupts (void) set_sr (sr & ~0x0700); } -int disable_interrupts (void) +int disable_interrupts(void) { unsigned short sr; diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c index 6b5d0724e34..96c30209353 100644 --- a/arch/nios2/cpu/interrupts.c +++ b/arch/nios2/cpu/interrupts.c @@ -23,7 +23,7 @@ struct irq_action { static struct irq_action vecs[32]; -int disable_interrupts (void) +int disable_interrupts(void) { int val = rdctl (CTL_STATUS); wrctl (CTL_STATUS, val & ~STATUS_IE); @@ -36,7 +36,7 @@ void enable_interrupts( void ) wrctl (CTL_STATUS, val | STATUS_IE); } -void external_interrupt (struct pt_regs *regs) +void external_interrupt(struct pt_regs *regs) { unsigned irqs; struct irq_action *act; @@ -73,7 +73,7 @@ static void def_hdlr (void *arg) } /*************************************************************************/ -void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg) +void irq_install_handler(int irq, interrupt_handler_t *hdlr, void *arg) { int flag; @@ -84,7 +84,7 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg) return; act = &vecs[irq]; - flag = disable_interrupts (); + flag = disable_interrupts(); if (hdlr) { act->handler = hdlr; act->arg = arg; @@ -95,11 +95,11 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg) ena &= ~(1 << irq); /* disable */ } wrctl (CTL_IENABLE, ena); - if (flag) enable_interrupts (); + if (flag) enable_interrupts(); } -int interrupt_init (void) +int interrupt_init(void) { int i; @@ -110,7 +110,7 @@ int interrupt_init (void) vecs[i].count = 0; } - enable_interrupts (); + enable_interrupts(); return (0); } diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 1c0d0d26320..71e4bb3f287 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -196,7 +196,7 @@ void watchdog_reset (void) immr->wdt.swsrr = 0xaa39; if (re_enable) - enable_interrupts (); + enable_interrupts(); } #endif diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c index 520c2c363e3..04cd1473214 100644 --- a/arch/powerpc/cpu/mpc83xx/interrupts.c +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c @@ -35,7 +35,7 @@ void interrupt_init_cpu (unsigned *decrementer_count) * Handle external interrupts */ -void external_interrupt (struct pt_regs *regs) +void external_interrupt(struct pt_regs *regs) { } @@ -45,12 +45,12 @@ void external_interrupt (struct pt_regs *regs) */ void -irq_install_handler (int irq, interrupt_handler_t * handler, void *arg) +irq_install_handler(int irq, interrupt_handler_t * handler, void *arg) { } -void irq_free_handler (int irq) +void irq_free_handler(int irq) { } diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index ed780a599d1..04c8f25af60 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -108,5 +108,5 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) */ void external_interrupt(struct pt_regs *regs) { - puts("external_interrupt (oops!)\n"); + puts("external_interrupt(oops!)\n"); } diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index 4b7f543a180..a58ddfa569c 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -38,13 +38,13 @@ static __inline__ void set_dec (unsigned long val) } #endif /* !CONFIG_MPC83XX_TIMER */ -void enable_interrupts (void) +void enable_interrupts(void) { set_msr (get_msr () | MSR_EE); } /* returns flag if MSR_EE was set before */ -int disable_interrupts (void) +int disable_interrupts(void) { ulong msr = get_msr (); @@ -53,7 +53,7 @@ int disable_interrupts (void) } #ifndef CONFIG_MPC83XX_TIMER -int interrupt_init (void) +int interrupt_init(void) { /* call cpu specific function from $(CPU)/interrupts.c */ interrupt_init_cpu (&decrementer_count); @@ -67,7 +67,7 @@ int interrupt_init (void) static volatile ulong timestamp = 0; -void timer_interrupt (struct pt_regs *regs) +void timer_interrupt(struct pt_regs *regs) { /* call cpu specific function from $(CPU)/interrupts.c */ timer_interrupt_cpu (regs); diff --git a/arch/sh/cpu/sh4/interrupts.c b/arch/sh/cpu/sh4/interrupts.c index ff7470ecccb..5982aad54eb 100644 --- a/arch/sh/cpu/sh4/interrupts.c +++ b/arch/sh/cpu/sh4/interrupts.c @@ -6,16 +6,16 @@ #include -int interrupt_init (void) +int interrupt_init(void) { return 0; } -void enable_interrupts (void) +void enable_interrupts(void) { } -int disable_interrupts (void){ +int disable_interrupts(void){ return 0; } diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 0e1d9ce8d35..ccff46adf8b 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -167,7 +167,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) cflag = icache_status(); icache_disable(); - iflag = disable_interrupts (); + iflag = disable_interrupts(); printf ("\n"); @@ -235,7 +235,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) udelay (10000); if (iflag) - enable_interrupts (); + enable_interrupts(); if (cflag) icache_enable(); @@ -270,7 +270,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) cflag = icache_status(); icache_disable(); - iflag = disable_interrupts (); + iflag = disable_interrupts(); MEM_FLASH_ADDR1 = CMD_UNLOCK1; MEM_FLASH_ADDR2 = CMD_UNLOCK2; @@ -301,7 +301,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) rc = ERR_PROG_ERROR; if (iflag) - enable_interrupts (); + enable_interrupts(); if (cflag) icache_enable(); From patchwork Mon Sep 30 14:41:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169426 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="NcJ1WkRq"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlfL39q3z9s00 for ; Tue, 1 Oct 2019 00:49:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 04C0EC21D72; Mon, 30 Sep 2019 14:49:00 +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 CF5BBC21ED5; Mon, 30 Sep 2019 14:42:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 47ACBC21EC8; Mon, 30 Sep 2019 14:42:00 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 073D6C21E35 for ; Mon, 30 Sep 2019 14:41:46 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id v2so38843416iob.10 for ; Mon, 30 Sep 2019 07:41:45 -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=EgVb7BflDkNiCnCu45dFH1IkKPCyeYP9KKQKvJZNMr4=; b=NcJ1WkRqHbVliNHUvxhlysmZtHNUZRmVhCPO49IuZg1z6jegsD7SHYDcUI0KkqXXNv /aGfztnv9ZYVAJIROXBS+2MpQu1whcuM/Oihg/fW9lEdYcu+nV8JFtml/Sp8naM8AZG1 7R9gC+BhUp7KwpEZZ9DufB+l85mOk2gLrtRY0= 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=EgVb7BflDkNiCnCu45dFH1IkKPCyeYP9KKQKvJZNMr4=; b=TvnwgbpBwav5sXL7bQlT0ewG1oY7zd6Msr/deKEd5/zFvHUh1S0zbMQPY3+HhTpUAO q2TA2YubbsQuKh0YFzbW9Lhk2PAnOFj4NeG4k845rddZS+ntU0M5kvpDY54IueghG5lz ibf4A3OQMuWcXf1J5Bbg9UMJC/80CO1UPt+DhUxcKvJof1tw9JPofDmONb29rYBIfQ5w 5nTDhYtkCA5R/a6IOl3I5hSBA+mBWODcK4gewpuaORuggKMgqLJvg1x3BAQoJIixgShY e0s+LT6B/L5KJCi2GT1/DtsL9HKIwu/S4G33Euzls+PRH3TTqnPoBBs02EktlvkA/QZe PYwQ== X-Gm-Message-State: APjAAAWfAYg3nb8hRA1ZtsVWILyY0xTr9qXI+c4TqdGoRu3/UC/uJijx ubkfKRtFTPSS69Nc2KY4fhv62tKCIz4= X-Google-Smtp-Source: APXvYqzlrpUty0R3vB01f3b4DlZus3fYSToh6yLVu978gVfE3uDepGpI/u9EzNW0bH/pvX7SiPBmFg== X-Received: by 2002:a92:1a4f:: with SMTP id z15mr20903180ill.199.1569854504381; Mon, 30 Sep 2019 07:41:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:03 -0600 Message-Id: <20190930144112.175618-33-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 32/41] common: Move interrupt functions into a new header 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" These functions do not use driver model but are fairly widely used in U-Boot. Move them to a new irq_legacy.h header file. Signed-off-by: Simon Glass --- arch/arc/lib/interrupts.c | 1 + arch/arm/lib/interrupts.c | 1 + arch/arm/lib/interrupts_64.c | 1 + arch/arm/lib/interrupts_m.c | 1 + arch/m68k/cpu/mcf5227x/interrupts.c | 1 + arch/m68k/cpu/mcf523x/interrupts.c | 1 + arch/m68k/cpu/mcf52x2/interrupts.c | 1 + arch/m68k/cpu/mcf530x/interrupts.c | 1 + arch/m68k/cpu/mcf532x/interrupts.c | 1 + arch/m68k/cpu/mcf5445x/interrupts.c | 1 + arch/m68k/cpu/mcf547x_8x/interrupts.c | 1 + arch/m68k/cpu/mcf547x_8x/slicetimer.c | 1 + arch/m68k/lib/interrupts.c | 1 + arch/m68k/lib/time.c | 1 + arch/microblaze/cpu/interrupts.c | 1 + arch/mips/cpu/interrupts.c | 1 + arch/mips/mach-jz47xx/jz4780/timer.c | 1 + arch/nds32/cpu/n1213/ag101/timer.c | 1 + arch/nds32/lib/interrupts.c | 1 + arch/nios2/cpu/interrupts.c | 1 + arch/powerpc/cpu/mpc83xx/interrupts.c | 1 + arch/powerpc/cpu/mpc85xx/interrupts.c | 1 + arch/powerpc/cpu/mpc85xx/traps.c | 1 + arch/powerpc/cpu/mpc86xx/interrupts.c | 1 + arch/powerpc/cpu/mpc8xx/interrupts.c | 1 + arch/powerpc/lib/interrupts.c | 1 + arch/riscv/lib/interrupts.c | 1 + arch/sandbox/lib/interrupts.c | 1 + arch/sh/cpu/sh4/interrupts.c | 1 + arch/x86/cpu/i386/interrupt.c | 1 + arch/x86/cpu/x86_64/interrupts.c | 1 + arch/x86/lib/bios.c | 1 + arch/x86/lib/interrupts.c | 1 + arch/x86/lib/spl.c | 1 + arch/xtensa/cpu/exceptions.c | 1 + common/board_r.c | 1 + common/spl/spl.c | 1 + drivers/mtd/cfi_flash.c | 1 + drivers/timer/mpc83xx_timer.c | 1 + include/common.h | 7 ------- include/exports.h | 2 ++ include/irq_legacy.h | 17 +++++++++++++++++ 42 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 include/irq_legacy.h diff --git a/arch/arc/lib/interrupts.c b/arch/arc/lib/interrupts.c index 24ff7512209..4aef49aea3d 100644 --- a/arch/arc/lib/interrupts.c +++ b/arch/arc/lib/interrupts.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index e78ca56d253..82802c0004c 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c index 0bfdb8d93d2..f2694779dc0 100644 --- a/arch/arm/lib/interrupts_64.c +++ b/arch/arm/lib/interrupts_64.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/arm/lib/interrupts_m.c b/arch/arm/lib/interrupts_m.c index 95df6cb1eb8..6a4beaf3ece 100644 --- a/arch/arm/lib/interrupts_m.c +++ b/arch/arm/lib/interrupts_m.c @@ -5,6 +5,7 @@ */ #include +#include /* * Upon exception entry ARMv7-M processors automatically save stack diff --git a/arch/m68k/cpu/mcf5227x/interrupts.c b/arch/m68k/cpu/mcf5227x/interrupts.c index d38f01950b1..0d0ad5ed022 100644 --- a/arch/m68k/cpu/mcf5227x/interrupts.c +++ b/arch/m68k/cpu/mcf5227x/interrupts.c @@ -10,6 +10,7 @@ /* CPU specific interrupt routine */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf523x/interrupts.c b/arch/m68k/cpu/mcf523x/interrupts.c index 1d03724f15c..a524801151d 100644 --- a/arch/m68k/cpu/mcf523x/interrupts.c +++ b/arch/m68k/cpu/mcf523x/interrupts.c @@ -7,6 +7,7 @@ /* CPU specific interrupt routine */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf52x2/interrupts.c b/arch/m68k/cpu/mcf52x2/interrupts.c index f874675b12f..4b20cf5751b 100644 --- a/arch/m68k/cpu/mcf52x2/interrupts.c +++ b/arch/m68k/cpu/mcf52x2/interrupts.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/cpu/mcf530x/interrupts.c b/arch/m68k/cpu/mcf530x/interrupts.c index cd85c69f129..9e61de7d952 100644 --- a/arch/m68k/cpu/mcf530x/interrupts.c +++ b/arch/m68k/cpu/mcf530x/interrupts.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf532x/interrupts.c b/arch/m68k/cpu/mcf532x/interrupts.c index 43a903ed72e..83c9c2e1b35 100644 --- a/arch/m68k/cpu/mcf532x/interrupts.c +++ b/arch/m68k/cpu/mcf532x/interrupts.c @@ -7,6 +7,7 @@ /* CPU specific interrupt routine */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf5445x/interrupts.c b/arch/m68k/cpu/mcf5445x/interrupts.c index d38f01950b1..0d0ad5ed022 100644 --- a/arch/m68k/cpu/mcf5445x/interrupts.c +++ b/arch/m68k/cpu/mcf5445x/interrupts.c @@ -10,6 +10,7 @@ /* CPU specific interrupt routine */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf547x_8x/interrupts.c b/arch/m68k/cpu/mcf547x_8x/interrupts.c index 2cdf53ea09c..934343bc4a9 100644 --- a/arch/m68k/cpu/mcf547x_8x/interrupts.c +++ b/arch/m68k/cpu/mcf547x_8x/interrupts.c @@ -7,6 +7,7 @@ /* CPU specific interrupt routine */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c index 544bfd20831..7ced4db5f13 100644 --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c index 85ae3b4ee07..00953ac92f1 100644 --- a/arch/m68k/lib/interrupts.c +++ b/arch/m68k/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index c76c5fedc99..9b5364b4a41 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index aea612eef15..900cc618243 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/cpu/interrupts.c b/arch/mips/cpu/interrupts.c index 1c5192ed33f..05e4b0fdca9 100644 --- a/arch/mips/cpu/interrupts.c +++ b/arch/mips/cpu/interrupts.c @@ -5,6 +5,7 @@ */ #include +#include int interrupt_init(void) { diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c index 988ebd26715..e2d38e63734 100644 --- a/arch/mips/mach-jz47xx/jz4780/timer.c +++ b/arch/mips/mach-jz47xx/jz4780/timer.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c index cbfe07e3514..21a9044b983 100644 --- a/arch/nds32/cpu/n1213/ag101/timer.c +++ b/arch/nds32/cpu/n1213/ag101/timer.c @@ -9,6 +9,7 @@ */ #ifndef CONFIG_TIMER #include +#include #include #include #include diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c index 966c19a1ae5..1a47c5c3a94 100644 --- a/arch/nds32/lib/interrupts.c +++ b/arch/nds32/lib/interrupts.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #undef INTERRUPT_MODE diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c index 96c30209353..e414b4feac1 100644 --- a/arch/nios2/cpu/interrupts.c +++ b/arch/nios2/cpu/interrupts.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c index 04cd1473214..5bee590b769 100644 --- a/arch/powerpc/cpu/mpc83xx/interrupts.c +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c index b5a6ead8bde..7e862f11f32 100644 --- a/arch/powerpc/cpu/mpc85xx/interrupts.c +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c index e1d492f05a9..9a249c9b402 100644 --- a/arch/powerpc/cpu/mpc85xx/traps.c +++ b/arch/powerpc/cpu/mpc85xx/traps.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index 04c8f25af60..176c2b06c99 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -15,6 +15,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c index 26aa7a56455..03579ef4a66 100644 --- a/arch/powerpc/cpu/mpc8xx/interrupts.c +++ b/arch/powerpc/cpu/mpc8xx/interrupts.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index a58ddfa569c..906713575d7 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #ifdef CONFIG_LED_STATUS diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index 74c1e561c71..b82b8006301 100644 --- a/arch/riscv/lib/interrupts.c +++ b/arch/riscv/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/sandbox/lib/interrupts.c b/arch/sandbox/lib/interrupts.c index 4ddcd37522d..a0a5373c237 100644 --- a/arch/sandbox/lib/interrupts.c +++ b/arch/sandbox/lib/interrupts.c @@ -6,6 +6,7 @@ */ #include +#include int interrupt_init(void) { diff --git a/arch/sh/cpu/sh4/interrupts.c b/arch/sh/cpu/sh4/interrupts.c index 5982aad54eb..5cb1fcf7ba3 100644 --- a/arch/sh/cpu/sh4/interrupts.c +++ b/arch/sh/cpu/sh4/interrupts.c @@ -5,6 +5,7 @@ */ #include +#include int interrupt_init(void) { diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index 1445204878c..24d034787c0 100644 --- a/arch/x86/cpu/i386/interrupt.c +++ b/arch/x86/cpu/i386/interrupt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/x86_64/interrupts.c b/arch/x86/cpu/x86_64/interrupts.c index 15830d6a1a0..270162f4616 100644 --- a/arch/x86/cpu/x86_64/interrupts.c +++ b/arch/x86/cpu/x86_64/interrupts.c @@ -5,6 +5,7 @@ */ #include +#include #include void enable_interrupts(void) diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index b990f53bfd7..7ca72d15798 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -7,6 +7,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c index 39f8deaed13..d3f1b4bf910 100644 --- a/arch/x86/lib/interrupts.c +++ b/arch/x86/lib/interrupts.c @@ -30,6 +30,7 @@ */ #include +#include #include #if !CONFIG_IS_ENABLED(X86_64) diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 8594ec56b61..96739926fe1 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/xtensa/cpu/exceptions.c b/arch/xtensa/cpu/exceptions.c index fe2dedf3c4b..6e70f322afd 100644 --- a/arch/xtensa/cpu/exceptions.c +++ b/arch/xtensa/cpu/exceptions.c @@ -12,6 +12,7 @@ #include #include +#include #include #include diff --git a/common/board_r.c b/common/board_r.c index 1aee896e438..a7a92b4de57 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -28,6 +28,7 @@ #if defined(CONFIG_CMD_KGDB) #include #endif +#include #include #include #ifdef CONFIG_BITBANGMII diff --git a/common/spl/spl.c b/common/spl/spl.c index 5b0927cecbb..b06ce0ce1ba 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index c59254c76e3..9271ed8e7a7 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 69949d53338..773f0c310ab 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 6dedb37a067..81387d561e2 100644 --- a/include/common.h +++ b/include/common.h @@ -208,13 +208,6 @@ ulong get_bus_freq (ulong); int get_serial_clock(void); /* $(CPU)/interrupts.c */ -int interrupt_init (void); -void timer_interrupt (struct pt_regs *); -void external_interrupt (struct pt_regs *); -void irq_install_handler(int, interrupt_handler_t *, void *); -void irq_free_handler (int); -void reset_timer (void); - void enable_interrupts (void); int disable_interrupts (void); diff --git a/include/exports.h b/include/exports.h index 147a00f860b..fc06c83f848 100644 --- a/include/exports.h +++ b/include/exports.h @@ -1,6 +1,8 @@ #ifndef __EXPORTS_H__ #define __EXPORTS_H__ +#include + #ifndef __ASSEMBLY__ #ifdef CONFIG_PHY_AQUANTIA #include diff --git a/include/irq_legacy.h b/include/irq_legacy.h new file mode 100644 index 00000000000..72a3af65d7a --- /dev/null +++ b/include/irq_legacy.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __IRQ_LEGACY_H +#define __IRQ_LEGACY_H + +int interrupt_init(void); +void timer_interrupt(struct pt_regs *regs); +void external_interrupt(struct pt_regs *regs); +void irq_install_handler (int vec, interrupt_handler_t *handler, void *arg); +void irq_free_handler(int vec); +void reset_timer(void); + +#endif From patchwork Mon Sep 30 14:41:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169457 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="mu7RjeVl"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlxz035gz9s7T for ; Tue, 1 Oct 2019 01:02:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9C896C21E63; Mon, 30 Sep 2019 14:55:08 +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 4D9D8C21E0D; Mon, 30 Sep 2019 14:42:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4BB4EC21F1F; Mon, 30 Sep 2019 14:42:01 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id C306EC21E6A for ; Mon, 30 Sep 2019 14:41:46 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id z19so39055557ior.0 for ; Mon, 30 Sep 2019 07:41:46 -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=fNf6pXkx1aOt8yhMKPwvbYZGcHLc/hP2YfXESR4k8lw=; b=mu7RjeVlfkttcIEBs/kc1r7c+oVfjOVoGt3FoMHmwNF3OhZUeLP6Kw1h6tGf2aAum8 iJtViG3HA/bmIv4HyncxS0Kef7gXuq7UfqhNg10zRJqKwh6e6IV5iKGwj+L84jPh7DNv MgTW/jVYj1UV+ZnAUX2m4ILcd9OnZTNd/8eHo= 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=fNf6pXkx1aOt8yhMKPwvbYZGcHLc/hP2YfXESR4k8lw=; b=mvo0pMHwlfLmk1ipOYq5KbHdFDOa8iBzr/+esp0n/yx43/FKTKodzfGb468L3T6riQ KTBzPdIBThBZ8KTNVVjF1kRwRGNZYSEE4TR9iCxw5BHvSRsmdnFTFL2mWEZDGZYh4c3F 3JfSc/8GPG2emUfYOgaaEn32SIFoaLwcgIpcWJkrZSG9ZPgncw4fi7ABCsrHM9ltAf2Z j2OeBhCqTwZFQVDmcLRuygtY8UQz8Mw6Iunbj1x6pUQ0mFzuDVJZPSNNS2USzGTxcEof J7EU4wOqq+9S2murByXqhEP2sBZ6cmRFMq5TCbANkU/qp5yE9y9Wd4c+StrC9wjdlUZi gjLw== X-Gm-Message-State: APjAAAXP086pCq9ptvoUn8avLZqIsQWTAYmqfE7TzG85iV66o+dKv1y7 njJOdPJ2VPvdS94CR+ggCmlgRPUAZK4= X-Google-Smtp-Source: APXvYqw2on7pf/Efnr99NdcqYNPUxMa0fhAiPCHH+gYyRlYgu0antmcSgXdh/zWvK847ZZdTipzgaw== X-Received: by 2002:a6b:2c02:: with SMTP id s2mr8367653ios.54.1569854505140; Mon, 30 Sep 2019 07:41:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:04 -0600 Message-Id: <20190930144112.175618-34-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 33/41] common: Move enable/disable_interrupts 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" Move these two functions into the irq_legacy.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass --- arch/arc/lib/bootm.c | 1 + arch/arm/cpu/arm11/cpu.c | 1 + arch/arm/cpu/arm920t/cpu.c | 1 + arch/arm/cpu/arm926ejs/cpu.c | 1 + arch/arm/cpu/arm946es/cpu.c | 1 + arch/arm/cpu/armv7/cpu.c | 1 + arch/arm/cpu/armv7m/cpu.c | 1 + arch/arm/cpu/armv8/cpu.c | 1 + arch/arm/cpu/pxa/pxa2xx.c | 1 + arch/arm/cpu/sa1100/cpu.c | 1 + arch/arm/lib/reset.c | 1 + arch/arm/mach-tegra/cmd_enterrcm.c | 1 + arch/microblaze/include/asm/microblaze_intc.h | 2 ++ arch/nds32/cpu/n1213/ag101/cpu.c | 1 + arch/nios2/cpu/cpu.c | 1 + arch/nios2/lib/bootm.c | 1 + arch/powerpc/cpu/mpc83xx/cpu.c | 1 + arch/powerpc/cpu/mpc83xx/ecc.c | 1 + arch/powerpc/cpu/mpc85xx/cpu.c | 1 + arch/riscv/cpu/generic/cpu.c | 1 + arch/sh/cpu/sh4/cpu.c | 1 + arch/sh/lib/zimageboot.c | 1 + arch/x86/lib/zimage.c | 1 + board/bosch/shc/board.c | 1 + board/cobra5272/flash.c | 1 + board/freescale/b4860qds/b4860qds.c | 1 + board/freescale/common/vid.c | 1 + board/freescale/m5253demo/flash.c | 1 + board/freescale/t4qds/t4240qds.c | 1 + board/synopsys/hsdk/hsdk.c | 1 + cmd/booti.c | 1 + cmd/bootz.c | 1 + cmd/fdc.c | 1 + cmd/irq.c | 1 + common/board_r.c | 1 + common/bootm.c | 1 + drivers/firmware/psci.c | 1 + drivers/mtd/pic32_flash.c | 1 + include/common.h | 6 ------ include/exports.h | 2 ++ include/irq_legacy.h | 9 ++++++++- lib/efi_loader/efi_boottime.c | 1 + post/cpu/mpc83xx/ecc.c | 1 + post/lib_powerpc/andi.c | 1 + post/lib_powerpc/b.c | 1 + post/lib_powerpc/cmp.c | 1 + post/lib_powerpc/cmpi.c | 1 + post/lib_powerpc/complex.c | 1 + post/lib_powerpc/cr.c | 1 + post/lib_powerpc/load.c | 1 + post/lib_powerpc/multi.c | 1 + post/lib_powerpc/rlwimi.c | 1 + post/lib_powerpc/rlwinm.c | 1 + post/lib_powerpc/rlwnm.c | 1 + post/lib_powerpc/srawi.c | 1 + post/lib_powerpc/store.c | 1 + post/lib_powerpc/string.c | 1 + post/lib_powerpc/three.c | 1 + post/lib_powerpc/threei.c | 1 + post/lib_powerpc/threex.c | 1 + post/lib_powerpc/two.c | 1 + post/lib_powerpc/twox.c | 1 + 62 files changed, 70 insertions(+), 7 deletions(-) diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 254e0284b3f..15764093c42 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -3,6 +3,7 @@ * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. */ +#include #include #include diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c index 280622fe33a..9aa410458ef 100644 --- a/arch/arm/cpu/arm11/cpu.c +++ b/arch/arm/cpu/arm11/cpu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c index e632aa52f8c..ccdb9f8d5e7 100644 --- a/arch/arm/cpu/arm920t/cpu.c +++ b/arch/arm/cpu/arm920t/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index f4b27d93be6..a5911d904d9 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c index 19b805096f4..24efd186bba 100644 --- a/arch/arm/cpu/arm946es/cpu.c +++ b/arch/arm/cpu/arm946es/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index bf3ebba0523..8f09986cf9a 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c index fed17bd6490..61520f93e7b 100644 --- a/arch/arm/cpu/armv7m/cpu.c +++ b/arch/arm/cpu/armv7m/cpu.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c index 6fdc94ec081..55e13cb5818 100644 --- a/arch/arm/cpu/armv8/cpu.c +++ b/arch/arm/cpu/armv8/cpu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index aad4b52e7b2..48b9368ca24 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index ec408564c1e..caaa5ca546d 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index f3ea116e870..66f916f27a6 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -21,6 +21,7 @@ */ #include +#include __weak void reset_misc(void) { diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c index 4a889f0e342..0259fd4b805 100644 --- a/arch/arm/mach-tegra/cmd_enterrcm.c +++ b/arch/arm/mach-tegra/cmd_enterrcm.c @@ -25,6 +25,7 @@ */ #include +#include #include #include diff --git a/arch/microblaze/include/asm/microblaze_intc.h b/arch/microblaze/include/asm/microblaze_intc.h index b4e0fc69305..09c2ba3a04d 100644 --- a/arch/microblaze/include/asm/microblaze_intc.h +++ b/arch/microblaze/include/asm/microblaze_intc.h @@ -5,6 +5,8 @@ * Michal SIMEK */ +#include + typedef volatile struct microblaze_intc_t { int isr; /* interrupt status register */ int ipr; /* interrupt pending register */ diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c index f43b6960590..16d8b740c9e 100644 --- a/arch/nds32/cpu/n1213/ag101/cpu.c +++ b/arch/nds32/cpu/n1213/ag101/cpu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index 54b6741d4e4..39059b8bcb6 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -9,6 +9,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index c671e032148..836d84decba 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -6,6 +6,7 @@ #include #include +#include #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */ diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 71e4bb3f287..9fc7fce93c6 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c index 10e9b96add1..7633c691710 100644 --- a/arch/powerpc/cpu/mpc83xx/ecc.c +++ b/arch/powerpc/cpu/mpc83xx/ecc.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 8f58924b7ba..5009c6b76a6 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c index ad2950ce40a..ea63d177b55 100644 --- a/arch/riscv/cpu/generic/cpu.c +++ b/arch/riscv/cpu/generic/cpu.c @@ -5,6 +5,7 @@ #include #include +#include /* * cleanup_before_linux() is called just before we call linux diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index d79e6ea71d5..3fb24965de2 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c index 93933b7931d..2fb98e5a449 100644 --- a/arch/sh/lib/zimageboot.c +++ b/arch/sh/lib/zimageboot.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 6a6258a5057..e9639ad9909 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index a96fdef992d..2ceb836019e 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index ccff46adf8b..ec315dc479b 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -7,6 +7,7 @@ #include #include #include +#include #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE #define FLASH_BANK_SIZE 0x200000 diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 33cd4b49648..29c9fa00789 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index b37f3bf4f8f..5cccb870f60 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #ifdef CONFIG_FSL_LSCH2 #include diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index 0706b62396d..004fbee0ac3 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -8,6 +8,7 @@ */ #include +#include #include diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index bb18b97e6a2..8b60121ddf1 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 13607557103..6e226e5d7dd 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/booti.c b/cmd/booti.c index c36b0235df8..6c9f40a85f0 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bootz.c b/cmd/bootz.c index 0e75509ee96..6b781e28752 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/cmd/fdc.c b/cmd/fdc.c index 7bfaae0e381..2e879de4ae7 100644 --- a/cmd/fdc.c +++ b/cmd/fdc.c @@ -11,6 +11,7 @@ #include #include #include +#include #undef FDC_DEBUG diff --git a/cmd/irq.c b/cmd/irq.c index bcc718b4bc8..43ab6be6730 100644 --- a/cmd/irq.c +++ b/cmd/irq.c @@ -6,6 +6,7 @@ #include #include #include +#include static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) diff --git a/common/board_r.c b/common/board_r.c index a7a92b4de57..65cce0e8054 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG) diff --git a/common/bootm.c b/common/bootm.c index b031c5ce205..c841a344985 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index c8c47acfd34..054494dfca6 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c index 910aa53a640..610cefaea48 100644 --- a/drivers/mtd/pic32_flash.c +++ b/drivers/mtd/pic32_flash.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 81387d561e2..c22eb63501f 100644 --- a/include/common.h +++ b/include/common.h @@ -46,8 +46,6 @@ typedef volatile unsigned char vu_char; #include -typedef void (interrupt_handler_t)(void *); - #include /* boot information for Linux kernel */ #include /* global data used for startup functions */ @@ -207,10 +205,6 @@ int get_clocks (void); ulong get_bus_freq (ulong); int get_serial_clock(void); -/* $(CPU)/interrupts.c */ -void enable_interrupts (void); -int disable_interrupts (void); - /* lib/uuid.c */ #include diff --git a/include/exports.h b/include/exports.h index fc06c83f848..cd57f10601d 100644 --- a/include/exports.h +++ b/include/exports.h @@ -9,6 +9,8 @@ #include #endif +#include + struct spi_slave; /* These are declarations of exported functions available in C code */ diff --git a/include/irq_legacy.h b/include/irq_legacy.h index 72a3af65d7a..91b523d043a 100644 --- a/include/irq_legacy.h +++ b/include/irq_legacy.h @@ -7,11 +7,18 @@ #ifndef __IRQ_LEGACY_H #define __IRQ_LEGACY_H +struct pt_regs; + +typedef void (interrupt_handler_t)(void *arg); + int interrupt_init(void); void timer_interrupt(struct pt_regs *regs); void external_interrupt(struct pt_regs *regs); -void irq_install_handler (int vec, interrupt_handler_t *handler, void *arg); +void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg); void irq_free_handler(int vec); void reset_timer(void); +void enable_interrupts(void); +int disable_interrupts(void); + #endif diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 265297ed46f..ab8b6527923 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c index d3c5773f7b3..dfbfd5d1568 100644 --- a/post/cpu/mpc83xx/ecc.c +++ b/post/cpu/mpc83xx/ecc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/post/lib_powerpc/andi.c b/post/lib_powerpc/andi.c index 49c5ee63498..d8cd9b3fc82 100644 --- a/post/lib_powerpc/andi.c +++ b/post/lib_powerpc/andi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/b.c b/post/lib_powerpc/b.c index 67edee01074..9e685e193f4 100644 --- a/post/lib_powerpc/b.c +++ b/post/lib_powerpc/b.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/cmp.c b/post/lib_powerpc/cmp.c index 79b22ebab71..fdacc40b14e 100644 --- a/post/lib_powerpc/cmp.c +++ b/post/lib_powerpc/cmp.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/cmpi.c b/post/lib_powerpc/cmpi.c index b5b47bafb27..f5e0b274de0 100644 --- a/post/lib_powerpc/cmpi.c +++ b/post/lib_powerpc/cmpi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/complex.c b/post/lib_powerpc/complex.c index 7ab3c352acb..b3435320158 100644 --- a/post/lib_powerpc/complex.c +++ b/post/lib_powerpc/complex.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/cr.c b/post/lib_powerpc/cr.c index 93de47a1cff..01298fbcb21 100644 --- a/post/lib_powerpc/cr.c +++ b/post/lib_powerpc/cr.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/load.c b/post/lib_powerpc/load.c index 3fbd8babfa5..6e7251703ba 100644 --- a/post/lib_powerpc/load.c +++ b/post/lib_powerpc/load.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c index 51750bb0707..eafd06f1995 100644 --- a/post/lib_powerpc/multi.c +++ b/post/lib_powerpc/multi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/rlwimi.c b/post/lib_powerpc/rlwimi.c index 16e642238e1..59f8f574053 100644 --- a/post/lib_powerpc/rlwimi.c +++ b/post/lib_powerpc/rlwimi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/rlwinm.c b/post/lib_powerpc/rlwinm.c index f88d62a73bd..5496d3cef15 100644 --- a/post/lib_powerpc/rlwinm.c +++ b/post/lib_powerpc/rlwinm.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/rlwnm.c b/post/lib_powerpc/rlwnm.c index c12577fd4f5..0d48dd210ca 100644 --- a/post/lib_powerpc/rlwnm.c +++ b/post/lib_powerpc/rlwnm.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/srawi.c b/post/lib_powerpc/srawi.c index cad3aec82d0..2aabb173f58 100644 --- a/post/lib_powerpc/srawi.c +++ b/post/lib_powerpc/srawi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/store.c b/post/lib_powerpc/store.c index 8bd65c35817..73c136c981b 100644 --- a/post/lib_powerpc/store.c +++ b/post/lib_powerpc/store.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/string.c b/post/lib_powerpc/string.c index 3d3f2b117cc..0571c58c7d2 100644 --- a/post/lib_powerpc/string.c +++ b/post/lib_powerpc/string.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/three.c b/post/lib_powerpc/three.c index 27a32a274a4..353f6e55dee 100644 --- a/post/lib_powerpc/three.c +++ b/post/lib_powerpc/three.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/threei.c b/post/lib_powerpc/threei.c index 28c17df71e4..aa1534a59e6 100644 --- a/post/lib_powerpc/threei.c +++ b/post/lib_powerpc/threei.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/threex.c b/post/lib_powerpc/threex.c index ea9e465862b..d1806503686 100644 --- a/post/lib_powerpc/threex.c +++ b/post/lib_powerpc/threex.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/two.c b/post/lib_powerpc/two.c index 2c0efaec36b..f14f6d98e56 100644 --- a/post/lib_powerpc/two.c +++ b/post/lib_powerpc/two.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/twox.c b/post/lib_powerpc/twox.c index eae4c572442..1e0291a9eb8 100644 --- a/post/lib_powerpc/twox.c +++ b/post/lib_powerpc/twox.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test From patchwork Mon Sep 30 14:41:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169436 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="NIfFUnHw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlqb2ZCPz9s7T for ; Tue, 1 Oct 2019 00:57:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id AC2D7C21E50; Mon, 30 Sep 2019 14:54:45 +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 50411C21F3E; Mon, 30 Sep 2019 14:42:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E65CBC21EC9; Mon, 30 Sep 2019 14:42:02 +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 1FAAFC21E63 for ; Mon, 30 Sep 2019 14:41:47 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id h144so38897916iof.7 for ; Mon, 30 Sep 2019 07:41:47 -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=ZrlA1W4yaRB5++qE0YU1IwTQ41De0AowNBkv8L7yEZ0=; b=NIfFUnHw56/sOpV7Kg1ugv1jltTLUgSTwTRLV+qdtxcAWUCH5FQjqb+SFFQrvCWfIM 7CWvYKCW4u8k9ikKIXVKsMVEFCgpOfrIZl10WDWfeergw8NR9v2inS+8P6a0Qu9Dknry ntzeD++eIIMbaVNmSHlj+Y34/8bqk+41tl19o= 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=ZrlA1W4yaRB5++qE0YU1IwTQ41De0AowNBkv8L7yEZ0=; b=OuASYWFJ1/UxBTNdYXV/Ziq1y30Tdeyz017cDrhO9DyoXDUaUr/i2zAt/ggAMrmIcn 1zSkTaLKpp9j/E1p2O3aLGISTjqtmGPkNO88eEFglamA4BhosRksdAP8ttOmiJoMYVZa meeOUD4tKGJHalIMxtp9uFl3FAi+7Go3r3Y/cRo9X0GnsnTAwQUQ2S/6O8SwRqcIHj7F 2vGtnL+JOb+rzNd3nnqrST45q4DvWn7hZnR8dD8Ah6aj6nMwOVtzcCcav/80OLtEEpKq BXx8FuTr+EWn9aahfEQUHKXDbWZd6UD4Li6E7OFsg/iYWiO5JJSWxxkuUBGoY38ghcDK R67A== X-Gm-Message-State: APjAAAWb+s5DRmhr5K6QwPVZJiIiGQ/fSOVpEDkihEmcEJv3gWvwZoto y8dxAoI6LHrYd6rTU5jTU5MwjgmuUWg= X-Google-Smtp-Source: APXvYqwMD//LMzXKq9zQf/F4EvQcA+bUB6ryC3hX/VlSP+ZrYpk/pdpTE1Nk6mKCkReVBomft571gw== X-Received: by 2002:a6b:4403:: with SMTP id r3mr21315384ioa.2.1569854505817; Mon, 30 Sep 2019 07:41:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:45 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:05 -0600 Message-Id: <20190930144112.175618-35-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 34/41] common: Move command functions 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" Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass --- arch/arm/mach-kirkwood/cpu.c | 1 + arch/sandbox/cpu/start.c | 1 + board/engicam/common/board.c | 1 + board/gdsys/a38x/keyprogram.c | 1 + board/gdsys/p1022/controlcenterd-id.c | 1 + board/grinn/liteboard/board.c | 1 + board/inversepath/usbarmory/usbarmory.c | 1 + board/samsung/common/misc.c | 1 + common/autoboot.c | 1 + common/cli.c | 1 + common/cli_simple.c | 1 + common/main.c | 1 + common/splash_source.c | 1 + drivers/fastboot/fb_command.c | 1 + drivers/fastboot/fb_common.c | 1 + drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 + drivers/mtd/nand/raw/fsl_ifc_nand.c | 1 + drivers/net/fsl-mc/mc.c | 1 + drivers/usb/gadget/f_thor.c | 1 + include/command.h | 16 ++++++++++++++++ include/common.h | 17 +---------------- test/command_ut.c | 1 + test/dm/sf.c | 1 + 23 files changed, 38 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c index 6ad25434386..29c0e592e42 100644 --- a/arch/arm/mach-kirkwood/cpu.c +++ b/arch/arm/mach-kirkwood/cpu.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 82828f0c1d4..d6797ba8435 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 0c47afe5b56..31ff297b756 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/a38x/keyprogram.c b/board/gdsys/a38x/keyprogram.c index 000897984a6..853981aadbb 100644 --- a/board/gdsys/a38x/keyprogram.c +++ b/board/gdsys/a38x/keyprogram.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index d6798bd3382..04d38095665 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -11,6 +11,7 @@ #endif #include +#include #include #include #include diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 1558ea4b84f..151041a789e 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -4,6 +4,7 @@ * Copyright (C) 2016 Grinn */ +#include #include #include #include diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index de4ad832268..19510184d8a 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 3ef1e799801..9117669f715 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/common/autoboot.c b/common/autoboot.c index 8faac2005df..94a1b4abeba 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/common/cli.c b/common/cli.c index 49b910666b9..67ceb635a67 100644 --- a/common/cli.c +++ b/common/cli.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/common/cli_simple.c b/common/cli_simple.c index 6c881c133c6..358e9b7fe11 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/common/main.c b/common/main.c index 3a657c3d9a3..a94df7ae042 100644 --- a/common/main.c +++ b/common/main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/common/splash_source.c b/common/splash_source.c index d37b4b304c2..2ff15208a70 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 4864344853c..3c4acfecf6d 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index e76af8ecc32..c3735a44af7 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index 263d46ec8fc..cbf689af63d 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index 29f30d8ccc4..e2419e18a99 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 1a06fad8725..f7461fb5637 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -5,6 +5,7 @@ * Copyright 2017-2018 NXP */ #include +#include #include #include #include diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 8b3b19feaf3..2d231e872c4 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -14,6 +14,7 @@ * Sanghee Kim */ +#include #include #include #include diff --git a/include/command.h b/include/command.h index f6170e71515..d1063774ce5 100644 --- a/include/command.h +++ b/include/command.h @@ -199,6 +199,22 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size); * @return 0 if OK, 1 for error */ int board_run_command(const char *cmdline); + +int run_command(const char *cmd, int flag); +int run_command_repeatable(const char *cmd, int flag); + +/** + * Run a list of commands separated by ; or even \0 + * + * Note that if 'len' is not -1, then the command does not need to be nul + * terminated, Memory will be allocated for the command in that case. + * + * @param cmd List of commands to run, each separated bu semicolon + * @param len Length of commands excluding terminator if known (-1 if not) + * @param flag Execution flags (CMD_FLAG_...) + * @return 0 on success, or != 0 on error. + */ +int run_command_list(const char *cmd, int len, int flag); #endif /* __ASSEMBLY__ */ /* diff --git a/include/common.h b/include/common.h index c22eb63501f..5bd778a4f46 100644 --- a/include/common.h +++ b/include/common.h @@ -3,7 +3,7 @@ * Common header file for U-Boot * * This file still includes quite a bit of stuff that should be in separate - * headers like command.h. Please think before adding more things. + * headers. Please think before adding more things. * Patches to remove things are welcome. * * (C) Copyright 2000-2009 @@ -66,21 +66,6 @@ void hang (void) __attribute__ ((noreturn)); /* common/main.c */ void main_loop (void); -int run_command(const char *cmd, int flag); -int run_command_repeatable(const char *cmd, int flag); - -/** - * Run a list of commands separated by ; or even \0 - * - * Note that if 'len' is not -1, then the command does not need to be nul - * terminated, Memory will be allocated for the command in that case. - * - * @param cmd List of commands to run, each separated bu semicolon - * @param len Length of commands excluding terminator if known (-1 if not) - * @param flag Execution flags (CMD_FLAG_...) - * @return 0 on success, or != 0 on error. - */ -int run_command_list(const char *cmd, int len, int flag); int checkflash(void); int checkdram(void); diff --git a/test/command_ut.c b/test/command_ut.c index 62f2828b7c1..8e268e5ee52 100644 --- a/test/command_ut.c +++ b/test/command_ut.c @@ -6,6 +6,7 @@ #define DEBUG #include +#include static const char test_cmd[] = "setenv list 1\n setenv list ${list}2; " "setenv list ${list}3\0" diff --git a/test/dm/sf.c b/test/dm/sf.c index 3788d59052e..66d43d48ea2 100644 --- a/test/dm/sf.c +++ b/test/dm/sf.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include From patchwork Mon Sep 30 14:41:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169460 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="BkZdK7Zn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlzK71hvz9s7T for ; Tue, 1 Oct 2019 01:03:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 89405C21E4E; Mon, 30 Sep 2019 14:53:43 +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 ADF2CC21F24; Mon, 30 Sep 2019 14:42:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E4734C21E53; Mon, 30 Sep 2019 14:42:02 +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 DB97AC21E7D for ; Mon, 30 Sep 2019 14:41:47 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id n197so38888900iod.9 for ; Mon, 30 Sep 2019 07:41:47 -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=dYoaHKyJJZtcoXPdEITg8146ny+kCTEpodVYbKflyIw=; b=BkZdK7Zndx0oALgpJP4V5avTrQpwMO05xbh1A+NA+kNh94KhBEVH3y7oF3xBufiKu6 E3nmejZhEsb+Zfr1fTvLWkh16PtOWsBdZksDupCVXrizAcmptw1pReUDcIcDjOeDnCt3 dFfvgDDc6c8gNAFx+HYKI8GspfYUhu/yFtpR0= 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=dYoaHKyJJZtcoXPdEITg8146ny+kCTEpodVYbKflyIw=; b=J8G7aabcwwMrSr+Zhd/u9iW7K5dZrtH9TEEOPXXq5NwjY6HKv8wgN/WNOnE3X2YbeM bp3yLboKUsFVI2ihSoulmm3Pza1Y40erKJV+H3eMoz2PwJisyMTQ//TlZ+9KIsrNFk1x Ia1cYdllQ3tSKhJOwDmmpjnj60TTX70LQ5KUwnCgMEXn/od8PL/ofIVDNYkkwPqdiCVS 9CTt47tv/038JQjxKNzKRU5bXddwYz6K2aDu7qFjXSD6BQUhYLoCVR0P8IxLwTuTatRg MYRBAOdaVxiw6uAGbWtii9BmqlQ46VXN5ynuRMEi0YrD1mCQUZFLHOJd/SbTkf6R0W92 LkHg== X-Gm-Message-State: APjAAAXBEFSw1P1Efry1wT0Tc9VdgMoebiRVqnuKJt5oFJuvDD3Ja+M0 ovqMBuB9OPIoyOfoX/Wh+EfIbx0vsO8= X-Google-Smtp-Source: APXvYqxX9lrd0mb9RAeK5+5TFXOFCypLJK59MvPgoT2OlmL4j0n0ipe7Vut+3m3om5RIkBFGTRGSOw== X-Received: by 2002:a6b:6f0e:: with SMTP id k14mr17651707ioc.255.1569854506731; Mon, 30 Sep 2019 07:41:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:46 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:06 -0600 Message-Id: <20190930144112.175618-36-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 35/41] common: Drop board_show_dram() 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 is not defined by any boards so the feature is not used. Drop it. Signed-off-by: Simon Glass --- cmd/mem.c | 9 ++------- include/common.h | 9 --------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/cmd/mem.c b/cmd/mem.c index c6b8038fc9d..545534b1fc7 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -1212,16 +1212,11 @@ U_BOOT_CMD( #endif #ifdef CONFIG_CMD_MEMINFO -__weak void board_show_dram(phys_size_t size) -{ - puts("DRAM: "); - print_size(size, "\n"); -} - static int do_mem_info(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - board_show_dram(gd->ram_size); + puts("DRAM: "); + print_size(gd->ram_size, "\n"); return 0; } diff --git a/include/common.h b/include/common.h index 5bd778a4f46..16d4b0612f8 100644 --- a/include/common.h +++ b/include/common.h @@ -73,15 +73,6 @@ extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ int mdm_init(void); -/** - * Show the DRAM size in a board-specific way - * - * This is used by boards to display DRAM information in their own way. - * - * @param size Size of DRAM (which should be displayed along with other info) - */ -void board_show_dram(phys_size_t size); - /** * Get the uppermost pointer that is valid to access * From patchwork Mon Sep 30 14:41:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169462 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="j+NUojYM"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hm0d078Rz9s7T for ; Tue, 1 Oct 2019 01:05:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id ABFD3C21EBF; Mon, 30 Sep 2019 14:54:23 +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 B4EBFC21F17; Mon, 30 Sep 2019 14:42:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EB928C21EC9; Mon, 30 Sep 2019 14:42:04 +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 DEB6FC21DAF for ; Mon, 30 Sep 2019 14:41:48 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id a1so38966552ioc.6 for ; Mon, 30 Sep 2019 07:41:48 -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=HoRTVB818xi8NzCV1qDyHmlJInPkqH426H+WpUJTELU=; b=j+NUojYMhBpDPace3ntYvHZ2GTHOS06JrnflTH6BbyviukQWd90a1IeCNOilL8d2fC vg85xQZyPsY7dZiH2OnoMF/v2DY0Z+e75S0+pj77MLtiEXP/zmrpx93dP52dAm3HOMLz GxWN5Q8uGQnPlng4aeZNQN02XtG6jMezaIMH0= 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=HoRTVB818xi8NzCV1qDyHmlJInPkqH426H+WpUJTELU=; b=gAeNZpIh+i3MuXhlDyqyO7NtqZvXM7u86iSIEthVgUKshTpKIeG9wR+MxzWWdhKyjl cnH51XPybD9aY05TFGIqeC/8QYUehBlZmN9Qn8O3DAqJnB5SHvslHye+LygqHRfi8cHs HI45ZlxLjJjdylzPNvWZQeQmci2lBCBkDE0skJWY/sDLXxBzyrNkilnXNBEzb2F0iPN6 d1L4g88ib8MKaMuajSLXVYihEKtrNUs8UhfyZS3Ipzv8MsNVxwY0CIBWTPfCrYEXZ9XP nxS0VIigjDxUNhBPC4NxrheElCcM3KR1fkq+se1gLC6EIXUBU95VHp9ghzz92aaQvGkQ 8wPw== X-Gm-Message-State: APjAAAVrF9QljebI/45iJwhGqKjZsiKdScwdcBZqFGoDtP7QgOlJV0pG jeCBPxxn2iJNmKi1//zWzmMAfTwlab8= X-Google-Smtp-Source: APXvYqxIzogDv5lo80eN8SUk1kkdjOSsn1JHqne3+NncvB8faZNp2r0TeH++7hnvy9MzS8iw2/mVeQ== X-Received: by 2002:a6b:e512:: with SMTP id y18mr21241799ioc.4.1569854507462; Mon, 30 Sep 2019 07:41:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:47 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:07 -0600 Message-Id: <20190930144112.175618-37-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 36/41] common: Move board_get_usable_ram_top() 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" Move this function into init.h which seems to be designed for this sort of thing. Also update the header to declare struct global_data so that it can be included without global_data.h being needed. Signed-off-by: Simon Glass --- arch/arm/mach-mvebu/arm64-common.c | 1 + arch/arm/mach-rockchip/sdram_common.c | 1 + arch/arm/mach-tegra/board2.c | 1 + arch/mips/mach-jz47xx/jz4780/jz4780.c | 1 + arch/riscv/cpu/generic/dram.c | 1 + arch/x86/cpu/broadwell/sdram.c | 1 + arch/x86/cpu/coreboot/sdram.c | 1 + arch/x86/cpu/efi/payload.c | 1 + arch/x86/cpu/efi/sdram.c | 1 + arch/x86/cpu/intel_common/mrc.c | 1 + arch/x86/cpu/ivybridge/sdram.c | 1 + arch/x86/cpu/qemu/dram.c | 1 + arch/x86/cpu/quark/dram.c | 1 + arch/x86/cpu/slimbootloader/sdram.c | 1 + arch/x86/lib/fsp/fsp_dram.c | 1 + arch/x86/lib/init_helpers.c | 1 + board/armadeus/apf27/apf27.c | 1 + board/imgtec/boston/ddr.c | 1 + board/menlo/m53menlo/m53menlo.c | 1 + board/raspberrypi/rpi/rpi.c | 1 + board/ti/am65x/evm.c | 1 + board/ti/j721e/evm.c | 1 + common/board_f.c | 1 + drivers/video/fsl_dcu_fb.c | 1 + drivers/video/sunxi/sunxi_display.c | 1 + include/common.h | 11 ----------- include/init.h | 20 ++++++++++++++++++-- lib/efi_loader/efi_memory.c | 1 + 28 files changed, 44 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c index aaf7b7c4472..40b98dbf08b 100644 --- a/arch/arm/mach-mvebu/arm64-common.c +++ b/arch/arm/mach-mvebu/arm64-common.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/sdram_common.c b/arch/arm/mach-rockchip/sdram_common.c index 22a4aca9402..74a1223532e 100644 --- a/arch/arm/mach-rockchip/sdram_common.c +++ b/arch/arm/mach-rockchip/sdram_common.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index f13bd256cc2..46491a1d43f 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c index 0949cbc3d09..967fc41be49 100644 --- a/arch/mips/mach-jz47xx/jz4780/jz4780.c +++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c index b7b12072351..1dc77efeca5 100644 --- a/arch/riscv/cpu/generic/dram.c +++ b/arch/riscv/cpu/generic/dram.c @@ -5,6 +5,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c index b31d78c092a..dfd8afc35f5 100644 --- a/arch/x86/cpu/broadwell/sdram.c +++ b/arch/x86/cpu/broadwell/sdram.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c index 664817feffd..27e859885e8 100644 --- a/arch/x86/cpu/coreboot/sdram.c +++ b/arch/x86/cpu/coreboot/sdram.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index 019e312527e..8f8a9331944 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c index a45525f842e..3143c079adb 100644 --- a/arch/x86/cpu/efi/sdram.c +++ b/arch/x86/cpu/efi/sdram.c @@ -5,6 +5,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c index b35102a3f08..755670a847e 100644 --- a/arch/x86/cpu/intel_common/mrc.c +++ b/arch/x86/cpu/intel_common/mrc.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index 8a58d0383d5..51ca4ad3017 100644 --- a/arch/x86/cpu/ivybridge/sdram.c +++ b/arch/x86/cpu/ivybridge/sdram.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c index 6707b7b3634..19d92f27d80 100644 --- a/arch/x86/cpu/qemu/dram.c +++ b/arch/x86/cpu/qemu/dram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c index 1c5d6a963c9..3e502c010dc 100644 --- a/arch/x86/cpu/quark/dram.c +++ b/arch/x86/cpu/quark/dram.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c index 05d40d196ce..33e91fb6366 100644 --- a/arch/x86/cpu/slimbootloader/sdram.c +++ b/arch/x86/cpu/slimbootloader/sdram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index 3a23b70410b..6dbaffa4f6d 100644 --- a/arch/x86/lib/fsp/fsp_dram.c +++ b/arch/x86/lib/fsp/fsp_dram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index 4774a9bdb78..b28988e75a0 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c index 20be0c3bd4e..75395d92cd1 100644 --- a/board/armadeus/apf27/apf27.c +++ b/board/armadeus/apf27/apf27.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c index 3f8a5c0d8e6..241b3846687 100644 --- a/board/imgtec/boston/ddr.c +++ b/board/imgtec/boston/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index bda5f0df5bc..065e6a2ccc4 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index fa57d50c95e..a3243ce8193 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index e01adcd642f..1b60222e7d6 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index db5d7b8834f..51b121ce05f 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index ca26375cdb2..364028adea4 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c index add64b85b59..076e9ea0193 100644 --- a/drivers/video/fsl_dcu_fb.c +++ b/drivers/video/fsl_dcu_fb.c @@ -6,6 +6,7 @@ * FSL DCU Framebuffer driver */ +#include #include #include #include diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index 9172a3b0113..9fd864bde22 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 16d4b0612f8..9bdd1cf85c4 100644 --- a/include/common.h +++ b/include/common.h @@ -73,17 +73,6 @@ extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ int mdm_init(void); -/** - * Get the uppermost pointer that is valid to access - * - * Some systems may not map all of their address space. This function allows - * boards to indicate what their highest support pointer value is for DRAM - * access. - * - * @param total_size Size of U-Boot (unused?) - */ -ulong board_get_usable_ram_top(ulong total_size); - /** * arch_fixup_fdt() - Write arch-specific information to fdt * diff --git a/include/init.h b/include/init.h index afc953d51e2..6076283d2c8 100644 --- a/include/init.h +++ b/include/init.h @@ -10,6 +10,8 @@ #ifndef __INIT_H_ #define __INIT_H_ 1 +#include + #ifndef __ASSEMBLY__ /* put C only stuff in this section */ /* @@ -149,6 +151,8 @@ ulong board_init_f_alloc_reserve(ulong top); */ void board_init_f_init_reserve(ulong base); +struct global_data; + /** * arch_setup_gd() - Set up the global_data pointer * @gd_ptr: Pointer to global data @@ -160,10 +164,11 @@ void board_init_f_init_reserve(ulong base); * * gd = gd_ptr; */ -void arch_setup_gd(gd_t *gd_ptr); +void arch_setup_gd(struct global_data *gd_ptr); /* common/board_r.c */ -void board_init_r(gd_t *id, ulong dest_addr) __attribute__ ((noreturn)); +void board_init_r(struct global_data *id, ulong dest_addr) + __attribute__ ((noreturn)); int cpu_init_r(void); int last_stage_init(void); @@ -181,6 +186,17 @@ int init_func_vid(void); int checkboard(void); int show_board_info(void); +/** + * Get the uppermost pointer that is valid to access + * + * Some systems may not map all of their address space. This function allows + * boards to indicate what their highest support pointer value is for DRAM + * access. + * + * @param total_size Size of U-Boot (unused?) + */ +ulong board_get_usable_ram_top(ulong total_size); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 83cbc9154f3..e2d6ea4fb89 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include From patchwork Mon Sep 30 14:41:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169459 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="EN0IFgPd"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlyz3gkBz9s7T for ; Tue, 1 Oct 2019 01:03:39 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 43A10C21F18; Mon, 30 Sep 2019 14:56:50 +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 0E269C21F64; Mon, 30 Sep 2019 14:42:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B3FF4C21F34; Mon, 30 Sep 2019 14:42:08 +0000 (UTC) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by lists.denx.de (Postfix) with ESMTPS id 451E8C21E89 for ; Mon, 30 Sep 2019 14:41:51 +0000 (UTC) Received: by mail-io1-f53.google.com with SMTP id b136so38941645iof.3 for ; Mon, 30 Sep 2019 07:41:51 -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=kI1aOT/UFPpE90X8DQSQfyF8w5zET3Z/xVaEPFU2D64=; b=EN0IFgPdH3koJ7RHJ60hSBxBdCngdFuZxcUE+/Rikev7F91SBy264lk/VHjP/sRRnm psbdwdxmiXYs4Jj9ujCiYAJDeICaeH8ekaAlx3c/5Fy9HWm0MLv8OfWQ3Y0mP+5oN93U 0B+hprnZK9FQFTT0qqBMl4mn507YI3XKjkuDA= 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=kI1aOT/UFPpE90X8DQSQfyF8w5zET3Z/xVaEPFU2D64=; b=hz+TCRGus/NQO94K2ebFWEVeH/G3S1p1f1BK1mVa5PMJW5UBG0lB5PzkEk4UXT6W8R pd4OZsRkOtb67qjQ5gWOVT8hoD/QPTKsI2ZGtYZrHvFciSR2oKqPr3elmhUsghXl4f5c 2i2HOstaSnkaBCiYKfXY8vWia3BXGWAMqoe/WkilXuY5rFYvU4z3ZkaY4cCB8t0Uqtcj a2GY8Hc7JEzChnRd4FB3T32l0Wzyl/r66bpmg+4YMOb7qyQbkQ9WSMy7XWw3O7v9uQam gLO/OeBllE2ohsFh7LCkPJGwN6+v9O7JZvuLjPF7eIbPcm4RBqZzrQemQVjrWuri8svv Eu6w== X-Gm-Message-State: APjAAAURIUqo19VhAj7KvpPp/4opmalh30UNEAj3Pl6j+k9aWXmQHNaA wT2Evy0wsYT+0qQhAXGzc5/PsPTZot8= X-Google-Smtp-Source: APXvYqzs9CBAD2uHzAkqWrGION7/1EcNVpOdHUy51RoVtIv3S+zTvEd0CvWaqyUBpkliOmwySffw1w== X-Received: by 2002:a5e:d817:: with SMTP id l23mr21056138iok.142.1569854508339; Mon, 30 Sep 2019 07:41:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:47 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:08 -0600 Message-Id: <20190930144112.175618-38-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 37/41] common: Move some board functions 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" A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/fsl-layerscape/soc.c | 1 + arch/arm/mach-imx/mx6/opos6ul.c | 1 + arch/arm/mach-imx/mx6/soc.c | 1 + arch/arm/mach-imx/mx7ulp/soc.c | 1 + arch/arm/mach-meson/board-common.c | 1 + arch/arm/mach-rockchip/board.c | 1 + arch/arm/mach-rockchip/rk3288/rk3288.c | 1 + arch/arm/mach-uniphier/board_late_init.c | 1 + arch/arm/mach-zynqmp/spl.c | 1 + arch/powerpc/cpu/mpc85xx/cpu_init.c | 1 + board/Arcturus/ucp1020/ucp1020.c | 1 + board/BuR/brppt1/board.c | 1 + board/BuR/brsmarc1/board.c | 1 + board/BuR/brxre1/board.c | 1 + board/CZ.NIC/turris_mox/turris_mox.c | 1 + board/CZ.NIC/turris_omnia/turris_omnia.c | 1 + board/Marvell/mvebu_armada-8k/board.c | 1 + board/advantech/dms-ba16/dms-ba16.c | 1 + board/aristainetos/aristainetos-v2.c | 1 + board/armadeus/opos6uldev/board.c | 1 + board/atmark-techno/armadillo-800eva/armadillo-800eva.c | 1 + board/atmel/at91sam9x5ek/at91sam9x5ek.c | 1 + board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 1 + board/atmel/sama5d2_icp/sama5d2_icp.c | 1 + board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c | 1 + board/atmel/sama5d2_xplained/sama5d2_xplained.c | 1 + board/atmel/sama5d3_xplained/sama5d3_xplained.c | 1 + board/atmel/sama5d3xek/sama5d3xek.c | 1 + board/atmel/sama5d4_xplained/sama5d4_xplained.c | 1 + board/atmel/sama5d4ek/sama5d4ek.c | 1 + board/beckhoff/mx53cx9020/mx53cx9020.c | 1 + board/birdland/bav335x/board.c | 1 + board/bluewater/gurnard/gurnard.c | 1 + board/bosch/shc/board.c | 1 + board/broadcom/bcmstb/bcmstb.c | 1 + board/cadence/xtfpga/xtfpga.c | 1 + board/ccv/xpress/xpress.c | 1 + board/chipspark/popmetal_rk3288/popmetal-rk3288.c | 1 + board/compulab/cl-som-imx7/cl-som-imx7.c | 1 + board/compulab/cm_fx6/cm_fx6.c | 1 + board/congatec/cgtqmx6eval/cgtqmx6eval.c | 1 + .../congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c | 1 + board/coreboot/coreboot/coreboot.c | 1 + board/cssi/MCR3000/MCR3000.c | 1 + board/dfi/dfi-bt700/dfi-bt700.c | 1 + board/dhelectronics/dh_imx6/dh_imx6.c | 1 + board/eets/pdu001/board.c | 1 + board/efi/efi-x86_payload/payload.c | 1 + board/el/el6x/el6x.c | 1 + board/embest/mx6boards/mx6boards.c | 1 + board/emulation/qemu-riscv/qemu-riscv.c | 1 + board/engicam/common/board.c | 1 + board/freescale/b4860qds/b4860qds.c | 1 + board/freescale/bsc9132qds/bsc9132qds.c | 1 + board/freescale/c29xpcie/c29xpcie.c | 1 + board/freescale/corenet_ds/corenet_ds.c | 1 + board/freescale/imx8mq_evk/imx8mq_evk.c | 1 + board/freescale/imx8qm_mek/imx8qm_mek.c | 1 + board/freescale/imx8qxp_mek/imx8qxp_mek.c | 1 + board/freescale/ls1021aiot/ls1021aiot.c | 1 + board/freescale/ls1021aqds/ls1021aqds.c | 1 + board/freescale/ls1021atsn/ls1021atsn.c | 1 + board/freescale/ls1021atwr/ls1021atwr.c | 1 + board/freescale/mpc8313erdb/mpc8313erdb.c | 1 + board/freescale/mpc832xemds/mpc832xemds.c | 1 + board/freescale/mpc837xemds/mpc837xemds.c | 1 + board/freescale/mpc8536ds/mpc8536ds.c | 1 + board/freescale/mpc8569mds/mpc8569mds.c | 1 + board/freescale/mpc8572ds/mpc8572ds.c | 1 + board/freescale/mx25pdk/mx25pdk.c | 1 + board/freescale/mx31pdk/mx31pdk.c | 1 + board/freescale/mx35pdk/mx35pdk.c | 1 + board/freescale/mx51evk/mx51evk.c | 1 + board/freescale/mx53evk/mx53evk.c | 1 + board/freescale/mx53loco/mx53loco.c | 1 + board/freescale/mx6sabreauto/mx6sabreauto.c | 1 + board/freescale/mx6sabresd/mx6sabresd.c | 1 + board/freescale/mx6sllevk/mx6sllevk.c | 1 + board/freescale/mx6sxsabreauto/mx6sxsabreauto.c | 1 + board/freescale/mx6sxsabresd/mx6sxsabresd.c | 1 + board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 1 + board/freescale/mx6ullevk/mx6ullevk.c | 1 + board/freescale/mx7dsabresd/mx7dsabresd.c | 1 + board/freescale/p1010rdb/p1010rdb.c | 1 + board/freescale/p1022ds/p1022ds.c | 1 + board/freescale/p1023rdb/p1023rdb.c | 1 + board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 1 + board/freescale/p1_twr/p1_twr.c | 1 + board/freescale/p2041rdb/p2041rdb.c | 1 + board/freescale/t102xqds/t102xqds.c | 1 + board/freescale/t102xrdb/t102xrdb.c | 1 + board/freescale/t1040qds/t1040qds.c | 1 + board/freescale/t104xrdb/t104xrdb.c | 1 + board/freescale/t208xqds/t208xqds.c | 1 + board/freescale/t208xrdb/t208xrdb.c | 1 + board/freescale/t4qds/t4240emu.c | 1 + board/freescale/t4qds/t4240qds.c | 1 + board/freescale/t4rdb/t4240rdb.c | 1 + board/gardena/smart-gateway-at91sam/board.c | 1 + board/gardena/smart-gateway-mt7688/board.c | 1 + board/gdsys/a38x/controlcenterdc.c | 1 + board/gdsys/mpc8308/gazerbeam.c | 1 + board/gdsys/mpc8308/mpc8308.c | 1 + board/gdsys/p1022/controlcenterd.c | 1 + board/ge/bx50v3/bx50v3.c | 1 + board/ge/mx53ppd/mx53ppd.c | 1 + board/grinn/chiliboard/board.c | 1 + board/grinn/liteboard/board.c | 1 + board/intel/edison/edison.c | 1 + board/intel/slimbootloader/slimbootloader.c | 1 + board/isee/igep003x/board.c | 1 + board/k+p/kp_imx53/kp_imx53.c | 1 + board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 1 + board/keymile/km83xx/km83xx.c | 1 + board/keymile/km_arm/km_arm.c | 1 + board/keymile/kmp204x/kmp204x.c | 1 + board/kosagi/novena/novena.c | 1 + board/kosagi/novena/novena_spl.c | 1 + board/laird/wb50n/wb50n.c | 1 + board/liebherr/mccmon6/mccmon6.c | 1 + board/logicpd/imx6/imx6logic.c | 1 + board/logicpd/omap3som/omap3logic.c | 1 + board/mscc/jr2/jr2.c | 1 + board/mscc/luton/luton.c | 1 + board/mscc/ocelot/ocelot.c | 1 + board/mscc/serval/serval.c | 1 + board/mscc/servalt/servalt.c | 1 + board/phytec/pcm052/pcm052.c | 1 + board/phytec/pcm058/pcm058.c | 1 + board/phytec/pfla02/pfla02.c | 1 + board/phytec/phycore_rk3288/phycore-rk3288.c | 1 + board/qualcomm/dragonboard410c/dragonboard410c.c | 1 + board/renesas/r2dplus/r2dplus.c | 1 + board/renesas/sh7752evb/sh7752evb.c | 1 + board/renesas/sh7753evb/sh7753evb.c | 1 + board/renesas/sh7757lcr/sh7757lcr.c | 1 + board/rockchip/kylin_rk3036/kylin_rk3036.c | 1 + board/rockchip/tinker_rk3288/tinker-rk3288.c | 1 + board/samsung/common/board.c | 1 + board/samtec/vining_fpga/socfpga.c | 1 + board/sandbox/sandbox.c | 1 + board/siemens/draco/board.c | 1 + board/siemens/pxm2/board.c | 1 + board/siemens/rut/board.c | 1 + board/softing/vining_2000/vining_2000.c | 1 + board/solidrun/mx6cuboxi/mx6cuboxi.c | 1 + board/spear/x600/x600.c | 1 + board/st/stm32f746-disco/stm32f746-disco.c | 1 + board/st/stm32h743-disco/stm32h743-disco.c | 1 + board/st/stm32h743-eval/stm32h743-eval.c | 1 + board/st/stm32mp1/stm32mp1.c | 1 + board/synopsys/hsdk/hsdk.c | 1 + board/syteco/zmx25/zmx25.c | 1 + board/tcl/sl50/board.c | 1 + board/technexion/pico-imx7d/pico-imx7d.c | 1 + board/theadorable/theadorable.c | 1 + board/ti/am335x/board.c | 1 + board/ti/am43xx/board.c | 1 + board/ti/am57xx/board.c | 1 + board/ti/dra7xx/evm.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + board/toradex/apalis-imx8/apalis-imx8.c | 1 + board/toradex/apalis_imx6/apalis_imx6.c | 1 + board/toradex/colibri-imx6ull/colibri-imx6ull.c | 1 + board/toradex/colibri-imx8x/colibri-imx8x.c | 1 + board/toradex/colibri_imx6/colibri_imx6.c | 1 + board/toradex/colibri_vf/colibri_vf.c | 1 + board/tqc/tqma6/tqma6.c | 1 + board/tqc/tqma6/tqma6_mba6.c | 1 + board/tqc/tqma6/tqma6_wru4.c | 1 + board/udoo/neo/neo.c | 1 + board/udoo/udoo.c | 1 + board/varisys/cyrus/cyrus.c | 1 + board/vscom/baltos/board.c | 1 + board/wandboard/wandboard.c | 1 + board/warp/warp.c | 1 + board/warp7/warp7.c | 1 + board/work-microwave/work_92105/work_92105.c | 1 + board/xes/xpedite517x/xpedite517x.c | 1 + board/xes/xpedite520x/xpedite520x.c | 1 + board/xes/xpedite537x/xpedite537x.c | 1 + board/xes/xpedite550x/xpedite550x.c | 1 + board/xilinx/microblaze-generic/microblaze-generic.c | 1 + board/xilinx/versal/board.c | 1 + board/xilinx/zynq/board.c | 1 + board/xilinx/zynqmp/zynqmp.c | 1 + include/common.h | 7 ------- include/init.h | 8 ++++++++ 188 files changed, 194 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 3fd34e3a435..1c2570fe653 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 3ab9a3f022f..5cd36d99eb0 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -3,6 +3,7 @@ * Copyright (C) 2018 Armadeus Systems */ +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 075d2467ce4..7c725fb0bc3 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c index c72f0ed3fc6..e20a52f1785 100644 --- a/arch/arm/mach-imx/mx7ulp/soc.c +++ b/arch/arm/mach-imx/mx7ulp/soc.c @@ -2,6 +2,7 @@ /* * Copyright (C) 2016 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index 6c77e379669..d33e7f17415 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index d1cff2424c3..26a2b00425c 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c index 057ce920809..0e0a6ae477c 100644 --- a/arch/arm/mach-rockchip/rk3288/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 14b61fc7dfd..793283058c3 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c index b52ac178535..6ba42bb42f6 100644 --- a/arch/arm/mach-zynqmp/spl.c +++ b/arch/arm/mach-zynqmp/spl.c @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index cac92807904..2c5c743d04b 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c index 6a880c97bcb..b641b72aaa7 100644 --- a/board/Arcturus/ucp1020/ucp1020.c +++ b/board/Arcturus/ucp1020/ucp1020.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index e0d1707ac13..dd9649ca072 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/BuR/brsmarc1/board.c b/board/BuR/brsmarc1/board.c index 4c703461482..5b9108a89f9 100644 --- a/board/BuR/brsmarc1/board.c +++ b/board/BuR/brsmarc1/board.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 873208c668d..5d57e19fde0 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 946e20ab492..377191baefb 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 4d21e62e733..e1775d30047 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c index e927e338ea6..499e89367f8 100644 --- a/board/Marvell/mvebu_armada-8k/board.c +++ b/board/Marvell/mvebu_armada-8k/board.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c index 2eccc053d8f..299f2f102d1 100644 --- a/board/advantech/dms-ba16/dms-ba16.c +++ b/board/advantech/dms-ba16/dms-ba16.c @@ -5,6 +5,7 @@ * Copyright 2012 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/aristainetos/aristainetos-v2.c b/board/aristainetos/aristainetos-v2.c index c0a2e41f02e..a12c063e5bb 100644 --- a/board/aristainetos/aristainetos-v2.c +++ b/board/aristainetos/aristainetos-v2.c @@ -9,6 +9,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index cbf40d5c4ae..bc2835610e6 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,6 +3,7 @@ * Copyright (C) 2018 Armadeus Systems */ +#include #include #include #include diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c index d95ba7b8bfe..867fa82c177 100644 --- a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c +++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index 0856786a0f8..2c071075bac 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index 83634345f3d..f3816c83345 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c index 1593e2bd4ea..7c34df48b87 100644 --- a/board/atmel/sama5d2_icp/sama5d2_icp.c +++ b/board/atmel/sama5d2_icp/sama5d2_icp.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c index 17e08fa9b26..4b3a703f260 100644 --- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index fccd80ec70a..2116b788378 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index 289f8d84999..84c561be6fc 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index acf61486d20..3aa46b1774a 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 4da64890b35..93cc183a5b4 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index 2708d8e75e4..4b3883e20f8 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c index 73cf8b1194a..aeb14fe780d 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index 1f3f44a8675..c946ea408fb 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c index 48e31d9065a..4ae70e1aa54 100644 --- a/board/bluewater/gurnard/gurnard.c +++ b/board/bluewater/gurnard/gurnard.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #ifndef CONFIG_DM_ETH diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index 2ceb836019e..890b92c562d 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index 6af49a368d9..34389a20d85 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/cadence/xtfpga/xtfpga.c b/board/cadence/xtfpga/xtfpga.c index 256611638a5..2869e5cf688 100644 --- a/board/cadence/xtfpga/xtfpga.c +++ b/board/cadence/xtfpga/xtfpga.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c index 05286e643c0..0caeea58853 100644 --- a/board/ccv/xpress/xpress.c +++ b/board/ccv/xpress/xpress.c @@ -3,6 +3,7 @@ * Copyright (C) 2015-2016 Stefan Roese */ +#include #include #include #include diff --git a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c index 47b921a7486..e6909b3b1c5 100644 --- a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c +++ b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c @@ -4,6 +4,7 @@ */ #include +#include #include #define GPIO7A3_HUB_RST 227 diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 395d5dce178..9277094e441 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index feb7a71f007..b20ca168dfb 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index 6b3d5b833f4..49c731f8911 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c index 9751337a474..315b6dc5429 100644 --- a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c +++ b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c index ed5606d4a44..b791b82ef48 100644 --- a/board/coreboot/coreboot/coreboot.c +++ b/board/coreboot/coreboot/coreboot.c @@ -4,6 +4,7 @@ */ #include +#include int board_early_init_r(void) { diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index dcd2c1c9753..138d0c61f15 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c index 50cf6dc987e..f4c4b1d6636 100644 --- a/board/dfi/dfi-bt700/dfi-bt700.c +++ b/board/dfi/dfi-bt700/dfi-bt700.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index 2d0f78da118..85e281ebb9c 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 8a3d0ada270..fc4587ed0d5 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/efi/efi-x86_payload/payload.c b/board/efi/efi-x86_payload/payload.c index 4eeb49a27ac..5d4492cdc77 100644 --- a/board/efi/efi-x86_payload/payload.c +++ b/board/efi/efi-x86_payload/payload.c @@ -4,6 +4,7 @@ */ #include +#include #include int board_early_init_r(void) diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c index 18d69a7da38..9aa71b99419 100644 --- a/board/el/el6x/el6x.c +++ b/board/el/el6x/el6x.c @@ -5,6 +5,7 @@ * Based on other i.MX6 boards */ +#include #include #include #include diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index bcfe1250adb..bf5c020af13 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -12,6 +12,7 @@ * Copyright (C) 2013 Jon Nettleton . */ +#include #include #include #include diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c index 37d48d04f2d..cbce5ffe6e3 100644 --- a/board/emulation/qemu-riscv/qemu-riscv.c +++ b/board/emulation/qemu-riscv/qemu-riscv.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 31ff297b756..e5358b47f33 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 29c9fa00789..e1828e081e5 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c index dd9ad905085..ab05d84190f 100644 --- a/board/freescale/bsc9132qds/bsc9132qds.c +++ b/board/freescale/bsc9132qds/bsc9132qds.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c index 6d103be7ffc..a9ea986579a 100644 --- a/board/freescale/c29xpcie/c29xpcie.c +++ b/board/freescale/c29xpcie/c29xpcie.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c index 3ce9a76aae1..c2fa60e321b 100644 --- a/board/freescale/corenet_ds/corenet_ds.c +++ b/board/freescale/corenet_ds/corenet_ds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c index 1463e6e6963..cb39d0f2d68 100644 --- a/board/freescale/imx8mq_evk/imx8mq_evk.c +++ b/board/freescale/imx8mq_evk/imx8mq_evk.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index 76634a3a28a..68be0fe0cf7 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 4ba83142841..671064fae27 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index 70992a5ce4e..d53b99d1129 100644 --- a/board/freescale/ls1021aiot/ls1021aiot.c +++ b/board/freescale/ls1021aiot/ls1021aiot.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c index 2ca2bd99093..03eaf0c79ec 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c index 39e825ca496..8039fd55f47 100644 --- a/board/freescale/ls1021atsn/ls1021atsn.c +++ b/board/freescale/ls1021atsn/ls1021atsn.c @@ -2,6 +2,7 @@ /* Copyright 2016-2019 NXP Semiconductors */ #include +#include #include #include #include diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index fcf2ec97889..375cbb99f37 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 72d2d33e0b5..55a3529296d 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -6,6 +6,7 @@ */ #include +#include #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index 61b95c601e6..c9f2ac44a62 100644 --- a/board/freescale/mpc832xemds/mpc832xemds.c +++ b/board/freescale/mpc832xemds/mpc832xemds.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c index 16922087c01..1ae2308e9b8 100644 --- a/board/freescale/mpc837xemds/mpc837xemds.c +++ b/board/freescale/mpc837xemds/mpc837xemds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c index 659770e568a..e55ee400260 100644 --- a/board/freescale/mpc8536ds/mpc8536ds.c +++ b/board/freescale/mpc8536ds/mpc8536ds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c index 134ed5294a6..cf5d8a5244f 100644 --- a/board/freescale/mpc8569mds/mpc8569mds.c +++ b/board/freescale/mpc8569mds/mpc8569mds.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c index 89f4d6c05f2..4111d69b4b9 100644 --- a/board/freescale/mpc8572ds/mpc8572ds.c +++ b/board/freescale/mpc8572ds/mpc8572ds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c index c59f0fb922a..6898e9c4d64 100644 --- a/board/freescale/mx25pdk/mx25pdk.c +++ b/board/freescale/mx25pdk/mx25pdk.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index b31a97b5d01..fb57f263573 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -8,6 +8,7 @@ #include +#include #include #include #include diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c index aba17a6b825..d0f7f045a5b 100644 --- a/board/freescale/mx35pdk/mx35pdk.c +++ b/board/freescale/mx35pdk/mx35pdk.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index d1bb852f371..3314badf9e7 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index 56985c63d74..76a112eaac0 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index a177815bb8a..381c1ca808f 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c index dc156efbbcb..140f24459d7 100644 --- a/board/freescale/mx6sabreauto/mx6sabreauto.c +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index b0c0117968b..b346ca4ced9 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -5,6 +5,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/freescale/mx6sllevk/mx6sllevk.c b/board/freescale/mx6sllevk/mx6sllevk.c index 83babe18e25..227d178e076 100644 --- a/board/freescale/mx6sllevk/mx6sllevk.c +++ b/board/freescale/mx6sllevk/mx6sllevk.c @@ -3,6 +3,7 @@ * Copyright (C) 2016 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c index 15e921aecac..0c7904204f7 100644 --- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c +++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c @@ -5,6 +5,7 @@ * Author: Ye Li */ +#include #include #include #include diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 1c10958879b..9fff8ffc4cf 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -5,6 +5,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index ccbe4044786..6a237cfef4d 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -3,6 +3,7 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c index e1193478026..2a2688c7355 100644 --- a/board/freescale/mx6ullevk/mx6ullevk.c +++ b/board/freescale/mx6ullevk/mx6ullevk.c @@ -3,6 +3,7 @@ * Copyright (C) 2016 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 86bf030d355..f1120d67e37 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -3,6 +3,7 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c index 449df937e6a..a0866926832 100644 --- a/board/freescale/p1010rdb/p1010rdb.c +++ b/board/freescale/p1010rdb/p1010rdb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c index 9406e755170..ebf822acb5f 100644 --- a/board/freescale/p1022ds/p1022ds.c +++ b/board/freescale/p1022ds/p1022ds.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c index 7db04043ca5..eeb13ccc9b9 100644 --- a/board/freescale/p1023rdb/p1023rdb.c +++ b/board/freescale/p1023rdb/p1023rdb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 3649f16598f..c85243f58ba 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c index 01cac181b34..72fe1b41660 100644 --- a/board/freescale/p1_twr/p1_twr.c +++ b/board/freescale/p1_twr/p1_twr.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index baf1506908e..78f89fc4cb7 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c index 6c754503d19..85f8517d798 100644 --- a/board/freescale/t102xqds/t102xqds.c +++ b/board/freescale/t102xqds/t102xqds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index 793f54d69ea..d578a0b1a5b 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index 55516b9f067..61dedf4c06c 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index c7a645108f4..7dacd0c5f1f 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c index 86d6b1defe9..6c34db42199 100644 --- a/board/freescale/t208xqds/t208xqds.c +++ b/board/freescale/t208xqds/t208xqds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index d03d48bcfaf..3ac61f009c9 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c index d9cb967c220..da050bf800f 100644 --- a/board/freescale/t4qds/t4240emu.c +++ b/board/freescale/t4qds/t4240emu.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index 8b60121ddf1..ae49fcd5f9a 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index 0c95607762e..48aa6b6822e 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gardena/smart-gateway-at91sam/board.c b/board/gardena/smart-gateway-at91sam/board.c index 3e2da0d6f8e..45c947fcbb4 100644 --- a/board/gardena/smart-gateway-at91sam/board.c +++ b/board/gardena/smart-gateway-at91sam/board.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 1a598395699..5c3e84b0b40 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c index 9e448fcd10d..4eb7d76660e 100644 --- a/board/gdsys/a38x/controlcenterdc.c +++ b/board/gdsys/a38x/controlcenterdc.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index ddd6ee89538..8c9636d292e 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c index ae77fc2fd12..d4108457d92 100644 --- a/board/gdsys/mpc8308/mpc8308.c +++ b/board/gdsys/mpc8308/mpc8308.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index 6eb3d6c5d06..8e868165ed6 100644 --- a/board/gdsys/p1022/controlcenterd.c +++ b/board/gdsys/p1022/controlcenterd.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 917ecc4c181..2f6747b70a3 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -5,6 +5,7 @@ * Copyright 2012 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index 54485672982..51b5d8996d6 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c index c6d53600fa1..7f0de5e42b0 100644 --- a/board/grinn/chiliboard/board.c +++ b/board/grinn/chiliboard/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 151041a789e..5d71b639df0 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index f56b5b1affe..652f9755155 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/intel/slimbootloader/slimbootloader.c b/board/intel/slimbootloader/slimbootloader.c index f50eeb823f6..b20ddf0c682 100644 --- a/board/intel/slimbootloader/slimbootloader.c +++ b/board/intel/slimbootloader/slimbootloader.c @@ -4,6 +4,7 @@ */ #include +#include int board_early_init_r(void) { diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index d59121296e4..bc9fdcd1e6c 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index 84cddd48949..2f57310e27a 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c index 2c541ace021..7c7f84e87f9 100644 --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index 8846b64f7d7..abbf985eb2e 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 922cc621f78..7f83ec180ec 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index 4d1e38aa3a7..ae9653db78f 100644 --- a/board/keymile/kmp204x/kmp204x.c +++ b/board/keymile/kmp204x/kmp204x.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index b7b747d1965..e4f0e81004e 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c index 00210ab254f..7521cacaf95 100644 --- a/board/kosagi/novena/novena_spl.c +++ b/board/kosagi/novena/novena_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/laird/wb50n/wb50n.c b/board/laird/wb50n/wb50n.c index a2f8eaf0ba3..bf2a024c7de 100644 --- a/board/laird/wb50n/wb50n.c +++ b/board/laird/wb50n/wb50n.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/liebherr/mccmon6/mccmon6.c b/board/liebherr/mccmon6/mccmon6.c index 60a43038899..f32c492c615 100644 --- a/board/liebherr/mccmon6/mccmon6.c +++ b/board/liebherr/mccmon6/mccmon6.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c index be6e5a72c39..85f6c049810 100644 --- a/board/logicpd/imx6/imx6logic.c +++ b/board/logicpd/imx6/imx6logic.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index ab5e6e8b97a..89c64bfa35a 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c index 6e5ef4c97f4..067907ba52c 100644 --- a/board/mscc/jr2/jr2.c +++ b/board/mscc/jr2/jr2.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c index 114f7fd9d9b..e614058d10f 100644 --- a/board/mscc/luton/luton.c +++ b/board/mscc/luton/luton.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c index 91d03951dbb..ad227a41693 100644 --- a/board/mscc/ocelot/ocelot.c +++ b/board/mscc/ocelot/ocelot.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c index da7f55620de..6c6dbf2bfff 100644 --- a/board/mscc/serval/serval.c +++ b/board/mscc/serval/serval.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c index 566f9765c29..71891f6fe38 100644 --- a/board/mscc/servalt/servalt.c +++ b/board/mscc/servalt/servalt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index e1ebe8e75d0..664e4f244d3 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c index ac5e3a23283..820b5fde142 100644 --- a/board/phytec/pcm058/pcm058.c +++ b/board/phytec/pcm058/pcm058.c @@ -10,6 +10,7 @@ * same pins (SD4) */ #include +#include #include #include #include diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c index 57de1f8e556..bfd0deb2aa5 100644 --- a/board/phytec/pfla02/pfla02.c +++ b/board/phytec/pfla02/pfla02.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index 5fcbf65b7c9..dac59cd55df 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -4,6 +4,7 @@ * Author: Wadim Egorov */ +#include #include #include #include diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index d7f0f93fb10..254af7907ad 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/r2dplus/r2dplus.c b/board/renesas/r2dplus/r2dplus.c index 6eff98706f7..f2da4686c3f 100644 --- a/board/renesas/r2dplus/r2dplus.c +++ b/board/renesas/r2dplus/r2dplus.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c index d0b850f35d4..d675f65c127 100644 --- a/board/renesas/sh7752evb/sh7752evb.c +++ b/board/renesas/sh7752evb/sh7752evb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c index e1bed7dcc37..43e13829f38 100644 --- a/board/renesas/sh7753evb/sh7753evb.c +++ b/board/renesas/sh7753evb/sh7753evb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c index d2671202e98..1d7ed9977ee 100644 --- a/board/renesas/sh7757lcr/sh7757lcr.c +++ b/board/renesas/sh7757lcr/sh7757lcr.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c index 2faeab9baf5..c5e28df258f 100644 --- a/board/rockchip/kylin_rk3036/kylin_rk3036.c +++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index 6c76c3c25c4..93e9d2f4653 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -7,6 +7,7 @@ #include #include #include +#include #include static int get_ethaddr_from_eeprom(u8 *addr) diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 9adbd1e2cf9..ee2fc7971eb 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c index 2d32ad94571..1ea89063889 100644 --- a/board/samtec/vining_fpga/socfpga.c +++ b/board/samtec/vining_fpga/socfpga.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 68e8071d262..b9c92279409 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c index a6840b895b2..94bd71ad097 100644 --- a/board/siemens/draco/board.c +++ b/board/siemens/draco/board.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c index 30f0902701e..b5a10ebf8be 100644 --- a/board/siemens/pxm2/board.c +++ b/board/siemens/pxm2/board.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c index 539ecef22cb..d7d9738a6d0 100644 --- a/board/siemens/rut/board.c +++ b/board/siemens/rut/board.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index 51985b91c22..78692e92408 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -6,6 +6,7 @@ * Author: Christoph Fritz */ +#include #include #include #include diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c index f82fb0786a9..d6e0c83e0d2 100644 --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c @@ -13,6 +13,7 @@ * Ported to SolidRun microSOM by Rabeeh Khoury */ +#include #include #include #include diff --git a/board/spear/x600/x600.c b/board/spear/x600/x600.c index d6508ee44dd..e1232edd143 100644 --- a/board/spear/x600/x600.c +++ b/board/spear/x600/x600.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index 5be60af18ca..df907426d2e 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c index 3ab95188048..6aab2e243ed 100644 --- a/board/st/stm32h743-disco/stm32h743-disco.c +++ b/board/st/stm32h743-disco/stm32h743-disco.c @@ -6,6 +6,7 @@ #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c index 3ab95188048..6aab2e243ed 100644 --- a/board/st/stm32h743-eval/stm32h743-eval.c +++ b/board/st/stm32h743-eval/stm32h743-eval.c @@ -6,6 +6,7 @@ #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 18f9b848765..d700c446760 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 6e226e5d7dd..27062fbe82f 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c index f64fadde033..2e41cd8689b 100644 --- a/board/syteco/zmx25/zmx25.c +++ b/board/syteco/zmx25/zmx25.c @@ -15,6 +15,7 @@ */ #include #include +#include #include #include #include diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index a9588275076..7537fa213aa 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 216475c8dec..ba8741e0ede 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -3,6 +3,7 @@ * Copyright (C) 2017 NXP Semiconductors */ +#include #include #include #include diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c index 2958d5ff882..621e26905ba 100644 --- a/board/theadorable/theadorable.c +++ b/board/theadorable/theadorable.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #if !defined(CONFIG_SPL_BUILD) #include diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 7eaa6cd96d6..56d354c3d27 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 2e09cc20e8c..c4018498aad 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 2451cb056ef..b0a6412b1f4 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index ea8523541f8..04e9b894d54 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 4ff9a44b371..a0fd03a39fb 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -7,6 +7,7 @@ */ #include #include +#include #include #include #include diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index af48b560952..3e5174ef8a6 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 6421a22c25a..ed4a366a154 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index d1ae463941a..7dfe8aec88d 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c @@ -3,6 +3,7 @@ * Copyright (C) 2018-2019 Toradex AG */ #include +#include #include #include diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index eae3c591a16..adeee676434 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index ad40b589c1e..1fd0f2c122a 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 04d8ffd1e66..92c5dbfc5ac 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 5b20afd4881..c8ddc2c1f85 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -7,6 +7,7 @@ * Author: Markus Niebel */ +#include #include #include #include diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c index 8a2431edab9..154ea0e9258 100644 --- a/board/tqc/tqma6/tqma6_mba6.c +++ b/board/tqc/tqma6/tqma6_mba6.c @@ -7,6 +7,7 @@ * Author: Markus Niebel */ +#include #include #include #include diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tqc/tqma6/tqma6_wru4.c index 99196ad6857..3a5957f7601 100644 --- a/board/tqc/tqma6/tqma6_wru4.c +++ b/board/tqc/tqma6/tqma6_wru4.c @@ -9,6 +9,7 @@ * Copyright (C) 2015 Stefan Roese */ +#include #include #include #include diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 5c468a6a973..2ba98c7b52e 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -8,6 +8,7 @@ * Author: Francesco Montefoschi */ +#include #include #include #include diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c index f2c2bf47b0f..2a4e790d88a 100644 --- a/board/udoo/udoo.c +++ b/board/udoo/udoo.c @@ -5,6 +5,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c index fa02fefefa5..0515ebbad24 100644 --- a/board/varisys/cyrus/cyrus.c +++ b/board/varisys/cyrus/cyrus.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c index 588f6db1724..02ea1c0533f 100644 --- a/board/vscom/baltos/board.c +++ b/board/vscom/baltos/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 69cdf3e9c96..3252e5b5564 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -6,6 +6,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/warp/warp.c b/board/warp/warp.c index a44a5789e45..f7bff5334d9 100644 --- a/board/warp/warp.c +++ b/board/warp/warp.c @@ -7,6 +7,7 @@ * Author: Otavio Salvador */ +#include #include #include #include diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 39ae9822573..95be016931f 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -4,6 +4,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c index 3f23af9ed40..5cc2566e2a1 100644 --- a/board/work-microwave/work_92105/work_92105.c +++ b/board/work-microwave/work_92105/work_92105.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/xes/xpedite517x/xpedite517x.c b/board/xes/xpedite517x/xpedite517x.c index 0d8fba851d1..41644932775 100644 --- a/board/xes/xpedite517x/xpedite517x.c +++ b/board/xes/xpedite517x/xpedite517x.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/xes/xpedite520x/xpedite520x.c b/board/xes/xpedite520x/xpedite520x.c index 8daa18e97cd..5a4a36cad1e 100644 --- a/board/xes/xpedite520x/xpedite520x.c +++ b/board/xes/xpedite520x/xpedite520x.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/xes/xpedite537x/xpedite537x.c b/board/xes/xpedite537x/xpedite537x.c index 8776a02302c..4842096c244 100644 --- a/board/xes/xpedite537x/xpedite537x.c +++ b/board/xes/xpedite537x/xpedite537x.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/xes/xpedite550x/xpedite550x.c b/board/xes/xpedite550x/xpedite550x.c index 378e5b67ff0..6ee70d6d299 100644 --- a/board/xes/xpedite550x/xpedite550x.c +++ b/board/xes/xpedite550x/xpedite550x.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index ba82292e35a..bf7b794a211 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 50013c83cc9..a8514ad0907 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 35191b2f813..6609cb7c33a 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index babec5f34fd..abf59ac1124 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 9bdd1cf85c4..3001296ff21 100644 --- a/include/common.h +++ b/include/common.h @@ -137,13 +137,6 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR #endif -/* $(BOARD)/$(BOARD).c */ -int board_early_init_f (void); -int board_fix_fdt (void *rw_fdt_blob); /* manipulate the U-Boot fdt before its relocation */ -int board_late_init (void); -int board_postclk_init (void); /* after clocks/timebase, before env/serial */ -int board_early_init_r (void); - #if defined(CONFIG_SYS_DRAM_TEST) int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ diff --git a/include/init.h b/include/init.h index 6076283d2c8..e506cd30dd1 100644 --- a/include/init.h +++ b/include/init.h @@ -197,6 +197,14 @@ int show_board_info(void); */ ulong board_get_usable_ram_top(ulong total_size); +int board_early_init_f(void); + +/* manipulate the U-Boot fdt before its relocation */ +int board_fix_fdt(void *rw_fdt_blob); +int board_late_init(void); +int board_postclk_init(void); /* after clocks/timebase, before env/serial */ +int board_early_init_r(void); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ From patchwork Mon Sep 30 14:41:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169437 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="D3MvxGgh"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlrd4knTz9s00 for ; Tue, 1 Oct 2019 00:58:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4E26BC21D4A; Mon, 30 Sep 2019 14:56:05 +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 55D66C21EFF; Mon, 30 Sep 2019 14:42:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0B1F5C21F4A; Mon, 30 Sep 2019 14:42:05 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id AE810C21DF8 for ; Mon, 30 Sep 2019 14:41:50 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id z19so39056190ior.0 for ; Mon, 30 Sep 2019 07:41:50 -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=fVUQe0flYa/dBdLsvMDeABS6QJYKi2ADOQ7ozzFgsOY=; b=D3MvxGgh9MCYwQYK23iLsM5LRz1CTwQqlcT3iP/9yILlYxs3ZauC8hCCtz/BjqIW5o 9bdqRTBpx95YYqHDzkyzJVOsndbKkkZGk6ixFuWPItKQeIuTIiVcsmiph/E4O+vEESAu CrE8D7UMvpAhunuwUVZ06dkdEKPjXNfzITl80= 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=fVUQe0flYa/dBdLsvMDeABS6QJYKi2ADOQ7ozzFgsOY=; b=PlWgiYa+TA9JUqXjBx5e9v/ZUiUsA5TlEmusy3jMcXV3flnRsEzGdesfZ0L1guwRA8 yi9iHB2JUP4/CmUEYr8ToRstx+CJAqZRdmB9RjzhJVd0451WlriQrYz3q0E+EazNNKW+ mbyK3lDWI6Y0H9Md4eHGtPnu7kEj/r+RduvsbBUC33IHXRQ3dzmMXQ6YehvM2SkQu6T9 85vuxnQtICnJMMz1H3AQbEVkT5q+jtZugMa/BOAOL6mac3kBOciGLfnmQF0R6oOKMzRh JBiffQD+PGPYRBu7NMEc8w3p1M9l+MJejlgr0PNzQ5U2rlDPxfPp2BGSNU30ojv4Kcoj dZiw== X-Gm-Message-State: APjAAAWcNqeesvv1wo9zIznM7QTJIiwYQvyYTH41mlSJvnJmYHkYNZRT 2zj32K/T61zPOyLp0OFqX9Ow2Pg1SxE= X-Google-Smtp-Source: APXvYqyvMSGg6+2faFhwYrapEGo7Mj0rzyj9E4Qd6w8kQkVOkT0OQQDO4JJ4c67BZCfTaa3Lj1KONw== X-Received: by 2002:a6b:e50b:: with SMTP id y11mr15489283ioc.161.1569854509191; Mon, 30 Sep 2019 07:41:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:48 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:09 -0600 Message-Id: <20190930144112.175618-39-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 38/41] common: Move pci_init_board() 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 can be dropped when all boards use driver model for PCI. For now, move it into init.h with a comment. Signed-off-by: Simon Glass --- board/armltd/integrator/pci.c | 1 + board/cavium/thunderx/thunderx.c | 1 + board/esd/vme8349/pci.c | 1 + board/freescale/b4860qds/pci.c | 1 + board/freescale/common/p_corenet/pci.c | 1 + board/freescale/m54455evb/m54455evb.c | 1 + board/freescale/m547xevb/m547xevb.c | 1 + board/freescale/m548xevb/m548xevb.c | 1 + board/freescale/mpc8308rdb/mpc8308rdb.c | 1 + board/freescale/mpc8315erdb/mpc8315erdb.c | 1 + board/freescale/mpc8323erdb/mpc8323erdb.c | 1 + board/freescale/mpc832xemds/pci.c | 1 + board/freescale/mpc8349emds/pci.c | 1 + board/freescale/mpc8349itx/pci.c | 1 + board/freescale/mpc837xemds/pci.c | 1 + board/freescale/mpc837xerdb/pci.c | 1 + board/freescale/mpc8541cds/mpc8541cds.c | 1 + board/freescale/mpc8544ds/mpc8544ds.c | 1 + board/freescale/mpc8548cds/mpc8548cds.c | 1 + board/freescale/mpc8555cds/mpc8555cds.c | 1 + board/freescale/mpc8568mds/mpc8568mds.c | 1 + board/freescale/mpc8610hpcd/mpc8610hpcd.c | 1 + board/freescale/mpc8641hpcn/mpc8641hpcn.c | 1 + board/freescale/qemu-ppce500/qemu-ppce500.c | 1 + board/freescale/t102xqds/pci.c | 1 + board/freescale/t102xrdb/pci.c | 1 + board/freescale/t1040qds/pci.c | 1 + board/freescale/t104xrdb/pci.c | 1 + board/freescale/t208xqds/pci.c | 1 + board/freescale/t208xrdb/pci.c | 1 + board/freescale/t4qds/pci.c | 1 + board/freescale/t4rdb/pci.c | 1 + board/gdsys/mpc8308/hrcon.c | 1 + board/gdsys/mpc8308/strider.c | 1 + board/imgtec/malta/malta.c | 1 + board/keymile/kmp204x/pci.c | 1 + board/mpc8308_p1m/mpc8308_p1m.c | 1 + board/renesas/r7780mp/r7780mp.c | 1 + board/sbc8349/pci.c | 1 + board/sbc8548/sbc8548.c | 1 + board/sbc8641d/sbc8641d.c | 1 + board/tqc/tqm834x/pci.c | 1 + board/varisys/cyrus/pci.c | 1 + board/ve8313/ve8313.c | 1 + board/xes/common/fsl_8xxx_pci.c | 1 + drivers/pci/pci.c | 1 + drivers/pci/pcie_imx.c | 1 + include/common.h | 2 -- include/init.h | 3 +++ 49 files changed, 50 insertions(+), 2 deletions(-) diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c index 5e57f7f4c96..c189d23eecd 100644 --- a/board/armltd/integrator/pci.c +++ b/board/armltd/integrator/pci.c @@ -20,6 +20,7 @@ * Linus Walleij */ #include +#include #include #include #include "integrator-sc.h" diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index cf55b633c3e..940455de5b2 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/board/cavium/thunderx/thunderx.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/esd/vme8349/pci.c b/board/esd/vme8349/pci.c index 82347f258c9..349e7b567c4 100644 --- a/board/esd/vme8349/pci.c +++ b/board/esd/vme8349/pci.c @@ -10,6 +10,7 @@ * Based on MPC8349 PCI support but w/o PIB related code. */ +#include #include #include #include diff --git a/board/freescale/b4860qds/pci.c b/board/freescale/b4860qds/pci.c index 3663b14bc37..45dd461e772 100644 --- a/board/freescale/b4860qds/pci.c +++ b/board/freescale/b4860qds/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/common/p_corenet/pci.c b/board/freescale/common/p_corenet/pci.c index a6abe66dc0e..94e4715f1c9 100644 --- a/board/freescale/common/p_corenet/pci.c +++ b/board/freescale/common/p_corenet/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c index 98af3be595b..146cd918c4d 100644 --- a/board/freescale/m54455evb/m54455evb.c +++ b/board/freescale/m54455evb/m54455evb.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/m547xevb/m547xevb.c b/board/freescale/m547xevb/m547xevb.c index 9e1aa99bbcf..e8d86113d64 100644 --- a/board/freescale/m547xevb/m547xevb.c +++ b/board/freescale/m547xevb/m547xevb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c index b4915184681..40e01c6f24f 100644 --- a/board/freescale/m548xevb/m548xevb.c +++ b/board/freescale/m548xevb/m548xevb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c index fc29e2f0dce..ae73246e5bf 100644 --- a/board/freescale/mpc8308rdb/mpc8308rdb.c +++ b/board/freescale/mpc8308rdb/mpc8308rdb.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c index 84b85f8b103..93e0fca083f 100644 --- a/board/freescale/mpc8315erdb/mpc8315erdb.c +++ b/board/freescale/mpc8315erdb/mpc8315erdb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index 003e95cb6ba..cbec8a44e4d 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc832xemds/pci.c b/board/freescale/mpc832xemds/pci.c index d94269a6ea4..45c7294832d 100644 --- a/board/freescale/mpc832xemds/pci.c +++ b/board/freescale/mpc832xemds/pci.c @@ -6,6 +6,7 @@ /* * PCI Configuration space access support for MPC83xx PCI Bridge */ +#include #include #include #include diff --git a/board/freescale/mpc8349emds/pci.c b/board/freescale/mpc8349emds/pci.c index 005190ed87d..7615a1dfaa2 100644 --- a/board/freescale/mpc8349emds/pci.c +++ b/board/freescale/mpc8349emds/pci.c @@ -3,6 +3,7 @@ * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/freescale/mpc8349itx/pci.c b/board/freescale/mpc8349itx/pci.c index c3c2328dcd2..550a2afcb73 100644 --- a/board/freescale/mpc8349itx/pci.c +++ b/board/freescale/mpc8349itx/pci.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/freescale/mpc837xemds/pci.c b/board/freescale/mpc837xemds/pci.c index 41b78cf5e4d..c72e49fbe1a 100644 --- a/board/freescale/mpc837xemds/pci.c +++ b/board/freescale/mpc837xemds/pci.c @@ -3,6 +3,7 @@ * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/freescale/mpc837xerdb/pci.c b/board/freescale/mpc837xerdb/pci.c index 38954587aba..07471e0ae56 100644 --- a/board/freescale/mpc837xerdb/pci.c +++ b/board/freescale/mpc837xerdb/pci.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c index be79a7ca7b8..cb130b4a86b 100644 --- a/board/freescale/mpc8541cds/mpc8541cds.c +++ b/board/freescale/mpc8541cds/mpc8541cds.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c index dbfa80a216c..2d4aace98d0 100644 --- a/board/freescale/mpc8544ds/mpc8544ds.c +++ b/board/freescale/mpc8544ds/mpc8544ds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index 28f8a998ce7..a4455d3f612 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c index bc1ebc51edb..47193dd20e7 100644 --- a/board/freescale/mpc8555cds/mpc8555cds.c +++ b/board/freescale/mpc8555cds/mpc8555cds.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c index dd2d15ea00c..5167f81be71 100644 --- a/board/freescale/mpc8568mds/mpc8568mds.c +++ b/board/freescale/mpc8568mds/mpc8568mds.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c index 5c8538fa1d7..86edd66bca2 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index ea4f3d670bb..d9e538b868f 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 6814bed27c7..e5820659754 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xqds/pci.c b/board/freescale/t102xqds/pci.c index 4100370e209..1b1cc0483ca 100644 --- a/board/freescale/t102xqds/pci.c +++ b/board/freescale/t102xqds/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/pci.c b/board/freescale/t102xrdb/pci.c index adc128d9241..bd0e29744c9 100644 --- a/board/freescale/t102xrdb/pci.c +++ b/board/freescale/t102xrdb/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t1040qds/pci.c b/board/freescale/t1040qds/pci.c index 9fd66594f4a..5152cdf18ac 100644 --- a/board/freescale/t1040qds/pci.c +++ b/board/freescale/t1040qds/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/pci.c b/board/freescale/t104xrdb/pci.c index 6b666ba2d24..ff7cf364468 100644 --- a/board/freescale/t104xrdb/pci.c +++ b/board/freescale/t104xrdb/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t208xqds/pci.c b/board/freescale/t208xqds/pci.c index ef26f14c461..e3355927766 100644 --- a/board/freescale/t208xqds/pci.c +++ b/board/freescale/t208xqds/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/pci.c b/board/freescale/t208xrdb/pci.c index adc128d9241..bd0e29744c9 100644 --- a/board/freescale/t208xrdb/pci.c +++ b/board/freescale/t208xrdb/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/pci.c b/board/freescale/t4qds/pci.c index 4860ab6ed13..26e2a0af4aa 100644 --- a/board/freescale/t4qds/pci.c +++ b/board/freescale/t4qds/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t4rdb/pci.c b/board/freescale/t4rdb/pci.c index 7d670e1a2f8..ac0c95687a5 100644 --- a/board/freescale/t4rdb/pci.c +++ b/board/freescale/t4rdb/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c index 60faa4688cf..d1110157a2e 100644 --- a/board/gdsys/mpc8308/hrcon.c +++ b/board/gdsys/mpc8308/hrcon.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c index 886bc2b035d..9ba9e4278a5 100644 --- a/board/gdsys/mpc8308/strider.c +++ b/board/gdsys/mpc8308/strider.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c index b742e3738f5..77ce75ecf26 100644 --- a/board/imgtec/malta/malta.c +++ b/board/imgtec/malta/malta.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/keymile/kmp204x/pci.c b/board/keymile/kmp204x/pci.c index 965a8ce98b6..a8047457f24 100644 --- a/board/keymile/kmp204x/pci.c +++ b/board/keymile/kmp204x/pci.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/mpc8308_p1m/mpc8308_p1m.c b/board/mpc8308_p1m/mpc8308_p1m.c index ab724da0d2a..5b2fd9c23f6 100644 --- a/board/mpc8308_p1m/mpc8308_p1m.c +++ b/board/mpc8308_p1m/mpc8308_p1m.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/r7780mp/r7780mp.c b/board/renesas/r7780mp/r7780mp.c index e2c5c5ba937..8dbeeb6e680 100644 --- a/board/renesas/r7780mp/r7780mp.c +++ b/board/renesas/r7780mp/r7780mp.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/sbc8349/pci.c b/board/sbc8349/pci.c index b173c9c5027..b6435f34f22 100644 --- a/board/sbc8349/pci.c +++ b/board/sbc8349/pci.c @@ -7,6 +7,7 @@ * Based on MPC8349 PCI support but w/o PIB related code. */ +#include #include #include #include diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c index 0c36ded8627..d246dce36d0 100644 --- a/board/sbc8548/sbc8548.c +++ b/board/sbc8548/sbc8548.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index fb5db6c93d7..0a9dab89396 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c index c9b05e44c24..08342077665 100644 --- a/board/tqc/tqm834x/pci.c +++ b/board/tqc/tqm834x/pci.c @@ -5,6 +5,7 @@ * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/varisys/cyrus/pci.c b/board/varisys/cyrus/pci.c index a2df928fc52..66c4b30eb10 100644 --- a/board/varisys/cyrus/pci.c +++ b/board/varisys/cyrus/pci.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c index 1559ff210da..781a07f1d83 100644 --- a/board/ve8313/ve8313.c +++ b/board/ve8313/ve8313.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c index 84ca4d12154..9981d04c622 100644 --- a/board/xes/common/fsl_8xxx_pci.c +++ b/board/xes/common/fsl_8xxx_pci.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5db24f1c51d..e8285bf9363 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -15,6 +15,7 @@ */ #include +#include #include #include diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c index 10b8fb4c889..d53d6298bf3 100644 --- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 3001296ff21..a292d919390 100644 --- a/include/common.h +++ b/include/common.h @@ -102,8 +102,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); /* common/cmd_ext2.c */ int do_ext2load(cmd_tbl_t *, int, int, char * const []); -void pci_init_board(void); - /* common/exports.c */ void jumptable_init(void); diff --git a/include/init.h b/include/init.h index e506cd30dd1..3b45e631fca 100644 --- a/include/init.h +++ b/include/init.h @@ -205,6 +205,9 @@ int board_late_init(void); int board_postclk_init(void); /* after clocks/timebase, before env/serial */ int board_early_init_r(void); +/* TODO(sjg@chromium.org): Drop this when DM_PCI migration is completed */ +void pci_init_board(void); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ From patchwork Mon Sep 30 14:41:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169464 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="afjex3Cz"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hm115Jlsz9sP7 for ; Tue, 1 Oct 2019 01:05:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7D38DC21EC2; Mon, 30 Sep 2019 14:54:09 +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 DE5E1C21F3D; Mon, 30 Sep 2019 14:42:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45C9DC21EF2; Mon, 30 Sep 2019 14:42:05 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 1A3C6C21E62 for ; Mon, 30 Sep 2019 14:41:51 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id q1so39006274ion.1 for ; Mon, 30 Sep 2019 07:41:51 -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=qc9xuTuB8hdtf+/OWyC75+QxteMK0bXGE5bdWK7+efA=; b=afjex3CzchYixqL+dgFiv9vLOobKe2lbqKVO0MSqXMwGriMhHidqtBhlFaCxSpZxC5 utuu59WVcs3MY4pXlB8S9IntD594uTPCq/Jwigujpra3buoK37h4ZLOI9cxX++/FGpIr wDumXiyUYVIVW2PHAwXlnfmHW/CcADYeHxKeI= 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=qc9xuTuB8hdtf+/OWyC75+QxteMK0bXGE5bdWK7+efA=; b=ajrTWUdRl+xVc2wxgLHL4zw1S/shIl6gWKzvWmLo3C8XmHSh6k9srJYP0lj8foUAqU OW/a+ayqMisEmbBU25zriMR/kr5EJQUUxkrAxiv1BlF6URg7ShsN09jOZTpLk3j9XULH /sING5VLCuL6U2uxJIVzIG5KIkvwhpq3wS0IWp4LCM9ivMiHFone0NPHZC+agc2OIpxB r18B1oGoVp9Dme1U0O5AH3swRVSsvR0om5uF/+Tq4aRh2MdUEFarmWUgzckh9FNjJpfi 49ldQk552gaiLwQaakg8XAIjqPBn1BWwKKzk8Q7qgAZFD6w3bqUypj7+L6GqDOX7UNR9 f1FQ== X-Gm-Message-State: APjAAAWwvtLt8q4mqhw3XjtIWIeqzjWgXFEFgeIEV6RfoWVOH1TWXeO1 jT01Gb3FlBG1b5HIKi6t1qzbVk9x/+A= X-Google-Smtp-Source: APXvYqy8rIoSmV0JLlDCS4vNtmUcC5XsjEL4puQUvq0+ytsyeu3tJYOZ2Xe1+kQjB6jJ3jKdQuxCMA== X-Received: by 2002:a05:6602:2185:: with SMTP id b5mr593876iob.265.1569854509806; Mon, 30 Sep 2019 07:41:49 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:49 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:10 -0600 Message-Id: <20190930144112.175618-40-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 39/41] common: Move trap_init() 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" Move this function into the irq_legacy.h header file. Signed-off-by: Simon Glass --- arch/m68k/lib/traps.c | 1 + arch/mips/lib/traps.c | 1 + include/common.h | 1 - include/irq_legacy.h | 2 ++ 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c index 5d802077453..b2e7e9fe407 100644 --- a/arch/m68k/lib/traps.c +++ b/arch/m68k/lib/traps.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index ff02d437a87..d173a1b0134 100644 --- a/arch/mips/lib/traps.c +++ b/arch/mips/lib/traps.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index a292d919390..e946e4d9b7f 100644 --- a/include/common.h +++ b/include/common.h @@ -145,7 +145,6 @@ void relocate_code(ulong); void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); #endif ulong get_endaddr (void); -void trap_init (ulong); void s_init(void); diff --git a/include/irq_legacy.h b/include/irq_legacy.h index 91b523d043a..a029c54b702 100644 --- a/include/irq_legacy.h +++ b/include/irq_legacy.h @@ -21,4 +21,6 @@ void reset_timer(void); void enable_interrupts(void); int disable_interrupts(void); +void trap_init(unsigned long reloc_addr); + #endif From patchwork Mon Sep 30 14:41:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169463 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="GiAqhVB1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hm0g3pN9z9sP7 for ; Tue, 1 Oct 2019 01:05:07 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1D9BAC21EBD; Mon, 30 Sep 2019 14:53:57 +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 592E5C21F3C; Mon, 30 Sep 2019 14:42:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8A54CC21EFF; Mon, 30 Sep 2019 14:42:07 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 10B66C21DFD for ; Mon, 30 Sep 2019 14:41:52 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id h144so38898621iof.7 for ; Mon, 30 Sep 2019 07:41:52 -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=oSyBzTz2Emwgoy7l4ai8aq3AzqBQ7tahLtGGjsuxyJg=; b=GiAqhVB1tbwrB1WQIePpHX5ZxwYpmDVhIa7A1C4FwyPbxjut2EDoM74qMW94XFy+nK DyCrB7eaRD2x1BTeWXhwoDVj6vIe8tcNzVArqTINy+vYomr1eBW91U26o4lAhvgRdqUS YO0THuxk4oMrHE16Nq7j6gssUh3/M4gLSO3SQ= 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=oSyBzTz2Emwgoy7l4ai8aq3AzqBQ7tahLtGGjsuxyJg=; b=futIq1mMemj9FZaXYpIbf/BEJ4a2WBftjA1z0MhluriVtO13iQ1wQa07QiOavEQm/X e4BhU3d3hN9E0PsC+ddVZHllEk7KMgD9nUdAlCo4mnKgT8/vle2T4kLRs4qYTcBTYq0/ BezwxklFVTQf0jBdZgjIrAS2kI4YEB6ELYcwK2TpgXLNjowmUFsEaNPe7cMV3ZnZ1B4p NFAsZNaRG8agEVEdFda5NbGKRJIj24ZSTc81kjUSCYRe6yPYcCA5OqNOKEvxnMhic6BH J3VFpsmQblmICcX4oTigVrOswjNiIwa+WmG5EdmNfdgVKM2wDEuyxm0MXz3KnpFQ4KpT SUoQ== X-Gm-Message-State: APjAAAW/oNpYyEMoh5aEXVUfhOL4IlE29/bgspGeYQD0fFkjt/nxULeJ 7cvk1hsgV4GeM7KrasZevXhMV1tLmfs= X-Google-Smtp-Source: APXvYqzEpl/t98CtwUJ86pnOcT3F6Z/izLKrOjYB7Jofw5bQRvefXyxkoXzYpUP/Y3oLxrwtjewDaQ== X-Received: by 2002:a6b:6110:: with SMTP id v16mr12100728iob.199.1569854510875; Mon, 30 Sep 2019 07:41:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:50 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:11 -0600 Message-Id: <20190930144112.175618-41-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 40/41] common: Drop get_endaddr() 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 is not used in U-Boot. Drop it. Signed-off-by: Simon Glass --- include/common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/common.h b/include/common.h index e946e4d9b7f..64d0cf542e8 100644 --- a/include/common.h +++ b/include/common.h @@ -144,7 +144,6 @@ void relocate_code(ulong); #else void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); #endif -ulong get_endaddr (void); void s_init(void); From patchwork Mon Sep 30 14:41:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1169452 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="NO7ZgQr/"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hlwF3dj7z9s00 for ; Tue, 1 Oct 2019 01:01:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DE1E6C21E76; Mon, 30 Sep 2019 14:55:42 +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 BE7F0C21F52; Mon, 30 Sep 2019 14:42:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CD83DC21F21; Mon, 30 Sep 2019 14:42:08 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 03A6EC21E08 for ; Mon, 30 Sep 2019 14:41:53 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id q10so39039002iop.2 for ; Mon, 30 Sep 2019 07:41:52 -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=tV+AyJ26cKwSdqSElmOHE6JGSNGXIJ68O0zMyu03Tnc=; b=NO7ZgQr/ZwWVASPA9/mt0JwCNyw4D0dNSDaEOOGjBlH3sfJfNKLHsiSn42B9oQVISp UmF1+s6Qsnkj99hwS0LvWWaFp1dOp+dUDwG0sNroCney08V9VITnPv7Aj1MWlUZFY1SQ 4LysskIz2OttE0Sn/8IBAo9YyB+luM3nELp2g= 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=tV+AyJ26cKwSdqSElmOHE6JGSNGXIJ68O0zMyu03Tnc=; b=gafEKrikHDdyhLT+H42fS/wAIoC+GnpAgNNB6iDBOKGkDVUceT6gnmJyjY+cNrnxnk 1JUt9nzo/3IvgIWgVQixWQh68fggTN/PuCyJf1kBppyNiQdEH0jwgJGow8iwl9gTWK8W r6b+JOnOaTQbnB0UYMPzq3NfOMy3QQHi0WnwA5YNCZZ7bGCUpaYh4zAr9zQOZgL9tZ5C zu6sEO8LQs3o+2WyD3ptziOPPJnuGnhrRZYv8caelMNI4k3ncmo+zp+8HTF4ZkZuYpNY qNOTmbWduUg55Yt81JZvsWNNU1SIj60fHWbj9EZKY/0UWqjk+DkYsQ9Yb0tYj/iTlSPJ JntA== X-Gm-Message-State: APjAAAXTJEubSyUNwn3G1VTPfOrWCVDj1ogQ3DHovhEoALetz62Hkpsk wOL+/KyEqb2tK0wRQuOkVWk2cYvETG0= X-Google-Smtp-Source: APXvYqz4Z9j7Unsu+XJbpbg/2NHtjuSGNBVdu9O0yxV1q750tRNOJu63HoKQd/GzDvCL+J+HgXw5YA== X-Received: by 2002:a6b:b792:: with SMTP id h140mr21242959iof.225.1569854511618; Mon, 30 Sep 2019 07:41:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 07:41:51 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 30 Sep 2019 08:41:12 -0600 Message-Id: <20190930144112.175618-42-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 41/41] common: Move old EEPROM functions into a new header 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" These functions do not use driver model but are still used. Move them to a new eeprom_legacy.h header file. Signed-off-by: Simon Glass --- board/atmel/common/mac_eeprom.c | 1 + board/compulab/common/eeprom.c | 1 + board/corscience/tricorder/tricorder-eeprom.c | 1 + board/dhelectronics/dh_imx6/dh_imx6.c | 1 + board/freescale/mpc8323erdb/mpc8323erdb.c | 1 + board/kosagi/novena/novena.c | 1 + board/phytec/phycore_rk3288/phycore-rk3288.c | 1 + board/rockchip/tinker_rk3288/tinker-rk3288.c | 1 + board/samtec/vining_fpga/socfpga.c | 1 + board/ti/am43xx/board.c | 1 + board/ti/common/board_detect.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + cmd/eeprom.c | 1 + drivers/misc/i2c_eeprom.c | 1 + drivers/mtd/mw_eeprom.c | 1 + drivers/rtc/rv3029.c | 1 + env/eeprom.c | 1 + include/common.h | 15 ------------ include/eeprom_legacy.h | 24 +++++++++++++++++++ 19 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 include/eeprom_legacy.h diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c index 83a7778e995..cb9df31a6aa 100644 --- a/board/atmel/common/mac_eeprom.c +++ b/board/atmel/common/mac_eeprom.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c index 81f69d38502..7e4ce893672 100644 --- a/board/compulab/common/eeprom.c +++ b/board/compulab/common/eeprom.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c index b28189dafdc..faec265fd93 100644 --- a/board/corscience/tricorder/tricorder-eeprom.c +++ b/board/corscience/tricorder/tricorder-eeprom.c @@ -5,6 +5,7 @@ * Andreas Bießmann */ #include +#include #include #include diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index 85e281ebb9c..3abfcc6694e 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index cbec8a44e4d..a6f4dd06c25 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index e4f0e81004e..9b2bd8f1dcf 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index dac59cd55df..da3119d3cec 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -4,6 +4,7 @@ * Author: Wadim Egorov */ +#include #include #include #include diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index 93e9d2f4653..740d309747d 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c index 1ea89063889..9a57b3deefb 100644 --- a/board/samtec/vining_fpga/socfpga.c +++ b/board/samtec/vining_fpga/socfpga.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index c4018498aad..99ab7c86cc9 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index bc89cc57bd7..79f6ea423d6 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index a0fd03a39fb..05f17727251 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, */ #include +#include #include #include #include diff --git a/cmd/eeprom.c b/cmd/eeprom.c index 19953df082f..8ed27a66215 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index 8f2349ad5a7..8999b05f4a5 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/mw_eeprom.c b/drivers/mtd/mw_eeprom.c index f7791b51a04..a2453902d44 100644 --- a/drivers/mtd/mw_eeprom.c +++ b/drivers/mtd/mw_eeprom.c @@ -1,6 +1,7 @@ /* Three-wire (MicroWire) serial eeprom driver (for 93C46 and compatibles) */ #include +#include #include /* diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c index 38acb9c9924..de9b68959fc 100644 --- a/drivers/rtc/rv3029.c +++ b/drivers/rtc/rv3029.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/env/eeprom.c b/env/eeprom.c index f0bdf2a1416..cfd5dba10a6 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 64d0cf542e8..8b37b587474 100644 --- a/include/common.h +++ b/include/common.h @@ -116,21 +116,6 @@ phys_size_t get_effective_memsize(void); void reset_phy (void); void fdc_hw_init (void); -/* $(BOARD)/eeprom.c */ -#ifdef CONFIG_CMD_EEPROM -void eeprom_init (int bus); -int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt); -int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt); -#else -/* - * Some EEPROM code is depecated because it used the legacy I2C interface. Add - * some macros here so we don't have to touch every one of those uses - */ -#define eeprom_init(bus) -#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) -#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) -#endif - #if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR) # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR #endif diff --git a/include/eeprom_legacy.h b/include/eeprom_legacy.h new file mode 100644 index 00000000000..61eb826a734 --- /dev/null +++ b/include/eeprom_legacy.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __EEPROM_LEGACY_H +#define __EEPROM_LEGACY_H + +#ifdef CONFIG_CMD_EEPROM +void eeprom_init(int bus); +int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt); +int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt); +#else +/* + * Some EEPROM code is depecated because it used the legacy I2C interface. Add + * some macros here so we don't have to touch every one of those uses + */ +#define eeprom_init(bus) +#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) +#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) +#endif + +#endif