From patchwork Thu Dec 12 00:47:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208038 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="iLcMfv6P"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFXB730Rz9sR7 for ; Thu, 12 Dec 2019 11:48:10 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 63ECA80919; Thu, 12 Dec 2019 01:48:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="iLcMfv6P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 12F3381497; Thu, 12 Dec 2019 01:48:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6D4B0801BA for ; Thu, 12 Dec 2019 01:48:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd43.google.com with SMTP id v18so872538iol.2 for ; Wed, 11 Dec 2019 16:48:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c/YwYs9WUc0AxNNRs+HiLGpVkYIgaNkgGSaZZf3Y82s=; b=iLcMfv6PNtg7xWKstezYz7y1CrcSTOmg6w5zB7VF7FLgZ8cc7Iwicb1VTHGkog+iYw D3gv1S0fQRMTl7NpvL+kRA3TKYA5ZMRXsbiHAF9Te+3/ktejNTGCHt+5EdTGTNeYLbaq vzkDBkXuey7LteJd+nfWtFFswujyovtS8qxLo= 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:mime-version :content-transfer-encoding; bh=c/YwYs9WUc0AxNNRs+HiLGpVkYIgaNkgGSaZZf3Y82s=; b=EBhWRFr5dy33nCa7whX04k0tjI4NX3yBRWME+H/nFksIyXA8tH5afBvmM1ZTLYaHb7 dpyWy8BCkd1kiD0UcoRxmTpGESFh5R3elQRPbB/RCT+9yl+ladSkDK2dWMuU4RwjS2aY 1XbBkDSpEMrSULJc/lDjaxcvoreXWLivWQzG0/XYqD/ax4t8WcjZiKruI1VLCkhpo1UV nhPKfXXnaWB831Fh9rdjwjGxtYshZ0IBllqqrXwrSa+0iITlDSlBIl6CuWpjJj2SlKQD qHh7mKkgE6BkVFExpPIFf7QdRLiUc3cZ+fu36sqZEwK/9JkrG6L5vtu4sG1UBi4/aL2B N65w== X-Gm-Message-State: APjAAAVuNip5ti8toAerakT4RpQgPPhak6iDMN302srh4p1qqOaEMLA2 mWvoKvB1OiXspGErv/TOcBxMDMvTGkY= X-Google-Smtp-Source: APXvYqzjdUEyFvIIiXCsr1hqGtNklse3tMG4+A17v2SEi215kZ8v2J1u631a8owxCp/njWcS4qQeLQ== X-Received: by 2002:a02:4e85:: with SMTP id r127mr5811828jaa.98.1576111680169; Wed, 11 Dec 2019 16:48:00 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:47:59 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 01/35] common: Drop mdm_init() Date: Wed, 11 Dec 2019 17:47:20 -0700 Message-Id: <20191212004755.11091-2-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This is not used in U-Boot. Drop it. Signed-off-by: Simon Glass Reviewed-by: Simon Goldschmidt --- include/common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/common.h b/include/common.h index 8b37b58747..fecfa27747 100644 --- a/include/common.h +++ b/include/common.h @@ -71,7 +71,6 @@ int checkflash(void); int checkdram(void); 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); /** * arch_fixup_fdt() - Write arch-specific information to fdt From patchwork Thu Dec 12 00:47:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208039 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jKRxFzNP"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFXN3Rw4z9sR7 for ; Thu, 12 Dec 2019 11:48:20 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFC8D814AE; Thu, 12 Dec 2019 01:48:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jKRxFzNP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6ABCD8149F; Thu, 12 Dec 2019 01:48:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 40BA581494 for ; Thu, 12 Dec 2019 01:48:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd43.google.com with SMTP id s2so813638iog.10 for ; Wed, 11 Dec 2019 16:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t7Qb4LWC47dCslQ12JNMoHbq+NrFxQOo1txkmZR2YLc=; b=jKRxFzNPgvvZYFwFmcXpi6UmRNIaZFUikwo+yVqmlW7y889I9abg+/b0HudMotM7Xy DW2UZY2O2XVLlJ1u+3d1+j8QYJpr5QNN2M+QxWLIQi2yE8WOvUotUl6Z+pSFalztvU4b Tx9EDxElkgcj0MuA7GOPx0UPVlJ9iyspkvkT8= 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=t7Qb4LWC47dCslQ12JNMoHbq+NrFxQOo1txkmZR2YLc=; b=dvBV/KE9pSvSA52wGANgA6WfsZak/pnZ3gpUssrqvQeIMW5n3qVr3Og31Ens71IgDT ebPyg70dJoKucX4UUNv8AKc0nkL35dvVUtmqfciONk9bvluBJy/4QyBhojBQDMyyNSIl xN9aqjVEELGZ+d4VXv/Fgd2k5ulnfu3NJ3TlCc8oDw6PWJNz5mVThChcjC5bE/0uNCfC vZutyhZvY5Q3OOtbr8ruwW9NWxttgC55oT3V1qOKduKgCaMYqCS+tm4UtRG24CYW1Ysx h9CErG/gOdn5iba3rIrk8LjxtiU9QlGxocuGgeyFEk/KA7ZSdCi+qOHb3spwW1ypDTK7 Oc8A== X-Gm-Message-State: APjAAAUiuR3xhH8UhtmtW/sLWAEaKPO5kl10SU5ipwGTH6QJBdNbjD1P GDKfZL8fcn9z2omy0BkoixJyFqq6lXs= X-Google-Smtp-Source: APXvYqw0KO/b/9bHHKhCqbQ5V5grB/B8xZ0GFp8vpKTn2KbB7kDFPTrMZICKwLJ/C37h5eMsfXwrdw== X-Received: by 2002:a02:8817:: with SMTP id r23mr5972876jai.120.1576111682807; Wed, 11 Dec 2019 16:48:02 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:02 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 02/35] common: Move main_loop() to init.h Date: Wed, 11 Dec 2019 17:47:21 -0700 Message-Id: <20191212004755.11091-3-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Stefan Roese , Stephen Warren , Joe Hershberger , Heinrich Schuchardt , Boris Brezillon , Alexander Graf Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move this function out of common.h and into a better place. Signed-off-by: Simon Glass Reviewed-by: Simon Goldschmidt --- common/board_r.c | 1 + common/main.c | 1 + include/common.h | 3 --- include/init.h | 7 +++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 5464172259..cda90bd385 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #if defined(CONFIG_CMD_KGDB) #include diff --git a/common/main.c b/common/main.c index a94df7ae04..ec8994ad45 100644 --- a/common/main.c +++ b/common/main.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* diff --git a/include/common.h b/include/common.h index fecfa27747..f1a3d32547 100644 --- a/include/common.h +++ b/include/common.h @@ -64,9 +64,6 @@ void hang (void) __attribute__ ((noreturn)); #include -/* common/main.c */ -void main_loop (void); - int checkflash(void); int checkdram(void); extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ diff --git a/include/init.h b/include/init.h index 8b65b2afe4..105afc6c3c 100644 --- a/include/init.h +++ b/include/init.h @@ -210,6 +210,13 @@ void pci_init_board(void); void trap_init(unsigned long reloc_addr); +/** + * main_loop() - Enter the main loop of U-Boot + * + * This normally runs the command line. + */ +void main_loop(void); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ From patchwork Thu Dec 12 00:47:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208040 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VDtwZYTF"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFXY4xkyz9sRf for ; Thu, 12 Dec 2019 11:48:29 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 45C7C8149F; Thu, 12 Dec 2019 01:48:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VDtwZYTF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9DEE7814AD; Thu, 12 Dec 2019 01:48:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8C577801BA for ; Thu, 12 Dec 2019 01:48:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id z90so494947ilc.8 for ; Wed, 11 Dec 2019 16:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oEuh2ZUwLBV0aK/eY7SYW9857O2WsfMd7mxJqXypKXo=; b=VDtwZYTFVM3d/hUU9YGTALtOqHZp1C8kPftOqtlQMJj8CCAt3yl2slrISEUdieSL9X Aw7lvfo1jgIHOhNhapAHwUPw5rS9NaLBgQfzLQiYRijJUTH+ctxOcG5PCg4cL57pNqOX ONP3HFCA1gcchaCFFRwfL7qoyBuhk4vdv9LN0= 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=oEuh2ZUwLBV0aK/eY7SYW9857O2WsfMd7mxJqXypKXo=; b=g6XkIPCmWaSZ2MQm/HB1iwnljp2Y+vNPDaFEPYif5pCJxlk9ARqIqqn65Wn3rXcR+8 JF3bG0mz6UV3/noiFD5BAUoMWsSBEDJNqvLVj+yeY83jisyofDi8/EhenTJgaIC8DtXi Ew3Rmn0vZehYRoIrRfM8zPUBbql6YrfuHlPLkCzpKJa/tZ2IFb3k0q9fGcFA7Xt+puZ6 zMk+VPVc8+MdfYHQ/P2yey3IjGBCULJyP40eqYOFwwKd8yCSkKOhVq3FFrCSZkXWEPYp XvnW1cA6ZglHCMkGXRWK/KElM328ypWQeMQiGUC9q7GB1QEoexaUuKbRSsqCvgTaWD1x aeVg== X-Gm-Message-State: APjAAAU7EX6ewLEryz5KVuP5Znpy23UBXRZVm6o4MfgCTPpGCtkBq36v 3Gwp62Vq3NdF/oCPvRhfza8EY16UBsw= X-Google-Smtp-Source: APXvYqyhCDs3PVyBtwtUUS5fTVHTtGyIg2nq7MPDbAUtw5RvRoLLnJjXEwEYtoAiEQYr/KqPsXgluA== X-Received: by 2002:a92:de05:: with SMTP id x5mr5829305ilm.74.1576111685188; Wed, 11 Dec 2019 16:48:05 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:04 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 03/35] common: Move flash_perror() to flash.h Date: Wed, 11 Dec 2019 17:47:22 -0700 Message-Id: <20191211174637.3.I377ed1e8d4d604c1333d0d3534f4cc380b76b731@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Boris Brezillon , Joe Hershberger , Miquel Raynal Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function belongs more in flash.h than common.h so move it. Also remove the space before the bracket in some calls. Signed-off-by: Simon Glass --- cmd/load.c | 3 ++- cmd/mem.c | 3 ++- common/flash.c | 2 +- env/flash.c | 1 + include/common.h | 3 --- include/flash.h | 7 +++++++ net/nfs.c | 1 + 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cmd/load.c b/cmd/load.c index 3bfc1b41ec..68ff3010b4 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -980,7 +981,7 @@ static ulong load_serial_ymodem(ulong offset, int mode) rc = flash_write((char *) ymodemBuf, store_addr, res); if (rc != 0) { - flash_perror (rc); + flash_perror(rc); return (~0); } } else diff --git a/cmd/mem.c b/cmd/mem.c index 4ec450b050..4de5ab01fd 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -339,7 +340,7 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) rc = flash_write((char *)src, (ulong)dst, count * size); if (rc != 0) { - flash_perror (rc); + flash_perror(rc); unmap_sysmem(src); unmap_sysmem(dst); return (1); diff --git a/common/flash.c b/common/flash.c index efe8f53de6..5f155aefd1 100644 --- a/common/flash.c +++ b/common/flash.c @@ -179,7 +179,7 @@ flash_write (char *src, ulong addr, ulong cnt) /*----------------------------------------------------------------------- */ -void flash_perror (int err) +void flash_perror(int err) { switch (err) { case ERR_OK: diff --git a/env/flash.c b/env/flash.c index b487e6701e..e05f7ef74b 100644 --- a/env/flash.c +++ b/env/flash.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index f1a3d32547..b5fccdbcff 100644 --- a/include/common.h +++ b/include/common.h @@ -79,9 +79,6 @@ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ */ int arch_fixup_fdt(void *blob); -/* common/flash.c */ -void flash_perror (int); - /* common/cmd_source.c */ int source (ulong addr, const char *fit_uname); diff --git a/include/flash.h b/include/flash.h index 807800b524..2655c72087 100644 --- a/include/flash.h +++ b/include/flash.h @@ -117,6 +117,13 @@ extern int jedec_flash_match(flash_info_t *info, ulong base); #define CFI_CMDSET_AMD_LEGACY 0xFFF0 #endif +/** + * flash_perror() - Print a flash error + * + * @err: Error number of message to print (ERR_... as below) + */ +void flash_perror(int err); + /*----------------------------------------------------------------------- * return codes from flash_write(): */ diff --git a/net/nfs.c b/net/nfs.c index 97e62f1dce..f4101eb17c 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include From patchwork Thu Dec 12 00:47:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208041 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HpFRT8q9"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFXl5bvxz9sR7 for ; Thu, 12 Dec 2019 11:48:39 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A993B814D9; Thu, 12 Dec 2019 01:48:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HpFRT8q9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 597C7814AD; Thu, 12 Dec 2019 01:48:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 497068149B for ; Thu, 12 Dec 2019 01:48:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id b10so54972iof.11 for ; Wed, 11 Dec 2019 16:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EDGkJSvPtrnYXX2s8L/E68IZkZtsFGzyJM3Xv5UajG8=; b=HpFRT8q9RcT0lolZlwQgq2k9rugd6+uVBEeuT7VGQkpWB2Yv1I/Y5RYdOwOfuV8vS9 XxJABN/c03gcUtIbsCXdyRFpLcXKOglCeBsAECYZxYSKwF5RZH/Ysb7R05aE3g/Cdket VkUfh8PbOdkes87bmShYWtzrL+dMS8HHPwBYM= 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=EDGkJSvPtrnYXX2s8L/E68IZkZtsFGzyJM3Xv5UajG8=; b=KLV/JpcKb2z3tsvmI60kyNyu0R/hbupw0X/Wv/99k18lP/GD5D5eaUhdmsNjtujoQF EZaf7p10BZabBFT9haHvmrTM/TAVCnIeQfYLLOzAZdmecXGFj+TEmslV/s1ksFBB20wF tC9rafubuuFlH5Y4MyesOD40HKl8tgDn05y9KBW5b+EXUwkj1GpnryPYjEI7TRfcz3A/ fQRpqf9yTrvaJ+fbeeRTuN3DnhkcjUpwnXt0q6K9/Bz0I/u3hReG4PMxqJjiAQ1TS2/H GRgdlzDOfHr3HAoH65KvE3Q071l3V7wZXhegNl70sBT1zQpo5L6DJzpv7nrbidMTYY2s pMAw== X-Gm-Message-State: APjAAAWsmcBgLe9DhG6zcCxfvM2r9SCsdL8utQqvKopmk0Bz39c3tf2G MmKY+Wju4MjoLOW2aNC3YsxYQgo16SA= X-Google-Smtp-Source: APXvYqx1RKhtITn+8092LIY7Q7cKcogXB909+3fCjRCH/QqIeRgL5QwZGD2+hkMbjYgn710S2N45hA== X-Received: by 2002:a02:aa11:: with SMTP id r17mr5809126jam.88.1576111686983; Wed, 11 Dec 2019 16:48:06 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:06 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 04/35] common: Drop checkflash() and checkdram() Date: Wed, 11 Dec 2019 17:47:23 -0700 Message-Id: <20191212004755.11091-4-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These functions are not used in U-Boot. Drop them. 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 b5fccdbcff..4f3536f299 100644 --- a/include/common.h +++ b/include/common.h @@ -64,8 +64,6 @@ void hang (void) __attribute__ ((noreturn)); #include -int checkflash(void); -int checkdram(void); extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ From patchwork Thu Dec 12 00:47:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208042 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BxqzY2RW"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFXy37L7z9sRf for ; Thu, 12 Dec 2019 11:48:50 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ED2D6814ED; Thu, 12 Dec 2019 01:48:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BxqzY2RW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 23DC7814AD; Thu, 12 Dec 2019 01:48:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DCC30814AC for ; Thu, 12 Dec 2019 01:48:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id x1so833634iop.7 for ; Wed, 11 Dec 2019 16:48:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=didJYPvAFTznMlgIFy9lpciFOCEqeeh9sMqLJ6HwM9A=; b=BxqzY2RWI5GgqdJ+bzKi8y4oll42ruaazmNV4gp80jfbc0nYNcUs9lu0yIOidgM4m+ AMwqL9zIISs2I0Wo31AWq3NLkvbarvRTdx5uSlDqA2HgyJdAJwY03L+tGKJSe6gJvd2N ZfRtIDQHApOfh710aDfBjp9zz6130NZIPd5Zs= 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=didJYPvAFTznMlgIFy9lpciFOCEqeeh9sMqLJ6HwM9A=; b=RK8fexuzQ5K8my6zrxniqNDjoOHtYXT0WVXU1zWS6nzdrnDx57kJE26z/sPdL61VLB aiLiLzMQ3o9Sd7MVgm1/1D7ZwxFWllsJuVHiPxs3h34p/voptYmyF8uHNc18RPHZVD8O yN4xYq4fwN+6PCdpZJtP/3PhWvBFjgrIgQnnTJl/55Q5GT0/GkJ/ExBMagYc1I5hwBrq gI4Hybmu78aNo3zlj2qUUOkERFHFg7ziY2OBazGLP/RfUKWr4vEMILbvXxQKio+80hgX kwnICGGlh4Pogssw++u5k4iHg0DQb3fStaN6bOgMF/riVQAXtqQP2XQzimyIAHAi1YMS 9hYA== X-Gm-Message-State: APjAAAUWt25vIo2VWeZkfkTjN2d/UqsErOZgCYG3RCcOIg62zloDsPAM NmST0uOC3vom/fsL2pknY4JJLdGgs5Y= X-Google-Smtp-Source: APXvYqy9mt4tmoJ81Ycm80dSflveqv1Ijd4nu23SZDMG2/t0oL2YLFM5jYrNV0u2CWMo7hrnNIPa5w== X-Received: by 2002:a6b:3b54:: with SMTP id i81mr905615ioa.249.1576111688641; Wed, 11 Dec 2019 16:48:08 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:08 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 05/35] common: Move embedded fdt location to fdtdec.h Date: Wed, 11 Dec 2019 17:47:24 -0700 Message-Id: <20191212004755.11091-5-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These declarations are only used in fdtdec.c so move them to its header file. Signed-off-by: Simon Glass --- include/common.h | 3 --- include/fdtdec.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/common.h b/include/common.h index 4f3536f299..fe10f06819 100644 --- a/include/common.h +++ b/include/common.h @@ -64,9 +64,6 @@ void hang (void) __attribute__ ((noreturn)); #include -extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ -extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ - /** * arch_fixup_fdt() - Write arch-specific information to fdt * diff --git a/include/fdtdec.h b/include/fdtdec.h index 696e0fd024..c8a143db5f 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -111,6 +111,9 @@ struct fdt_pci_addr { u32 phys_lo; }; +extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ +extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ + /** * Compute the size of a resource. * From patchwork Thu Dec 12 00:47:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208043 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MPTccGZq"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFYB1M5zz9sRm for ; Thu, 12 Dec 2019 11:49:01 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0ED23814EE; Thu, 12 Dec 2019 01:48:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MPTccGZq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 67DAE814D5; Thu, 12 Dec 2019 01:48:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B4C5B814BC for ; Thu, 12 Dec 2019 01:48:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id v3so849104ioj.5 for ; Wed, 11 Dec 2019 16:48:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7jOYaXiOJtoIUk/aMRgYYZBeaGoNxr+e2jPK8nVuifk=; b=MPTccGZq4pf0A8M+sgqJn4uuLqPLxfuf6neHi365SQFvfXb7qUAZzwo19XBse6K08w kRZDDM5uLxyQwWBHvuz+hkCiallSFzefVf3eBuwGqN/EJlgMU557kN17ZyPeNB6f3VAB f56no5U+8govHzyaV+c2gGui2ES3QJMkIujqI= 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=7jOYaXiOJtoIUk/aMRgYYZBeaGoNxr+e2jPK8nVuifk=; b=F5sODKGET19d+xkXnjOu2cIFuWBRzLs1W5DDKW6o7EGkuss0Qy1PrhC0hp275m/w4n QeC7P5OFFT5ahqhUMxqqyX2TwGwawjAyg8WUhEFwP+dxOI0En3YyqjjZ6KkYLrJXKjjO 701ql6+GagmvqRq5fcNn8njOchTv2IZfHks6P5Py/xXPfCFWGHnH6GrtWx+YTZy7jBtN 595mImZ4NuvvaJZf8bcn5WIyIeTqr9KvQYYcX+3siK8ahpZt3nzFvXsJbES0FrIcUe3t LvOdKqYPNFV2FgTcrsf9p0MIYmt+pW/tEvwfZEVbYsCdmUPk7RE6GRrC+D7EcnWTkMs9 no+Q== X-Gm-Message-State: APjAAAVHGMhHfR+pEmReNeHiBFadcz306CPpZluLn+ZZGTj8A+aUmADG y+t9W0/8dRGGga1MClAl9zPFxnsn30M= X-Google-Smtp-Source: APXvYqzh21ZPwwEUNHtJMK+l8O0IlWSaUs3x+n5SVYf8xv+cO7mus3qrr+eUh2Pptke/nJtdpvjWKA== X-Received: by 2002:a5e:9e43:: with SMTP id j3mr910250ioq.183.1576111690351; Wed, 11 Dec 2019 16:48:10 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:10 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 06/35] common: Move do_tftpb() to net.h Date: Wed, 11 Dec 2019 17:47:25 -0700 Message-Id: <20191212004755.11091-6-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Boris Brezillon , Joe Hershberger , Abhishek Shah Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function belongs in the network header file. Move it. Signed-off-by: Simon Glass --- cmd/pxe.c | 1 + include/common.h | 3 --- include/net.h | 11 +++++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmd/pxe.c b/cmd/pxe.c index 73f1b4fbd3..194a366aa1 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -6,6 +6,7 @@ #include #include +#include #include "pxe_utils.h" diff --git a/include/common.h b/include/common.h index fe10f06819..dbd7845a63 100644 --- a/include/common.h +++ b/include/common.h @@ -81,9 +81,6 @@ extern ulong load_addr; /* Default Load Address */ extern ulong save_addr; /* Default Save Address */ extern ulong save_size; /* Default Save Size */ -/* common/cmd_net.c */ -int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - /* common/cmd_fat.c */ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); diff --git a/include/net.h b/include/net.h index 834f244982..a8ee08150f 100644 --- a/include/net.h +++ b/include/net.h @@ -50,6 +50,17 @@ struct in_addr { __be32 s_addr; }; +/** + * do_tftpb - Run the tftpboot command + * + * @cmdtp: Command information for tftpboot + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + /** * An incoming packet handler. * @param pkt pointer to the application packet From patchwork Thu Dec 12 00:47:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208045 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FNDlG0NQ"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFYN6r4Xz9sR7 for ; Thu, 12 Dec 2019 11:49:12 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B1ECB814F9; Thu, 12 Dec 2019 01:48:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FNDlG0NQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06058814DA; Thu, 12 Dec 2019 01:48:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DDA6B81498 for ; Thu, 12 Dec 2019 01:48:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id a22so865201ios.3 for ; Wed, 11 Dec 2019 16:48:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JVUDDb2yMiY/mKE+nHBDVAZb/aceo+JRnrJWYAbVuCc=; b=FNDlG0NQ6odBTL+RuEPfzHx7IZuxu3kS0icIJxT5DvWXJdzK1VV7GUCCXK9v0VF3sP 06QfM3ZagLy8z3mRXmbcxQ3c4PFSIKQ0OGVBak+cJDcYvfi/ypt35x7yn2jAkouTkwiT jZLDmNUjB9/MKu3yX+AFMcIMRUWtcbzMe9/CI= 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=JVUDDb2yMiY/mKE+nHBDVAZb/aceo+JRnrJWYAbVuCc=; b=C0Hf/4hm6VcBgkh7heMpS0evKaLq4rrZqzLn2k7QrnjhlYnFOWanub08jDw50HbXgU 0fQu8D2f0cyC1rdnM7Az448DeOXYs1WwOKmwk5p1yVzVvEcCgFzJUBS4E826zX+EMrt/ dApmrtGcgqCxOfI0lYhubWnZkAec6sSQdgx5fE3qfl/KpP5ybPZEroZ6irNCT3rf1yrE dmD/N196E5ZQdYhk6xtdYEtwp6h2BRSKBtVzc+Dqev4ahtV7vd+XNLP51QMvvdtz9Px/ MYG/PPVisMzu7QXMtBt4kPd7+q8jBWjfGRAP/nbSh64euVZfA2+vignycZpIS3eKDvy4 BVlg== X-Gm-Message-State: APjAAAWnAZ+Hk737FzLSxZAcR4LeSc/N6QnLLB009iTEX1oCBSuiC7/n NJN34naZzf9jGR+n81BJfZknNn94Vfo= X-Google-Smtp-Source: APXvYqzYCGKbDOohJtalooCTRm7NUL7+KPkL2s5cTo//W2rPO0htIg03peMJNIi+dqhHM7Qwv/6V/w== X-Received: by 2002:a5d:848c:: with SMTP id t12mr1045035iom.176.1576111694588; Wed, 11 Dec 2019 16:48:14 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:14 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 07/35] common: Move functions for loading from fat/ext2 to fs.h Date: Wed, 11 Dec 2019 17:47:26 -0700 Message-Id: <20191211174637.7.I54725907dac44a8fc71676cf9ae42422470b30ec@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Andrej Rosano , Heinrich Schuchardt , Boris Brezillon , Joe Hershberger , Abhishek Shah Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These are filesystem functions and belong in the filesystem header file. Move them. Signed-off-by: Simon Glass --- board/inversepath/usbarmory/usbarmory.c | 1 + cmd/fat.c | 2 +- cmd/pxe.c | 1 + include/common.h | 6 ------ include/fs.h | 22 ++++++++++++++++++++++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index 19510184d8..e9eea40e45 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/cmd/fat.c b/cmd/fat.c index 4b9a7eaab0..50df127f6d 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -31,7 +31,7 @@ U_BOOT_CMD( " and determine its size." ); -int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return do_load(cmdtp, flag, argc, argv, FS_TYPE_FAT); } diff --git a/cmd/pxe.c b/cmd/pxe.c index 194a366aa1..bce6728875 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "pxe_utils.h" diff --git a/include/common.h b/include/common.h index dbd7845a63..e5de74af33 100644 --- a/include/common.h +++ b/include/common.h @@ -81,12 +81,6 @@ extern ulong load_addr; /* Default Load Address */ extern ulong save_addr; /* Default Save Address */ extern ulong save_size; /* Default Save Size */ -/* common/cmd_fat.c */ -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 []); - /* common/exports.c */ void jumptable_init(void); diff --git a/include/fs.h b/include/fs.h index 742a535b5f..37e35c2120 100644 --- a/include/fs.h +++ b/include/fs.h @@ -14,6 +14,28 @@ #define FS_TYPE_UBIFS 4 #define FS_TYPE_BTRFS 5 +/** + * do_fat_fsload - Run the fatload command + * + * @cmdtp: Command information for fatload + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + +/** + * do_ext2load - Run the ext2load command + * + * @cmdtp: Command information for ext2load + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + /* * Tell the fs layer which block device an partition to use for future * commands. This also internally identifies the filesystem that is present From patchwork Thu Dec 12 00:47:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208128 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKtp5Sn9z9sPf for ; Thu, 12 Dec 2019 15:04:27 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 98B3E81498; Thu, 12 Dec 2019 05:04:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GoK0H8VD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B874C814F8; Thu, 12 Dec 2019 01:48:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E631D814DA for ; Thu, 12 Dec 2019 01:48:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd43.google.com with SMTP id z193so876175iof.1 for ; Wed, 11 Dec 2019 16:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0GyUaEuXgz5vRLMB2a+fsfizpeYfViaYBpxY4N4RYvY=; b=GoK0H8VD5CntJdtFtYgR1DLm2/OurcsX7h/ujj3peWFkh1nATbO790aTjqwE2FuhNy Ip2igFBpfafsNiIMAaml4pQ3+HI/bbK8BVQPlPeu/mI5wWeTF3L2VCrk0o/7kXP3WwRx JuvYCFOJNErsRt+Qm75zGJ1tbARB7KriUYxXs= 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=0GyUaEuXgz5vRLMB2a+fsfizpeYfViaYBpxY4N4RYvY=; b=eAxc4vEo7HZpSNeO6KY3w76xxyb6exB4TYt/4P5ce6LpyT5RG6GGxhr7++lVs2RCg1 MCuUVCiQz8TpopCYSArnwiRPez0l36S6vddDcn3cWtOGq+D29zaQfh2jwLcxhImLh1F0 F1SE2im4C9WfhSdQcMVa5kh6CHzFInIU3b9IW1B59a0YFfNexM7fMBSDcllne4vRayhg kQtX3vpEf8wzd6CuN0/07M++H8I/rJ2mm2Ydczxkj+Hw8ikqdz0NMqKK4RcnokNFzMLP rdSdMzEhKyTCKIkdo8ZihTZwKVtMyTEyfWfINrzbWETmJI1Dn+PQ7xA/6C9g28EhsKOw THTQ== X-Gm-Message-State: APjAAAXGOgRRad2Kwb+5h+tzqTqCQt2YT4WhXzIarksIe1mRQ9vQLN7L WgTyxCdrFXaNGJFF0rPK1C6Ek20p8S4= X-Google-Smtp-Source: APXvYqw/hbNdo8C5SHQ0l4lvsFNbSSSz9dz/XPVJ+K3KjIfzUU5GatzQcQdshC/NlW5xdzZuM0r3RQ== X-Received: by 2002:a6b:fc0b:: with SMTP id r11mr942865ioh.251.1576111696718; Wed, 11 Dec 2019 16:48:16 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 08/35] common: Move relocate_code() to init.h Date: Wed, 11 Dec 2019 17:47:27 -0700 Message-Id: <20191211174637.8.Ia1254c208d18fe2e6e740eb8429e5943891cbfe7@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Roese , Marek Vasut , Tom Rini , Angelo Dureghello , Alexey Brodkin , Marcus Comstedt , Nobuhiro Iwamatsu , Udit Kumar , Huan Wang , Timur Tabi , Boris Brezillon , Oleksandr Zhadan and Michael Durrant , Christophe Leroy , Joe Hershberger , Naveen Burmi , Ibai Erkiaga , Po Liu Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This is an init function so move it out of the common header. Avoid using the typedef so that we don't have to include the global_data header file. Also tidy up the function style in comments while we are here. Signed-off-by: Simon Glass --- arch/arm/lib/relocate_64.S | 2 +- arch/m68k/cpu/mcf5227x/start.S | 2 +- arch/m68k/cpu/mcf523x/start.S | 2 +- arch/m68k/cpu/mcf52x2/start.S | 2 +- arch/m68k/cpu/mcf530x/start.S | 2 +- arch/m68k/cpu/mcf532x/start.S | 2 +- arch/m68k/cpu/mcf5445x/start.S | 2 +- arch/m68k/cpu/mcf547x_8x/start.S | 2 +- arch/mips/lib/reloc.c | 1 + arch/nds32/cpu/n1213/start.S | 2 +- arch/nios2/cpu/start.S | 2 +- arch/powerpc/cpu/mpc83xx/start.S | 2 +- arch/powerpc/cpu/mpc85xx/start.S | 2 +- arch/powerpc/cpu/mpc86xx/start.S | 2 +- arch/powerpc/cpu/mpc8xx/start.S | 2 +- arch/riscv/cpu/start.S | 2 +- arch/sh/lib/board.c | 1 + arch/xtensa/cpu/start.S | 2 +- board/Arcturus/ucp1020/spl.c | 1 + board/Arcturus/ucp1020/spl_minimal.c | 1 + board/freescale/b4860qds/spl.c | 1 + board/freescale/bsc9131rdb/spl_minimal.c | 1 + board/freescale/bsc9132qds/spl_minimal.c | 1 + board/freescale/c29xpcie/spl.c | 1 + board/freescale/c29xpcie/spl_minimal.c | 1 + board/freescale/p1010rdb/spl.c | 1 + board/freescale/p1010rdb/spl_minimal.c | 1 + board/freescale/p1022ds/spl.c | 1 + board/freescale/p1022ds/spl_minimal.c | 1 + board/freescale/p1_p2_rdb_pc/spl.c | 1 + board/freescale/p1_p2_rdb_pc/spl_minimal.c | 1 + board/freescale/t102xqds/spl.c | 1 + board/freescale/t102xrdb/spl.c | 1 + board/freescale/t104xrdb/spl.c | 1 + board/freescale/t208xqds/spl.c | 1 + board/freescale/t208xrdb/spl.c | 1 + board/freescale/t4qds/spl.c | 1 + board/freescale/t4rdb/spl.c | 1 + include/common.h | 6 ------ include/init.h | 10 ++++++++++ 40 files changed, 48 insertions(+), 22 deletions(-) diff --git a/arch/arm/lib/relocate_64.S b/arch/arm/lib/relocate_64.S index 26d29c5324..72e91f2704 100644 --- a/arch/arm/lib/relocate_64.S +++ b/arch/arm/lib/relocate_64.S @@ -14,7 +14,7 @@ #include /* - * void relocate_code (addr_moni) + * void relocate_code(addr_moni) * * This function relocates the monitor code. * x0 holds the destination address. diff --git a/arch/m68k/cpu/mcf5227x/start.S b/arch/m68k/cpu/mcf5227x/start.S index 61f9c6859c..86c93ba3fa 100644 --- a/arch/m68k/cpu/mcf5227x/start.S +++ b/arch/m68k/cpu/mcf5227x/start.S @@ -386,7 +386,7 @@ _start: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S index f57baa58f5..8c5a164955 100644 --- a/arch/m68k/cpu/mcf523x/start.S +++ b/arch/m68k/cpu/mcf523x/start.S @@ -150,7 +150,7 @@ _start: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S index f7f124dd2f..747a518f6c 100644 --- a/arch/m68k/cpu/mcf52x2/start.S +++ b/arch/m68k/cpu/mcf52x2/start.S @@ -229,7 +229,7 @@ _after_flashbar_copy: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/m68k/cpu/mcf530x/start.S b/arch/m68k/cpu/mcf530x/start.S index eb4b33899f..32356d875e 100644 --- a/arch/m68k/cpu/mcf530x/start.S +++ b/arch/m68k/cpu/mcf530x/start.S @@ -155,7 +155,7 @@ _start: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S index 4411e5fe28..e2d7c72cee 100644 --- a/arch/m68k/cpu/mcf532x/start.S +++ b/arch/m68k/cpu/mcf532x/start.S @@ -165,7 +165,7 @@ _start: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S index db30b26c34..80eb287151 100644 --- a/arch/m68k/cpu/mcf5445x/start.S +++ b/arch/m68k/cpu/mcf5445x/start.S @@ -514,7 +514,7 @@ _start: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/m68k/cpu/mcf547x_8x/start.S b/arch/m68k/cpu/mcf547x_8x/start.S index 4dd57bf39c..b70842b2b8 100644 --- a/arch/m68k/cpu/mcf547x_8x/start.S +++ b/arch/m68k/cpu/mcf547x_8x/start.S @@ -155,7 +155,7 @@ _start: /******************************************************************************/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c index e68f49467c..1e3cfadd2d 100644 --- a/arch/mips/lib/reloc.c +++ b/arch/mips/lib/reloc.c @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S index 691888157f..386c1998dc 100644 --- a/arch/nds32/cpu/n1213/start.S +++ b/arch/nds32/cpu/n1213/start.S @@ -223,7 +223,7 @@ call_board_init_f: j board_init_f ! jump to board_init_f() in lib/board.c /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S index 2900200dbb..f5ad184e8d 100644 --- a/arch/nios2/cpu/start.S +++ b/arch/nios2/cpu/start.S @@ -147,7 +147,7 @@ _reloc: * We'll call the board_init_r from here since this isn't * supposed to return. * - * void relocate_code (ulong sp, gd_t *global_data, + * void relocate_code(ulong sp, gd_t *global_data, * ulong reloc_addr) * __attribute__ ((noreturn)); */ diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S index f4a8a766c3..9da22ce486 100644 --- a/arch/powerpc/cpu/mpc83xx/start.S +++ b/arch/powerpc/cpu/mpc83xx/start.S @@ -804,7 +804,7 @@ flush_dcache: /*-------------------------------------------------------------------*/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index 38e907f5ad..dd784e7e30 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -1549,7 +1549,7 @@ write_tlb: blr /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/powerpc/cpu/mpc86xx/start.S b/arch/powerpc/cpu/mpc86xx/start.S index 59213c2dfe..f4651ce8d4 100644 --- a/arch/powerpc/cpu/mpc86xx/start.S +++ b/arch/powerpc/cpu/mpc86xx/start.S @@ -636,7 +636,7 @@ in32r: blr /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S index b8bdaaec2f..ed735cdee0 100644 --- a/arch/powerpc/cpu/mpc8xx/start.S +++ b/arch/powerpc/cpu/mpc8xx/start.S @@ -322,7 +322,7 @@ int_return: /*------------------------------------------------------------------------------*/ /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 1a55b7d570..f3dccdbe4c 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -217,7 +217,7 @@ spl_call_board_init_r: #endif /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c index 533fcf8906..a6a8f07e6f 100644 --- a/arch/sh/lib/board.c +++ b/arch/sh/lib/board.c @@ -4,6 +4,7 @@ */ #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/xtensa/cpu/start.S b/arch/xtensa/cpu/start.S index 38d2fa2fe1..580df65ea7 100644 --- a/arch/xtensa/cpu/start.S +++ b/arch/xtensa/cpu/start.S @@ -273,7 +273,7 @@ _start: ill /* - * void relocate_code (addr_sp, gd, addr_moni) + * void relocate_code(addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 9314fabdf2..ca02e9eb1b 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/spl_minimal.c b/board/Arcturus/ucp1020/spl_minimal.c index 1c4134d827..cd0022a73e 100644 --- a/board/Arcturus/ucp1020/spl_minimal.c +++ b/board/Arcturus/ucp1020/spl_minimal.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c index 06ea877504..a16db9d59a 100644 --- a/board/freescale/b4860qds/spl.c +++ b/board/freescale/b4860qds/spl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/bsc9131rdb/spl_minimal.c b/board/freescale/bsc9131rdb/spl_minimal.c index e7ed0a90b8..79df0f3cbd 100644 --- a/board/freescale/bsc9131rdb/spl_minimal.c +++ b/board/freescale/bsc9131rdb/spl_minimal.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/bsc9132qds/spl_minimal.c b/board/freescale/bsc9132qds/spl_minimal.c index 5e1cc1f4a3..dc72b2e2f2 100644 --- a/board/freescale/bsc9132qds/spl_minimal.c +++ b/board/freescale/bsc9132qds/spl_minimal.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c index 9a2385b978..9abbfb5dbc 100644 --- a/board/freescale/c29xpcie/spl.c +++ b/board/freescale/c29xpcie/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/c29xpcie/spl_minimal.c b/board/freescale/c29xpcie/spl_minimal.c index 7452cec8ff..8193afdf6a 100644 --- a/board/freescale/c29xpcie/spl_minimal.c +++ b/board/freescale/c29xpcie/spl_minimal.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index cb489140c0..240194ad80 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1010rdb/spl_minimal.c b/board/freescale/p1010rdb/spl_minimal.c index b9eb4430f1..0bb2c83872 100644 --- a/board/freescale/p1010rdb/spl_minimal.c +++ b/board/freescale/p1010rdb/spl_minimal.c @@ -3,6 +3,7 @@ * Copyright 2011 Freescale Semiconductor, Inc. */ #include +#include #include #include #include diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index 8d2c1388ec..81c5bf00e2 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1022ds/spl_minimal.c b/board/freescale/p1022ds/spl_minimal.c index 9ab4029836..31de26318d 100644 --- a/board/freescale/p1022ds/spl_minimal.c +++ b/board/freescale/p1022ds/spl_minimal.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 908f4bc96f..4ac4756b17 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/spl_minimal.c b/board/freescale/p1_p2_rdb_pc/spl_minimal.c index d8ae1f835c..ced5f3c3b5 100644 --- a/board/freescale/p1_p2_rdb_pc/spl_minimal.c +++ b/board/freescale/p1_p2_rdb_pc/spl_minimal.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c index 7a499a559f..d1dc9f8d63 100644 --- a/board/freescale/t102xqds/spl.c +++ b/board/freescale/t102xqds/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index c579be1cb2..0936f28220 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index 2d1342fb99..a1c8a47014 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index f0499ad7e5..fa843ef212 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index d7ca0dd6db..f4d68b6706 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c index df81205e88..4cf7c09943 100644 --- a/board/freescale/t4qds/spl.c +++ b/board/freescale/t4qds/spl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index ec3978a70a..28b78f3232 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index e5de74af33..90391d262e 100644 --- a/include/common.h +++ b/include/common.h @@ -103,12 +103,6 @@ void fdc_hw_init (void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -#if defined(CONFIG_ARM) -void relocate_code(ulong); -#else -void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); -#endif - void s_init(void); void upmconfig (unsigned int, unsigned int *, unsigned int); diff --git a/include/init.h b/include/init.h index 105afc6c3c..3adc382376 100644 --- a/include/init.h +++ b/include/init.h @@ -12,6 +12,8 @@ #include +struct global_data; + #ifndef __ASSEMBLY__ /* put C only stuff in this section */ /* @@ -217,6 +219,14 @@ void trap_init(unsigned long reloc_addr); */ void main_loop(void); +#if defined(CONFIG_ARM) +void relocate_code(ulong addr_moni); +#else +void relocate_code(ulong start_addr_sp, struct global_data *new_gd, + ulong relocaddr) + __attribute__ ((noreturn)); +#endif + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ From patchwork Thu Dec 12 00:47:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208046 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SQEyMo9c"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFYc6gp4z9sR7 for ; Thu, 12 Dec 2019 11:49:24 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6382D81675; Thu, 12 Dec 2019 01:48:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SQEyMo9c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65AC6814DE; Thu, 12 Dec 2019 01:48:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6EE54814E2 for ; Thu, 12 Dec 2019 01:48:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id b15so501006ila.7 for ; Wed, 11 Dec 2019 16:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aXa2eRbgp7dNxAwDwQ5ThJy4OW8Wg6B3d63oe9pW8Bo=; b=SQEyMo9csEUQMQ6dg9srgmCUKmlqC9/WUFsK4HlrnI3q6iltLHMp5bzL9cAhT87nTl /PwK5BBkxxHdDPTCVTJ+rK/DNZyfpsNhdYI6RN07A7yGsc1dYm1akqYqjV28QhIrD5pn XAwEITcOKknL2d0NrBYt0Ca0pKVrKkNxkZB6E= 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=aXa2eRbgp7dNxAwDwQ5ThJy4OW8Wg6B3d63oe9pW8Bo=; b=W3JOiWvo56OXWytzq/crNT9nEqyOSgbeslaA0oMr5u4ZjVPRcnCZ39CklvUOU1SNpG LawiU+e4atyk3V314+f8oi5TRfTNt7acf/KsdtlRu0K6Cyk+ScJg5jqWWn6pIuVvUghw /Ad7IgVJfAcfZgKwnfwWRUr3J4dmzX1DbhfCS24bnNpaLbxdxZF86Xe1aat6StfzjjRP NhQBdAU/t1OwUoB0xK9TXpN40ZYHOqJUyys9qGUx68bxO5E2rGTdDGfO/dY7ia8PveWb b0qGTTvNWOZFSZ9K6gNV3dM/U/x/uFrpGMq2BYyz2bva+eCQxdgQOqrEfQEIUeKwQWdx Er/Q== X-Gm-Message-State: APjAAAWUVj33Fk+ADS3/DAHf0xdcarMIujysYbf9wbxZVFjHMxh//NXT eUUvtQd4LCXNZn2rigxShTCWQxGv1kc= X-Google-Smtp-Source: APXvYqzyG9fNUcqh4/XOljDLT61ITUlCsBWWRuDqlI2uLNJoe+h7Re6FjVwHa9LttFv00JP5MdCJXw== X-Received: by 2002:a92:9a56:: with SMTP id t83mr6087259ili.200.1576111698978; Wed, 11 Dec 2019 16:48:18 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:18 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 09/35] common: Move jumptable_init() out of common.h Date: Wed, 11 Dec 2019 17:47:28 -0700 Message-Id: <20191211174637.9.I31c2a08e96eb127d8205900e76038d1160837a0f@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Stefan Roese , Stephen Warren , Bartosz Golaszewski , Joe Hershberger , Heinrich Schuchardt , Boris Brezillon , Alexander Graf Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function is defined in exports.c so move it to its header file. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- common/board_r.c | 1 + include/common.h | 3 --- include/exports.h | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index cda90bd385..4910a5da34 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include /* TODO: can we just include all these headers whether needed or not? */ diff --git a/include/common.h b/include/common.h index 90391d262e..71bf39180c 100644 --- a/include/common.h +++ b/include/common.h @@ -81,9 +81,6 @@ extern ulong load_addr; /* Default Load Address */ extern ulong save_addr; /* Default Save Address */ extern ulong save_size; /* Default Save Size */ -/* common/exports.c */ -void jumptable_init(void); - /* common/kallsysm.c */ const char *symbol_lookup(unsigned long addr, unsigned long *caddr); diff --git a/include/exports.h b/include/exports.h index 35f463287f..cbd16fc518 100644 --- a/include/exports.h +++ b/include/exports.h @@ -13,6 +13,9 @@ struct spi_slave; +/* Set up the jump table for use by the API */ +void jumptable_init(void); + /* These are declarations of exported functions available in C code */ unsigned long get_version(void); int getc(void); From patchwork Thu Dec 12 00:47:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208129 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oW9CBayg"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKtz3WWvz9sP6 for ; Thu, 12 Dec 2019 15:04:43 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D0499814DE; Thu, 12 Dec 2019 05:04:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oW9CBayg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B8D181656; Thu, 12 Dec 2019 01:48:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0F01081498 for ; Thu, 12 Dec 2019 01:48:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id i11so800228ioi.12 for ; Wed, 11 Dec 2019 16:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=26WvBFHcm+BuTMB9ITYJ/Dd3j1T8uw2VPl6dF8IoLI8=; b=oW9CBaygD8fdLgWr5FDUe70Bg6bnJhJtazpkR8RTaNM1hFNcrjMNK66DhcntOLa3Qo 1IPbbCspc8aMArqqOO5tOoDyS1eW+WxcdZkhgKKbuJiShCiaeCj31ivS65V7kJfofb6W h64wQBcUYzfCLJDgGDXKn0QSocRmHE/PqYIrg= 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=26WvBFHcm+BuTMB9ITYJ/Dd3j1T8uw2VPl6dF8IoLI8=; b=jtUwpdMZ7dcst7jnnHZYYGRtGlNhkHqaPoBdhhhM7a77atqipG92mPH7evkEkoD/75 a8j3zAyBc1WNCYh3bLncSKZqmLXDAC9VZ+HOh/0NkO75pfDnVP1w8FIs0b1TzR4Mrx4b 1dF6LGZE9wDnfxsxo48eklnFdSe5tW4FPOUWfiw+FYnWVLktdCh60Jtycyqf+kyIhRYF GUjmL++oOHPovFqNwQf73xmxm8qqU+1nvc7zYSYcgrLu6d35nodcZX6CTuXupjUVAaPH TRgpTXbE9OwLfc1qCcOGVf2hQOHdFmjmqgMSp8eXTKjbLB+CI9v5uaqN8815KnSdvOm2 OtRg== X-Gm-Message-State: APjAAAXhSX443v1Z6lhmz575JhnL1xr9yrP6Ucjdh1efzPHG3KkkVJ/D w04qtxdhPuZl6M3ZCKEf7XUrUcKQalA= X-Google-Smtp-Source: APXvYqyhMq3XouJACZEDaaXwbsBmF1n3MydwiMguIJcc82S7r1Kmjv5Ew78uAg1hn76hQ/1rw7Ra3Q== X-Received: by 2002:a6b:1455:: with SMTP id 82mr988186iou.200.1576111700980; Wed, 11 Dec 2019 16:48:20 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:20 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 10/35] common: Drop floppy disk support Date: Wed, 11 Dec 2019 17:47:29 -0700 Message-Id: <20191211174637.10.I6c46f2be8e4ff15d1c6f64f38c9a5de60bdd5335@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Finley Xiao , Miquel Raynal , Stefan Roese , Tom Rini , Heinrich Schuchardt , Ramon Fried , Pascal Linder , Boris Brezillon , Tero Kristo Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This seems pretty old now. It has not been converted to driver model and is not used by any boards. Drop it. Signed-off-by: Simon Glass --- README | 26 -- cmd/Kconfig | 5 - cmd/Makefile | 1 - cmd/fdc.c | 752 -------------------------------- drivers/misc/Makefile | 1 - drivers/misc/ns87308.c | 100 ----- drivers/serial/serial_ns16550.c | 7 +- include/common.h | 1 - include/ns87308.h | 233 ---------- scripts/config_whitelist.txt | 34 -- 10 files changed, 1 insertion(+), 1159 deletions(-) delete mode 100644 cmd/fdc.c delete mode 100644 drivers/misc/ns87308.c delete mode 100644 include/ns87308.h diff --git a/README b/README index 91dfb24776..78f59c391a 100644 --- a/README +++ b/README @@ -2870,32 +2870,6 @@ Low Level (hardware related) configuration options: If this macro is defined, then CONFIG_SYS_CCSRBAR_PHYS will be forced to a value that ensures that CCSR is not relocated. -- Floppy Disk Support: - CONFIG_SYS_FDC_DRIVE_NUMBER - - the default drive number (default value 0) - - CONFIG_SYS_ISA_IO_STRIDE - - defines the spacing between FDC chipset registers - (default value 1) - - CONFIG_SYS_ISA_IO_OFFSET - - defines the offset of register from address. It - depends on which part of the data bus is connected to - the FDC chipset. (default value 0) - - If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and - CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their - default value. - - if CONFIG_SYS_FDC_HW_INIT is defined, then the function - fdc_hw_init() is called at the beginning of the FDC - setup. fdc_hw_init() must be provided by the board - source code. It is used to make hardware-dependent - initializations. - - CONFIG_IDE_AHB: Most IDE controllers were designed to be connected with PCI interface. Only few of them were designed for AHB interface. diff --git a/cmd/Kconfig b/cmd/Kconfig index 1e4cf146c5..5f5f10b917 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -842,11 +842,6 @@ config CMD_FASTBOOT See doc/android/fastboot.txt for more information. -config CMD_FDC - bool "fdcboot - Boot from floppy device" - help - The 'fdtboot' command allows booting an image from a floppy disk. - config CMD_FLASH bool "flinfo, erase, protect" default y diff --git a/cmd/Makefile b/cmd/Makefile index 3ac7104546..59997cb5b9 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -58,7 +58,6 @@ obj-$(CONFIG_HUSH_PARSER) += exit.o obj-$(CONFIG_CMD_EXT4) += ext4.o obj-$(CONFIG_CMD_EXT2) += ext2.o obj-$(CONFIG_CMD_FAT) += fat.o -obj-$(CONFIG_CMD_FDC) += fdc.o obj-$(CONFIG_CMD_FDT) += fdt.o obj-$(CONFIG_CMD_FITUPD) += fitupd.o obj-$(CONFIG_CMD_FLASH) += flash.o diff --git a/cmd/fdc.c b/cmd/fdc.c deleted file mode 100644 index 7d4b829637..0000000000 --- a/cmd/fdc.c +++ /dev/null @@ -1,752 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2001 - * Denis Peter, MPL AG, d.peter@mpl.ch. - */ -/* - * Floppy Disk support - */ - -#include -#include -#include -#include -#include - - -#undef FDC_DEBUG - -#ifdef FDC_DEBUG -#define PRINTF(fmt,args...) printf (fmt ,##args) -#else -#define PRINTF(fmt,args...) -#endif - -/*#if defined(CONFIG_CMD_DATE) */ -/*#include */ -/*#endif */ - -typedef struct { - int flags; /* connected drives ect */ - unsigned long blnr; /* Logical block nr */ - uchar drive; /* drive no */ - uchar cmdlen; /* cmd length */ - uchar cmd[16]; /* cmd desc */ - uchar dma; /* if > 0 dma enabled */ - uchar result[11]; /* status information */ - uchar resultlen; /* lenght of result */ -} FDC_COMMAND_STRUCT; - -/* flags: only the lower 8bit used: - * bit 0 if set drive 0 is present - * bit 1 if set drive 1 is present - * bit 2 if set drive 2 is present - * bit 3 if set drive 3 is present - * bit 4 if set disk in drive 0 is inserted - * bit 5 if set disk in drive 1 is inserted - * bit 6 if set disk in drive 2 is inserted - * bit 7 if set disk in drive 4 is inserted - */ - -/* cmd indexes */ -#define COMMAND 0 -#define DRIVE 1 -#define CONFIG0 1 -#define SPEC_HUTSRT 1 -#define TRACK 2 -#define CONFIG1 2 -#define SPEC_HLT 2 -#define HEAD 3 -#define CONFIG2 3 -#define SECTOR 4 -#define SECTOR_SIZE 5 -#define LAST_TRACK 6 -#define GAP 7 -#define DTL 8 -/* result indexes */ -#define STATUS_0 0 -#define STATUS_PCN 1 -#define STATUS_1 1 -#define STATUS_2 2 -#define STATUS_TRACK 3 -#define STATUS_HEAD 4 -#define STATUS_SECT 5 -#define STATUS_SECT_SIZE 6 - - -/* Register addresses */ -#define FDC_BASE 0x3F0 -#define FDC_SRA FDC_BASE + 0 /* Status Register A */ -#define FDC_SRB FDC_BASE + 1 /* Status Register B */ -#define FDC_DOR FDC_BASE + 2 /* Digital Output Register */ -#define FDC_TDR FDC_BASE + 3 /* Tape Drive Register */ -#define FDC_DSR FDC_BASE + 4 /* Data rate Register */ -#define FDC_MSR FDC_BASE + 4 /* Main Status Register */ -#define FDC_FIFO FDC_BASE + 5 /* FIFO */ -#define FDC_DIR FDC_BASE + 6 /* Digital Input Register */ -#define FDC_CCR FDC_BASE + 7 /* Configuration Control */ -/* Commands */ -#define FDC_CMD_SENSE_INT 0x08 -#define FDC_CMD_CONFIGURE 0x13 -#define FDC_CMD_SPECIFY 0x03 -#define FDC_CMD_RECALIBRATE 0x07 -#define FDC_CMD_READ 0x06 -#define FDC_CMD_READ_TRACK 0x02 -#define FDC_CMD_READ_ID 0x0A -#define FDC_CMD_DUMP_REG 0x0E -#define FDC_CMD_SEEK 0x0F - -#define FDC_CMD_SENSE_INT_LEN 0x01 -#define FDC_CMD_CONFIGURE_LEN 0x04 -#define FDC_CMD_SPECIFY_LEN 0x03 -#define FDC_CMD_RECALIBRATE_LEN 0x02 -#define FDC_CMD_READ_LEN 0x09 -#define FDC_CMD_READ_TRACK_LEN 0x09 -#define FDC_CMD_READ_ID_LEN 0x02 -#define FDC_CMD_DUMP_REG_LEN 0x01 -#define FDC_CMD_SEEK_LEN 0x03 - -#define FDC_FIFO_THR 0x0C -#define FDC_FIFO_DIS 0x00 -#define FDC_IMPLIED_SEEK 0x01 -#define FDC_POLL_DIS 0x00 -#define FDC_PRE_TRK 0x00 -#define FDC_CONFIGURE FDC_FIFO_THR | (FDC_POLL_DIS<<4) | (FDC_FIFO_DIS<<5) | (FDC_IMPLIED_SEEK << 6) -#define FDC_MFM_MODE 0x01 /* MFM enable */ -#define FDC_SKIP_MODE 0x00 /* skip enable */ - -#define FDC_TIME_OUT 100000 /* time out */ -#define FDC_RW_RETRIES 3 /* read write retries */ -#define FDC_CAL_RETRIES 3 /* calibration and seek retries */ - - -/* Disk structure */ -typedef struct { - unsigned int size; /* nr of sectors total */ - unsigned int sect; /* sectors per track */ - unsigned int head; /* nr of heads */ - unsigned int track; /* nr of tracks */ - unsigned int stretch; /* !=0 means double track steps */ - unsigned char gap; /* gap1 size */ - unsigned char rate; /* data rate. |= 0x40 for perpendicular */ - unsigned char spec1; /* stepping rate, head unload time */ - unsigned char fmt_gap;/* gap2 size */ - unsigned char hlt; /* head load time */ - unsigned char sect_code;/* Sector Size code */ - const char * name; /* used only for predefined formats */ -} FD_GEO_STRUCT; - - -/* supported Floppy types (currently only one) */ -const static FD_GEO_STRUCT floppy_type[2] = { - { 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,16,2,"H1440" }, /* 7 1.44MB 3.5" */ - { 0, 0,0, 0,0,0x00,0x00,0x00,0x00, 0,0,NULL }, /* end of table */ -}; - -static FDC_COMMAND_STRUCT cmd; /* global command struct */ - -/* If the boot drive number is undefined, we assume it's drive 0 */ -#ifndef CONFIG_SYS_FDC_DRIVE_NUMBER -#define CONFIG_SYS_FDC_DRIVE_NUMBER 0 -#endif - -/* Hardware access */ -#ifndef CONFIG_SYS_ISA_IO_STRIDE -#define CONFIG_SYS_ISA_IO_STRIDE 1 -#endif - -#ifndef CONFIG_SYS_ISA_IO_OFFSET -#define CONFIG_SYS_ISA_IO_OFFSET 0 -#endif - -/* Supporting Functions */ -/* reads a Register of the FDC */ -unsigned char read_fdc_reg(unsigned int addr) -{ - volatile unsigned char *val = - (volatile unsigned char *)(CONFIG_SYS_ISA_IO_BASE_ADDRESS + - (addr * CONFIG_SYS_ISA_IO_STRIDE) + - CONFIG_SYS_ISA_IO_OFFSET); - - return val [0]; -} - -/* writes a Register of the FDC */ -void write_fdc_reg(unsigned int addr, unsigned char val) -{ - volatile unsigned char *tmp = - (volatile unsigned char *)(CONFIG_SYS_ISA_IO_BASE_ADDRESS + - (addr * CONFIG_SYS_ISA_IO_STRIDE) + - CONFIG_SYS_ISA_IO_OFFSET); - tmp[0]=val; -} - -/* waits for an interrupt (polling) */ -int wait_for_fdc_int(void) -{ - unsigned long timeout; - timeout = FDC_TIME_OUT; - while((read_fdc_reg(FDC_SRA)&0x80)==0) { - timeout--; - udelay(10); - if(timeout==0) /* timeout occurred */ - return false; - } - return true; -} - -/* reads a byte from the FIFO of the FDC and checks direction and RQM bit - of the MSR. returns -1 if timeout, or byte if ok */ -int read_fdc_byte(void) -{ - unsigned long timeout; - timeout = FDC_TIME_OUT; - while((read_fdc_reg(FDC_MSR)&0xC0)!=0xC0) { - /* direction out and ready */ - udelay(10); - timeout--; - if(timeout==0) /* timeout occurred */ - return -1; - } - return read_fdc_reg(FDC_FIFO); -} - -/* if the direction of the FIFO is wrong, this routine is used to - empty the FIFO. Should _not_ be used */ -int fdc_need_more_output(void) -{ - unsigned char c; - while((read_fdc_reg(FDC_MSR)&0xC0)==0xC0) { - c=(unsigned char)read_fdc_byte(); - printf("Error: more output: %x\n",c); - } - return true; -} - - -/* writes a byte to the FIFO of the FDC and checks direction and RQM bit - of the MSR */ -int write_fdc_byte(unsigned char val) -{ - unsigned long timeout; - timeout = FDC_TIME_OUT; - while((read_fdc_reg(FDC_MSR)&0xC0)!=0x80) { - /* direction in and ready for byte */ - timeout--; - udelay(10); - fdc_need_more_output(); - if(timeout==0) /* timeout occurred */ - return false; - } - write_fdc_reg(FDC_FIFO,val); - return true; -} - -/* sets up all FDC commands and issues it to the FDC. If - the command causes direct results (no Execution Phase) - the result is be read as well. */ - -int fdc_issue_cmd(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG) -{ - int i; - unsigned long head,track,sect,timeout; - track = pCMD->blnr / (pFG->sect * pFG->head); /* track nr */ - sect = pCMD->blnr % (pFG->sect * pFG->head); /* remaining blocks */ - head = sect / pFG->sect; /* head nr */ - sect = sect % pFG->sect; /* remaining blocks */ - sect++; /* sectors are 1 based */ - PRINTF("Cmd 0x%02x Track %ld, Head %ld, Sector %ld, Drive %d (blnr %ld)\n", - pCMD->cmd[0],track,head,sect,pCMD->drive,pCMD->blnr); - - if(head|=0) { /* max heads = 2 */ - pCMD->cmd[DRIVE]=pCMD->drive | 0x04; /* head 1 */ - pCMD->cmd[HEAD]=(unsigned char) head; /* head register */ - } - else { - pCMD->cmd[DRIVE]=pCMD->drive; /* head 0 */ - pCMD->cmd[HEAD]=(unsigned char) head; /* head register */ - } - pCMD->cmd[TRACK]=(unsigned char) track; /* track */ - switch (pCMD->cmd[COMMAND]) { - case FDC_CMD_READ: - pCMD->cmd[SECTOR]=(unsigned char) sect; /* sector */ - pCMD->cmd[SECTOR_SIZE]=pFG->sect_code; /* sector size code */ - pCMD->cmd[LAST_TRACK]=pFG->sect; /* End of track */ - pCMD->cmd[GAP]=pFG->gap; /* gap */ - pCMD->cmd[DTL]=0xFF; /* DTL */ - pCMD->cmdlen=FDC_CMD_READ_LEN; - pCMD->cmd[COMMAND]|=(FDC_MFM_MODE<<6); /* set MFM bit */ - pCMD->cmd[COMMAND]|=(FDC_SKIP_MODE<<5); /* set Skip bit */ - pCMD->resultlen=0; /* result only after execution */ - break; - case FDC_CMD_SEEK: - pCMD->cmdlen=FDC_CMD_SEEK_LEN; - pCMD->resultlen=0; /* no result */ - break; - case FDC_CMD_CONFIGURE: - pCMD->cmd[CONFIG0]=0; - pCMD->cmd[CONFIG1]=FDC_CONFIGURE; /* FIFO Threshold, Poll, Enable FIFO */ - pCMD->cmd[CONFIG2]=FDC_PRE_TRK; /* Precompensation Track */ - pCMD->cmdlen=FDC_CMD_CONFIGURE_LEN; - pCMD->resultlen=0; /* no result */ - break; - case FDC_CMD_SPECIFY: - pCMD->cmd[SPEC_HUTSRT]=pFG->spec1; - pCMD->cmd[SPEC_HLT]=(pFG->hlt)<<1; /* head load time */ - if(pCMD->dma==0) - pCMD->cmd[SPEC_HLT]|=0x1; /* no dma */ - pCMD->cmdlen=FDC_CMD_SPECIFY_LEN; - pCMD->resultlen=0; /* no result */ - break; - case FDC_CMD_DUMP_REG: - pCMD->cmdlen=FDC_CMD_DUMP_REG_LEN; - pCMD->resultlen=10; /* 10 byte result */ - break; - case FDC_CMD_READ_ID: - pCMD->cmd[COMMAND]|=(FDC_MFM_MODE<<6); /* set MFM bit */ - pCMD->cmdlen=FDC_CMD_READ_ID_LEN; - pCMD->resultlen=7; /* 7 byte result */ - break; - case FDC_CMD_RECALIBRATE: - pCMD->cmd[DRIVE]&=0x03; /* don't set the head bit */ - pCMD->cmdlen=FDC_CMD_RECALIBRATE_LEN; - pCMD->resultlen=0; /* no result */ - break; - break; - case FDC_CMD_SENSE_INT: - pCMD->cmdlen=FDC_CMD_SENSE_INT_LEN; - pCMD->resultlen=2; - break; - } - for(i=0;icmdlen;i++) { - /* PRINTF("write cmd%d = 0x%02X\n",i,pCMD->cmd[i]); */ - if (write_fdc_byte(pCMD->cmd[i]) == false) { - PRINTF("Error: timeout while issue cmd%d\n",i); - return false; - } - } - timeout=FDC_TIME_OUT; - for(i=0;iresultlen;i++) { - while((read_fdc_reg(FDC_MSR)&0xC0)!=0xC0) { - timeout--; - if(timeout==0) { - PRINTF(" timeout while reading result%d MSR=0x%02X\n",i,read_fdc_reg(FDC_MSR)); - return false; - } - } - pCMD->result[i]=(unsigned char)read_fdc_byte(); - } - return true; -} - -/* selects the drive assigned in the cmd structur and - switches on the Motor */ -void select_fdc_drive(FDC_COMMAND_STRUCT *pCMD) -{ - unsigned char val; - - val=(1<<(4+pCMD->drive))|pCMD->drive|0xC; /* set reset, dma gate and motor bits */ - if((read_fdc_reg(FDC_DOR)&val)!=val) { - write_fdc_reg(FDC_DOR,val); - for(val=0;val<255;val++) - udelay(500); /* wait some time to start motor */ - } -} - -/* switches off the Motor of the specified drive */ -void stop_fdc_drive(FDC_COMMAND_STRUCT *pCMD) -{ - unsigned char val; - - val=(1<<(4+pCMD->drive))|pCMD->drive; /* sets motor bits */ - write_fdc_reg(FDC_DOR,(read_fdc_reg(FDC_DOR)&~val)); -} - -/* issues a recalibrate command, waits for interrupt and - * issues a sense_interrupt */ -int fdc_recalibrate(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG) -{ - pCMD->cmd[COMMAND]=FDC_CMD_RECALIBRATE; - if (fdc_issue_cmd(pCMD, pFG) == false) - return false; - while (wait_for_fdc_int() != true); - - pCMD->cmd[COMMAND]=FDC_CMD_SENSE_INT; - return(fdc_issue_cmd(pCMD,pFG)); -} - -/* issues a recalibrate command, waits for interrupt and - * issues a sense_interrupt */ -int fdc_seek(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG) -{ - pCMD->cmd[COMMAND]=FDC_CMD_SEEK; - if (fdc_issue_cmd(pCMD, pFG) == false) - return false; - while (wait_for_fdc_int() != true); - - pCMD->cmd[COMMAND]=FDC_CMD_SENSE_INT; - return(fdc_issue_cmd(pCMD,pFG)); -} - -/* terminates current command, by not servicing the FIFO - * waits for interrupt and fills in the result bytes */ -int fdc_terminate(FDC_COMMAND_STRUCT *pCMD) -{ - int i; - for(i=0;i<100;i++) - udelay(500); /* wait 500usec for fifo overrun */ - while((read_fdc_reg(FDC_SRA)&0x80)==0x00); /* wait as long as no int has occurred */ - for(i=0;i<7;i++) { - pCMD->result[i]=(unsigned char)read_fdc_byte(); - } - return true; -} - -/* reads data from FDC, seek commands are issued automatic */ -int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG) -{ - /* first seek to start address */ - unsigned long len,readblk,i,timeout,ii,offset; - unsigned char c,retriesrw,retriescal; - unsigned char *bufferw; /* working buffer */ - int sect_size; - int flags; - - flags=disable_interrupts(); /* switch off all Interrupts */ - select_fdc_drive(pCMD); /* switch on drive */ - sect_size=0x080<sect_code; - retriesrw=0; - retriescal=0; - offset=0; - if (fdc_seek(pCMD, pFG) == false) { - stop_fdc_drive(pCMD); - if (flags) - enable_interrupts(); - return false; - } - if((pCMD->result[STATUS_0]&0x20)!=0x20) { - printf("Seek error Status: %02X\n",pCMD->result[STATUS_0]); - stop_fdc_drive(pCMD); - if (flags) - enable_interrupts(); - return false; - } - /* now determine the next seek point */ - /* lastblk=pCMD->blnr + blocks; */ - /* readblk=(pFG->head*pFG->sect)-(pCMD->blnr%(pFG->head*pFG->sect)); */ - readblk=pFG->sect-(pCMD->blnr%pFG->sect); - PRINTF("1st nr of block possible read %ld start %ld\n",readblk,pCMD->blnr); - if(readblk>blocks) /* is end within 1st track */ - readblk=blocks; /* yes, correct it */ - PRINTF("we read %ld blocks start %ld\n",readblk,pCMD->blnr); - bufferw = &buffer[0]; /* setup working buffer */ - do { -retryrw: - len=sect_size * readblk; - pCMD->cmd[COMMAND]=FDC_CMD_READ; - if (fdc_issue_cmd(pCMD, pFG) == false) { - stop_fdc_drive(pCMD); - if (flags) - enable_interrupts(); - return false; - } - for (i=0;i6) { - for(ii=0;ii<7;ii++) { - pCMD->result[ii]=bufferw[(i-7+ii)]; - } /* for */ - } - if(retriesrw++>FDC_RW_RETRIES) { - if (retriescal++>FDC_CAL_RETRIES) { - stop_fdc_drive(pCMD); - if (flags) - enable_interrupts(); - return false; - } - else { - PRINTF(" trying to recalibrate Try %d\n",retriescal); - if (fdc_recalibrate(pCMD, pFG) == false) { - stop_fdc_drive(pCMD); - if (flags) - enable_interrupts(); - return false; - } - retriesrw=0; - goto retrycal; - } /* else >FDC_CAL_RETRIES */ - } - else { - PRINTF("Read retry %d\n",retriesrw); - goto retryrw; - } /* else >FDC_RW_RETRIES */ - }/* if output */ - timeout--; - } while (true); - } /* for len */ - /* the last sector of a track or all data has been read, - * we need to get the results */ - fdc_terminate(pCMD); - offset+=(sect_size*readblk); /* set up buffer pointer */ - bufferw = &buffer[offset]; - pCMD->blnr+=readblk; /* update current block nr */ - blocks-=readblk; /* update blocks */ - if(blocks==0) - break; /* we are finish */ - /* setup new read blocks */ - /* readblk=pFG->head*pFG->sect; */ - readblk=pFG->sect; - if(readblk>blocks) - readblk=blocks; -retrycal: - /* a seek is necessary */ - if (fdc_seek(pCMD, pFG) == false) { - stop_fdc_drive(pCMD); - if (flags) - enable_interrupts(); - return false; - } - if((pCMD->result[STATUS_0]&0x20)!=0x20) { - PRINTF("Seek error Status: %02X\n",pCMD->result[STATUS_0]); - stop_fdc_drive(pCMD); - return false; - } - } while (true); /* start over */ - stop_fdc_drive(pCMD); /* switch off drive */ - if (flags) - enable_interrupts(); - return true; -} - -/* Scan all drives and check if drive is present and disk is inserted */ -int fdc_check_drive(FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG) -{ - int i,drives,state; - /* OK procedure of data book is satisfied. - * trying to get some information over the drives */ - state=0; /* no drives, no disks */ - for(drives=0;drives<4;drives++) { - pCMD->drive=drives; - select_fdc_drive(pCMD); - pCMD->blnr=0; /* set to the 1st block */ - if (fdc_recalibrate(pCMD, pFG) == false) - continue; - if((pCMD->result[STATUS_0]&0x10)==0x10) - continue; - /* ok drive connected check for disk */ - state|=(1<blnr=pFG->size; /* set to the last block */ - if (fdc_seek(pCMD, pFG) == false) - continue; - pCMD->blnr=0; /* set to the 1st block */ - if (fdc_recalibrate(pCMD, pFG) == false) - continue; - pCMD->cmd[COMMAND]=FDC_CMD_READ_ID; - if (fdc_issue_cmd(pCMD, pFG) == false) - continue; - state|=(0x10<name : ""); - } - pCMD->flags=state; - return true; -} - - -/************************************************************************** -* int fdc_setup -* setup the fdc according the datasheet -* assuming in PS2 Mode -*/ -int fdc_setup(int drive, FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG) -{ - int i; - -#ifdef CONFIG_SYS_FDC_HW_INIT - fdc_hw_init (); -#endif - /* first, we reset the FDC via the DOR */ - write_fdc_reg(FDC_DOR,0x00); - for(i=0; i<255; i++) /* then we wait some time */ - udelay(500); - /* then, we clear the reset in the DOR */ - pCMD->drive=drive; - select_fdc_drive(pCMD); - /* initialize the CCR */ - write_fdc_reg(FDC_CCR,pFG->rate); - /* then initialize the DSR */ - write_fdc_reg(FDC_DSR,pFG->rate); - if (wait_for_fdc_int() == false) { - PRINTF("Time Out after writing CCR\n"); - return false; - } - /* now issue sense Interrupt and status command - * assuming only one drive present (drive 0) */ - pCMD->dma=0; /* we don't use any dma at all */ - for(i=0;i<4;i++) { - /* issue sense interrupt for all 4 possible drives */ - pCMD->cmd[COMMAND]=FDC_CMD_SENSE_INT; - if (fdc_issue_cmd(pCMD, pFG) == false) { - PRINTF("Sense Interrupt for drive %d failed\n",i); - } - } - /* issue the configure command */ - pCMD->drive=drive; - select_fdc_drive(pCMD); - pCMD->cmd[COMMAND]=FDC_CMD_CONFIGURE; - if (fdc_issue_cmd(pCMD, pFG) == false) { - PRINTF(" configure timeout\n"); - stop_fdc_drive(pCMD); - return false; - } - /* issue specify command */ - pCMD->cmd[COMMAND]=FDC_CMD_SPECIFY; - if (fdc_issue_cmd(pCMD, pFG) == false) { - PRINTF(" specify timeout\n"); - stop_fdc_drive(pCMD); - return false; - - } - /* then, we clear the reset in the DOR */ - /* fdc_check_drive(pCMD,pFG); */ - /* write_fdc_reg(FDC_DOR,0x04); */ - - return true; -} - -/**************************************************************************** - * main routine do_fdcboot - */ -int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - FD_GEO_STRUCT *pFG = (FD_GEO_STRUCT *)floppy_type; - FDC_COMMAND_STRUCT *pCMD = &cmd; - unsigned long addr,imsize; -#if defined(CONFIG_LEGACY_IMAGE_FORMAT) - image_header_t *hdr; /* used for fdc boot */ -#endif - unsigned char boot_drive; - int i,nrofblk; -#if defined(CONFIG_FIT) - const void *fit_hdr = NULL; -#endif - - switch (argc) { - case 1: - addr = CONFIG_SYS_LOAD_ADDR; - boot_drive=CONFIG_SYS_FDC_DRIVE_NUMBER; - break; - case 2: - addr = simple_strtoul(argv[1], NULL, 16); - boot_drive=CONFIG_SYS_FDC_DRIVE_NUMBER; - break; - case 3: - addr = simple_strtoul(argv[1], NULL, 16); - boot_drive=simple_strtoul(argv[2], NULL, 10); - break; - default: - return CMD_RET_USAGE; - } - /* setup FDC and scan for drives */ - if (fdc_setup(boot_drive, pCMD, pFG) == false) { - printf("\n** Error in setup FDC **\n"); - return 1; - } - if (fdc_check_drive(pCMD, pFG) == false) { - printf("\n** Error in check_drives **\n"); - return 1; - } - if((pCMD->flags&(1<flags&(0x10<drive=boot_drive; - /* read first block */ - pCMD->blnr=0; - if (fdc_read_data((unsigned char *)addr, 1, pCMD, pFG) == false) { - printf("\nRead error:"); - for(i=0;i<7;i++) - printf("result%d: 0x%02X\n",i,pCMD->result[i]); - return 1; - } - - switch (genimg_get_format ((void *)addr)) { -#if defined(CONFIG_LEGACY_IMAGE_FORMAT) - case IMAGE_FORMAT_LEGACY: - hdr = (image_header_t *)addr; - image_print_contents (hdr); - - imsize = image_get_image_size (hdr); - break; -#endif -#if defined(CONFIG_FIT) - case IMAGE_FORMAT_FIT: - fit_hdr = (const void *)addr; - puts ("Fit image detected...\n"); - - imsize = fit_get_size (fit_hdr); - break; -#endif - default: - puts ("** Unknown image type\n"); - return 1; - } - - nrofblk=imsize/512; - if((imsize%512)>0) - nrofblk++; - printf("Loading %ld Bytes (%d blocks) at 0x%08lx..\n",imsize,nrofblk,addr); - pCMD->blnr=0; - if (fdc_read_data((unsigned char *)addr, nrofblk, pCMD, pFG) == false) { - /* read image block */ - printf("\nRead error:"); - for(i=0;i<7;i++) - printf("result%d: 0x%02X\n",i,pCMD->result[i]); - return 1; - } - printf("OK %ld Bytes loaded.\n",imsize); - - flush_cache (addr, imsize); - -#if defined(CONFIG_FIT) - /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { - if (!fit_check_format (fit_hdr)) { - puts ("** Bad FIT image format\n"); - return 1; - } - fit_print_contents (fit_hdr); - } -#endif - - /* Loading ok, update default load address */ - load_addr = addr; - - return bootm_maybe_autostart(cmdtp, argv[0]); -} - -U_BOOT_CMD( - fdcboot, 3, 1, do_fdcboot, - "boot from floppy device", - "loadAddr drive" -); diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 55976d6be5..dbad381379 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -47,7 +47,6 @@ obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o obj-$(CONFIG_MPC83XX_SERDES) += mpc83xx_serdes.o obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o -obj-$(CONFIG_NS87308) += ns87308.o obj-$(CONFIG_NUVOTON_NCT6102D) += nuvoton_nct6102d.o obj-$(CONFIG_PCA9551_LED) += pca9551_led.o obj-$(CONFIG_$(SPL_)PWRSEQ) += pwrseq-uclass.o diff --git a/drivers/misc/ns87308.c b/drivers/misc/ns87308.c deleted file mode 100644 index f5de3329b7..0000000000 --- a/drivers/misc/ns87308.c +++ /dev/null @@ -1,100 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2000 - * Rob Taylor, Flying Pig Systems. robt@flyingpig.com. - */ - -#include - -#include - -void initialise_ns87308 (void) -{ -#ifdef CONFIG_SYS_NS87308_PS2MOD - unsigned char data; - - /* - * Switch floppy drive to PS/2 mode. - */ - read_pnp_config(SUPOERIO_CONF1, &data); - data &= 0xFB; - write_pnp_config(SUPOERIO_CONF1, data); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_KBC1) - PNP_SET_DEVICE_BASE(LDEV_KBC1, CONFIG_SYS_NS87308_KBC1_BASE); - write_pnp_config(LUN_CONFIG_REG, 0); - write_pnp_config(CBASE_HIGH, 0x00); - write_pnp_config(CBASE_LOW, 0x64); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_MOUSE) - PNP_ACTIVATE_DEVICE(LDEV_MOUSE); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_RTC_APC) - PNP_SET_DEVICE_BASE(LDEV_RTC_APC, CONFIG_SYS_NS87308_RTC_BASE); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_FDC) - PNP_SET_DEVICE_BASE(LDEV_FDC, CONFIG_SYS_NS87308_FDC_BASE); - write_pnp_config(LUN_CONFIG_REG, 0x40); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_RARP) - PNP_SET_DEVICE_BASE(LDEV_PARP, CONFIG_SYS_NS87308_LPT_BASE); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_UART1) - PNP_SET_DEVICE_BASE(LDEV_UART1, CONFIG_SYS_NS87308_UART1_BASE); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_UART2) - PNP_SET_DEVICE_BASE(LDEV_UART2, CONFIG_SYS_NS87308_UART2_BASE); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_GPIO) - PNP_SET_DEVICE_BASE(LDEV_GPIO, CONFIG_SYS_NS87308_GPIO_BASE); -#endif - -#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_POWRMAN) -#ifndef CONFIG_SYS_NS87308_PWMAN_BASE - PNP_ACTIVATE_DEVICE(LDEV_POWRMAN); -#else - PNP_SET_DEVICE_BASE(LDEV_POWRMAN, CONFIG_SYS_NS87308_PWMAN_BASE); - - /* - * Enable all units - */ - write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_FER1, 0x7d); - write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_FER2, 0x87); - -#ifdef CONFIG_SYS_NS87308_PMC1 - write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_PMC1, CONFIG_SYS_NS87308_PMC1); -#endif - -#ifdef CONFIG_SYS_NS87308_PMC2 - write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_PMC2, CONFIG_SYS_NS87308_PMC2); -#endif - -#ifdef CONFIG_SYS_NS87308_PMC3 - write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_PMC3, CONFIG_SYS_NS87308_PMC3); -#endif -#endif -#endif - -#ifdef CONFIG_SYS_NS87308_CS0_BASE - PNP_PGCS_CSLINE_BASE(0, CONFIG_SYS_NS87308_CS0_BASE); - PNP_PGCS_CSLINE_CONF(0, CONFIG_SYS_NS87308_CS0_CONF); -#endif - -#ifdef CONFIG_SYS_NS87308_CS1_BASE - PNP_PGCS_CSLINE_BASE(1, CONFIG_SYS_NS87308_CS1_BASE); - PNP_PGCS_CSLINE_CONF(1, CONFIG_SYS_NS87308_CS1_CONF); -#endif - -#ifdef CONFIG_SYS_NS87308_CS2_BASE - PNP_PGCS_CSLINE_BASE(2, CONFIG_SYS_NS87308_CS2_BASE); - PNP_PGCS_CSLINE_CONF(2, CONFIG_SYS_NS87308_CS2_CONF); -#endif -} diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index 5afe620b9f..a1069f92a6 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -5,14 +5,9 @@ */ #include -#include - #include -#ifdef CONFIG_NS87308 -#include -#endif - #include +#include #ifndef CONFIG_NS16550_MIN_FUNCTIONS diff --git a/include/common.h b/include/common.h index 71bf39180c..4494cac1af 100644 --- a/include/common.h +++ b/include/common.h @@ -90,7 +90,6 @@ phys_size_t get_effective_memsize(void); /* $(BOARD)/$(BOARD).c */ void reset_phy (void); -void fdc_hw_init (void); #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 diff --git a/include/ns87308.h b/include/ns87308.h deleted file mode 100644 index d5ccd3ba3b..0000000000 --- a/include/ns87308.h +++ /dev/null @@ -1,233 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2000 - * Rob Taylor, Flying Pig Systems. robt@flyingpig.com. - */ - -#ifndef _NS87308_H_ -#define _NS87308_H_ - -#include - -/* Note: I couldn't find a full data sheet for the ns87308, but the ns87307 seems to be pretty - functionally- (and pin-) equivalent to the 87308, but the 308 has better ir support. */ - -void initialise_ns87308(void); - -/* - * The following struct represents the GPIO registers on the NS87308/NS97307 - */ -struct GPIO -{ - unsigned char dta1; /* 0 data port 1 */ - unsigned char dir1; /* 1 direction port 1 */ - unsigned char out1; /* 2 output type port 1 */ - unsigned char puc1; /* 3 pull-up control port 1 */ - unsigned char dta2; /* 4 data port 2 */ - unsigned char dir2; /* 5 direction port 2 */ - unsigned char out2; /* 6 output type port 2 */ - unsigned char puc2; /* 7 pull-up control port 2 */ -}; - -/* - * The following represents the power management registers on the NS87308/NS97307 - */ -#define PWM_FER1 0 /* 0 function enable reg. 1 */ -#define PWM_FER2 1 /* 1 function enable reg. 2 */ -#define PWM_PMC1 2 /* 2 power mgmt. control 1 */ -#define PWM_PMC2 3 /* 3 power mgmt. control 2 */ -#define PWM_PMC3 4 /* 4 power mgmt. control 3 */ -#define PWM_WDTO 5 /* 5 watchdog time-out */ -#define PWM_WDCF 6 /* 6 watchdog config. */ -#define PWM_WDST 7 /* 7 watchdog status */ - -/*PNP config registers: - * these depend on the stated of BADDR1 and BADDR0 on startup - * so there's three versions here with the last two digits indicating - * for which configuration their valid - * the 1st of the two digits indicates the state of BADDR1 - * the 2st of the two digits indicates the state of BADDR0 - */ - - -#define IO_INDEX_OFFSET_0x 0x0279 /* full PnP isa Mode */ -#define IO_INDEX_OFFSET_10 0x015C /* PnP motherboard mode */ -#define IO_INDEX_OFFSET_11 0x002E /* PnP motherboard mode */ -#define IO_DATA_OFFSET_0x 0x0A79 /* full PnP isa Mode */ -#define IO_DATA_OFFSET_10 0x015D /* PnP motherboard mode */ -#define IO_DATA_OFFSET_11 0x002F /* PnP motherboard mode */ - -#if defined(CONFIG_SYS_NS87308_BADDR_0x) -#define IO_INDEX (CONFIG_SYS_ISA_IO + IO_INDEX_OFFSET_0x) -#define IO_DATA (CONFIG_SYS_ISA_IO + IO_DATA_OFFSET_0x) -#elif defined(CONFIG_SYS_NS87308_BADDR_10) -#define IO_INDEX (CONFIG_SYS_ISA_IO + IO_INDEX_OFFSET_10) -#define IO_DATA (CONFIG_SYS_ISA_IO + IO_DATA_OFFSET_10) -#elif defined(CONFIG_SYS_NS87308_BADDR_11) -#define IO_INDEX (CONFIG_SYS_ISA_IO + IO_INDEX_OFFSET_11) -#define IO_DATA (CONFIG_SYS_ISA_IO + IO_DATA_OFFSET_11) -#endif - -/* PnP register definitions */ - -#define SET_RD_DATA_PORT 0x00 -#define SERIAL_ISOLATION 0x01 -#define CONFIG_CONTROL 0x02 -#define WAKE_CSN 0x03 -#define RES_DATA 0x04 -#define STATUS 0x05 -#define SET_CSN 0x06 -#define LOGICAL_DEVICE 0x07 - -/*vendor defined values */ -#define SID_REG 0x20 -#define SUPOERIO_CONF1 0x21 -#define SUPOERIO_CONF2 0x22 -#define PGCS_INDEX 0x23 -#define PGCS_DATA 0x24 - -/* values above 30 are different for each logical device - but I can't be arsed to enter them all. the ones here - are pretty consistent between all logical devices - feel free to correct the situation if you want.. ;) - */ -#define ACTIVATE 0x30 -#define ACTIVATE_OFF 0x00 -#define ACTIVATE_ON 0x01 - -#define BASE_ADDR_HIGH 0x60 -#define BASE_ADDR_LOW 0x61 -#define LUN_CONFIG_REG 0xF0 -#define DBASE_HIGH 0x60 /* SIO KBC data base address, 15:8 */ -#define DBASE_LOW 0x61 /* SIO KBC data base address, 7:0 */ -#define CBASE_HIGH 0x62 /* SIO KBC command base addr, 15:8 */ -#define CBASE_LOW 0x63 /* SIO KBC command base addr, 7:0 */ - -/* the logical devices*/ -#define LDEV_KBC1 0x00 /* 2 devices for keyboard and mouse controller*/ -#define LDEV_KBC2 0x01 -#define LDEV_MOUSE 0x01 -#define LDEV_RTC_APC 0x02 /*Real Time Clock and Advanced Power Control*/ -#define LDEV_FDC 0x03 /*floppy disk controller*/ -#define LDEV_PARP 0x04 /*Parallel port*/ -#define LDEV_UART2 0x05 -#define LDEV_UART1 0x06 -#define LDEV_GPIO 0x07 /*General Purpose IO and chip select output signals*/ -#define LDEV_POWRMAN 0x08 /*Power Managment*/ - -#define CONFIG_SYS_NS87308_KBC1 (1 << LDEV_KBC1) -#define CONFIG_SYS_NS87308_KBC2 (1 << LDEV_KBC2) -#define CONFIG_SYS_NS87308_MOUSE (1 << LDEV_MOUSE) -#define CONFIG_SYS_NS87308_RTC_APC (1 << LDEV_RTC_APC) -#define CONFIG_SYS_NS87308_FDC (1 << LDEV_FDC) -#define CONFIG_SYS_NS87308_PARP (1 << LDEV_PARP) -#define CONFIG_SYS_NS87308_UART2 (1 << LDEV_UART2) -#define CONFIG_SYS_NS87308_UART1 (1 << LDEV_UART1) -#define CONFIG_SYS_NS87308_GPIO (1 << LDEV_GPIO) -#define CONFIG_SYS_NS87308_POWRMAN (1 << LDEV_POWRMAN) - -/*some functions and macro's for doing configuration */ - -static inline void read_pnp_config(unsigned char index, unsigned char *data) -{ - pci_writeb(index,IO_INDEX); - pci_readb(IO_DATA, *data); -} - -static inline void write_pnp_config(unsigned char index, unsigned char data) -{ - pci_writeb(index,IO_INDEX); - pci_writeb(data, IO_DATA); -} - -static inline void pnp_set_device(unsigned char dev) -{ - write_pnp_config(LOGICAL_DEVICE, dev); -} - -static inline void write_pm_reg(unsigned short base, unsigned char index, unsigned char data) -{ - pci_writeb(index, CONFIG_SYS_ISA_IO + base); - eieio(); - pci_writeb(data, CONFIG_SYS_ISA_IO + base + 1); -} - -/*void write_pnp_config(unsigned char index, unsigned char data); -void pnp_set_device(unsigned char dev); -*/ - -#define PNP_SET_DEVICE_BASE(dev,base) \ - pnp_set_device(dev); \ - write_pnp_config(ACTIVATE, ACTIVATE_OFF); \ - write_pnp_config(BASE_ADDR_HIGH, ((base) >> 8) & 0xff ); \ - write_pnp_config(BASE_ADDR_LOW, (base) &0xff); \ - write_pnp_config(ACTIVATE, ACTIVATE_ON); - -#define PNP_ACTIVATE_DEVICE(dev) \ - pnp_set_device(dev); \ - write_pnp_config(ACTIVATE, ACTIVATE_ON); - -#define PNP_DEACTIVATE_DEVICE(dev) \ - pnp_set_device(dev); \ - write_pnp_config(ACTIVATE, ACTIVATE_OFF); - - -static inline void write_pgcs_config(unsigned char index, unsigned char data) -{ - write_pnp_config(PGCS_INDEX, index); - write_pnp_config(PGCS_DATA, data); -} - -/* these macrose configure the 3 CS lines - on the sandpoint board these controll NVRAM - CS0 is connected to NVRAMCS - CS1 is connected to NVRAMAS0 - CS2 is connected to NVRAMAS1 - */ -#define PGCS_CS_ASSERT_ON_WRITE 0x10 -#define PGCS_CS_ASSERT_ON_READ 0x20 - -#define PNP_PGCS_CSLINE_BASE(cs, base) \ - write_pgcs_config((cs) << 2, ((base) >> 8) & 0xff ); \ - write_pgcs_config(((cs) << 2) + 1, (base) & 0xff ); - -#define PNP_PGCS_CSLINE_CONF(cs, conf) \ - write_pgcs_config(((cs) << 2) + 2, (conf) ); - - -/* The following sections are for 87308 extensions to the standard compoents it emulates */ - -/* extensions to 16550*/ - -#define MCR_MDSL_MSK 0xe0 /*mode select mask*/ -#define MCR_MDSL_UART 0x00 /*uart, default*/ -#define MCR_MDSL_SHRPIR 0x02 /*Sharp IR*/ -#define MCR_MDSL_SIR 0x03 /*SIR*/ -#define MCR_MDSL_CIR 0x06 /*Consumer IR*/ - -#define FCR_TXFTH0 0x10 /* these bits control threshod of data level in fifo */ -#define FCR_TXFTH1 0x20 /* for interrupt trigger */ - -/* - * Default NS87308 configuration - */ -#ifndef CONFIG_SYS_NS87308_KBC1_BASE -#define CONFIG_SYS_NS87308_KBC1_BASE 0x0060 -#endif -#ifndef CONFIG_SYS_NS87308_RTC_BASE -#define CONFIG_SYS_NS87308_RTC_BASE 0x0070 -#endif -#ifndef CONFIG_SYS_NS87308_FDC_BASE -#define CONFIG_SYS_NS87308_FDC_BASE 0x03F0 -#endif -#ifndef CONFIG_SYS_NS87308_LPT_BASE -#define CONFIG_SYS_NS87308_LPT_BASE 0x0278 -#endif -#ifndef CONFIG_SYS_NS87308_UART1_BASE -#define CONFIG_SYS_NS87308_UART1_BASE 0x03F8 -#endif -#ifndef CONFIG_SYS_NS87308_UART2_BASE -#define CONFIG_SYS_NS87308_UART2_BASE 0x02F8 -#endif - -#endif /*_NS87308_H_*/ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cf1808e051..4449eea2e5 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1243,7 +1243,6 @@ CONFIG_NO_WAIT CONFIG_NR_DRAM_POPULATED CONFIG_NS16550_MIN_FUNCTIONS CONFIG_NS8382X -CONFIG_NS87308 CONFIG_NUM_DSP_CPUS CONFIG_NUM_PAMU CONFIG_ODROID_REV_AIN @@ -2298,8 +2297,6 @@ CONFIG_SYS_FAST_CLK CONFIG_SYS_FAULT_ECHO_LINK_DOWN CONFIG_SYS_FAULT_MII_ADDR CONFIG_SYS_FCC_PSMR -CONFIG_SYS_FDC_DRIVE_NUMBER -CONFIG_SYS_FDC_HW_INIT CONFIG_SYS_FDT_BASE CONFIG_SYS_FDT_LOAD_ADDR CONFIG_SYS_FDT_PAD @@ -2974,8 +2971,6 @@ CONFIG_SYS_IO_BASE CONFIG_SYS_ISA_BASE CONFIG_SYS_ISA_IO CONFIG_SYS_ISA_IO_BASE_ADDRESS -CONFIG_SYS_ISA_IO_OFFSET -CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_MEM CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_JFFS2_FIRST_SECTOR @@ -3335,35 +3330,6 @@ CONFIG_SYS_NS16550_MEM32 CONFIG_SYS_NS16550_PORT_MAPPED CONFIG_SYS_NS16550_REG_SIZE CONFIG_SYS_NS16550_SERIAL -CONFIG_SYS_NS87308_CS0_BASE -CONFIG_SYS_NS87308_CS0_CONF -CONFIG_SYS_NS87308_CS1_BASE -CONFIG_SYS_NS87308_CS1_CONF -CONFIG_SYS_NS87308_CS2_BASE -CONFIG_SYS_NS87308_CS2_CONF -CONFIG_SYS_NS87308_FDC -CONFIG_SYS_NS87308_FDC_BASE -CONFIG_SYS_NS87308_GPIO -CONFIG_SYS_NS87308_GPIO_BASE -CONFIG_SYS_NS87308_KBC1 -CONFIG_SYS_NS87308_KBC1_BASE -CONFIG_SYS_NS87308_KBC2 -CONFIG_SYS_NS87308_LPT_BASE -CONFIG_SYS_NS87308_MOUSE -CONFIG_SYS_NS87308_PARP -CONFIG_SYS_NS87308_PMC1 -CONFIG_SYS_NS87308_PMC2 -CONFIG_SYS_NS87308_PMC3 -CONFIG_SYS_NS87308_POWRMAN -CONFIG_SYS_NS87308_PS2MOD -CONFIG_SYS_NS87308_PWMAN_BASE -CONFIG_SYS_NS87308_RARP -CONFIG_SYS_NS87308_RTC_APC -CONFIG_SYS_NS87308_RTC_BASE -CONFIG_SYS_NS87308_UART1 -CONFIG_SYS_NS87308_UART1_BASE -CONFIG_SYS_NS87308_UART2 -CONFIG_SYS_NS87308_UART2_BASE CONFIG_SYS_NUM_ADDR_MAP CONFIG_SYS_NUM_CPC CONFIG_SYS_NUM_FM1_10GEC From patchwork Thu Dec 12 00:47:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208127 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKtp5SgTz9sP6 for ; Thu, 12 Dec 2019 15:04:31 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C17CF814D6; Thu, 12 Dec 2019 05:04:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="d1IKSMYf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 08CBC81642; Thu, 12 Dec 2019 01:48:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 508E9814DD for ; Thu, 12 Dec 2019 01:48:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id k24so855549ioc.4 for ; Wed, 11 Dec 2019 16:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9gmxHTbAV122/j1PuKSudEWsR5+e1Eb1eV0QGwNQE1E=; b=d1IKSMYfXDijbNxh8afHB+H6exND3P67pFqg+M0qavDl+M80okf2dB80/D1OQkx1aa Y/xiqBcJkB855BhQDnkYOGnmHzQwdzRLI51OYPSp6bhElS77VJI4sIIRCqowtO4A8dwR b0f0kRRzFfIPiiYq9bACX/oRo2qpxjKxjGdTk= 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=9gmxHTbAV122/j1PuKSudEWsR5+e1Eb1eV0QGwNQE1E=; b=C6fakiiL5QQVUAv03W+Y4uEEZLgynPRMk9ASlCNrg7qfP9/XAkn5LqiRFTHsXB2TEb HnWdMzxFiJhX/mlvVam0CWZmwashQykOjUCb0UMMYtIjs4P5W57K/mT6Uh9gfCs8O3U0 PvC21gMxqbcWUu154RrxrVLW5fBe8UkX8rhJ29BEDAo7fyecSc0d2KgeiNiwmWxeoT8U HH8FizgTI0YWvs4CXO4Y84Y0V/vSL7GbgFLro9VVSvi7lYa4NuXrIF76x+wcM2QIO7NK isXSvC0DXB8p5aTTQaIBlOmkotmznVFXbGJX2arpTlh6sFY4QQPomnkDSMbvAOdo2UHi sMRg== X-Gm-Message-State: APjAAAVYUI4c1TYtNgZV49ykbIOyMvo3MRJeaFZ2U6EJzAnjkFL1zCpP Mw/jf7WyhHwY4hu2ClbTVgXxJTGgTs8= X-Google-Smtp-Source: APXvYqwq8vfHLGVecbn4hK1zQ7YP21/ChEszh6Af74yhbR4yp5+l9HvU7el9Fo+H6B2bZKzU/v7Xvg== X-Received: by 2002:a5d:9c12:: with SMTP id 18mr920363ioe.211.1576111702805; Wed, 11 Dec 2019 16:48:22 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:22 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 11/35] common: Move reset_phy() to net.h Date: Wed, 11 Dec 2019 17:47:30 -0700 Message-Id: <20191211174637.11.Iceac0aab71df35533a82f97aa8e73b4a6143fa7e@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Prafulla Wadaskar , Walter Schweizer , Bhaskar Upadhaya , Joe Hershberger , Stefan Roese , Chris Packham , Eric Cooper , Tom Rini , Luka Perkov , Sumit Garg , Heinrich Schuchardt , Tony Dinh , Siddarth Gore , Jason Cooper , Gerald Kerma , Dave Purdy , Boris Brezillon , Alexander Graf , Stephen Warren , Evgeni Dobrev , Albert ARIBAUD , Krunal Bhargav , Stelian Pop , Valentin Longchamp , Suriyan Ramasami Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This is a network function so let's move it into that header. Signed-off-by: Simon Glass --- arch/arm/mach-omap2/emif-common.c | 1 + board/LaCie/edminiv2/edminiv2.c | 1 + board/LaCie/net2big_v2/net2big_v2.c | 1 + board/LaCie/netspace_v2/netspace_v2.c | 1 + board/Marvell/db-88f6281-bp/db-88f6281-bp.c | 1 + board/Marvell/dreamplug/dreamplug.c | 1 + board/Marvell/guruplug/guruplug.c | 1 + board/Marvell/openrd/openrd.c | 1 + board/Marvell/sheevaplug/sheevaplug.c | 1 + board/Seagate/dockstar/dockstar.c | 1 + board/Seagate/goflexhome/goflexhome.c | 1 + board/Seagate/nas220/nas220.c | 1 + board/Synology/ds109/ds109.c | 1 + board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c | 1 + board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c | 1 + board/atmel/at91sam9260ek/at91sam9260ek.c | 1 + board/atmel/at91sam9263ek/at91sam9263ek.c | 1 + board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 1 + board/cloudengines/pogo_e02/pogo_e02.c | 1 + board/d-link/dns325/dns325.c | 1 + board/freescale/ls1012afrdm/eth.c | 1 + board/freescale/ls1012ardb/eth.c | 1 + board/freescale/ls1088a/eth_ls1088aqds.c | 1 + board/freescale/ls1088a/eth_ls1088ardb.c | 1 + board/freescale/ls2080a/ls2080a.c | 1 + board/freescale/ls2080aqds/eth.c | 1 + board/freescale/ls2080ardb/eth_ls2080rdb.c | 1 + board/freescale/lx2160a/eth_lx2160aqds.c | 1 + board/freescale/lx2160a/eth_lx2160ardb.c | 1 + board/keymile/km_arm/km_arm.c | 1 + board/zyxel/nsa310s/nsa310s.c | 1 + common/board_r.c | 1 + include/common.h | 3 --- include/net.h | 8 ++++++++ 34 files changed, 40 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c index 290f9dcdb0..c900f28af2 100644 --- a/arch/arm/mach-omap2/emif-common.c +++ b/arch/arm/mach-omap2/emif-common.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c index b68e18e034..b5ffe8162f 100644 --- a/board/LaCie/edminiv2/edminiv2.c +++ b/board/LaCie/edminiv2/edminiv2.c @@ -9,6 +9,7 @@ #include #include +#include #include #include "../common/common.h" #include diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c index 686608d25a..50305656e8 100644 --- a/board/LaCie/net2big_v2/net2big_v2.c +++ b/board/LaCie/net2big_v2/net2big_v2.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c index bd7ab22948..b7ae58c645 100644 --- a/board/LaCie/netspace_v2/netspace_v2.c +++ b/board/LaCie/netspace_v2/netspace_v2.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c index b68f2f3c89..729516d9e1 100644 --- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c +++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include +#include #include #include #include diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c index ede168c9ec..887dd1ed74 100644 --- a/board/Marvell/dreamplug/dreamplug.c +++ b/board/Marvell/dreamplug/dreamplug.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c index 466f85eb08..71bee76bdc 100644 --- a/board/Marvell/guruplug/guruplug.c +++ b/board/Marvell/guruplug/guruplug.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c index a4923ce971..ae9202895d 100644 --- a/board/Marvell/openrd/openrd.c +++ b/board/Marvell/openrd/openrd.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c index 79999c7d30..6c6106c23c 100644 --- a/board/Marvell/sheevaplug/sheevaplug.c +++ b/board/Marvell/sheevaplug/sheevaplug.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c index 40e5dc7034..5a8c6e282b 100644 --- a/board/Seagate/dockstar/dockstar.c +++ b/board/Seagate/dockstar/dockstar.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c index 42b51eb29a..1e4477aa5f 100644 --- a/board/Seagate/goflexhome/goflexhome.c +++ b/board/Seagate/goflexhome/goflexhome.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c index 1e6c43b1fa..99462052f0 100644 --- a/board/Seagate/nas220/nas220.c +++ b/board/Seagate/nas220/nas220.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c index 1f2fce989c..f2031ef3bb 100644 --- a/board/Synology/ds109/ds109.c +++ b/board/Synology/ds109/ds109.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c index 0eac10d911..1f3f293bd9 100644 --- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c +++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c index c584fc0e98..889ce70d75 100644 --- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c +++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index 9dcbfc450b..d1e78dabf2 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.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 31bb72c0cd..fc941d447f 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 85004310b1..6df915fcf1 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/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c index ffbd099c4e..835c3279be 100644 --- a/board/cloudengines/pogo_e02/pogo_e02.c +++ b/board/cloudengines/pogo_e02/pogo_e02.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c index a1d987beda..dfdc683683 100644 --- a/board/d-link/dns325/dns325.c +++ b/board/d-link/dns325/dns325.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls1012afrdm/eth.c b/board/freescale/ls1012afrdm/eth.c index 421e2fe38c..bd1df092f9 100644 --- a/board/freescale/ls1012afrdm/eth.c +++ b/board/freescale/ls1012afrdm/eth.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c index b35d5343e4..3cc0a65cb9 100644 --- a/board/freescale/ls1012ardb/eth.c +++ b/board/freescale/ls1012ardb/eth.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c index 237088a537..54ef75347f 100644 --- a/board/freescale/ls1088a/eth_ls1088aqds.c +++ b/board/freescale/ls1088a/eth_ls1088aqds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/ls1088a/eth_ls1088ardb.c b/board/freescale/ls1088a/eth_ls1088ardb.c index a2b52a879b..01f56db0a1 100644 --- a/board/freescale/ls1088a/eth_ls1088ardb.c +++ b/board/freescale/ls1088a/eth_ls1088ardb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c index 413a698511..949b57c24e 100644 --- a/board/freescale/ls2080a/ls2080a.c +++ b/board/freescale/ls2080a/ls2080a.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c index 6a8788c312..bbb70a859a 100644 --- a/board/freescale/ls2080aqds/eth.c +++ b/board/freescale/ls2080aqds/eth.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls2080ardb/eth_ls2080rdb.c b/board/freescale/ls2080ardb/eth_ls2080rdb.c index 62c7a7a315..b0f276e839 100644 --- a/board/freescale/ls2080ardb/eth_ls2080rdb.c +++ b/board/freescale/ls2080ardb/eth_ls2080rdb.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c index 55e8a427e6..6500649d7b 100644 --- a/board/freescale/lx2160a/eth_lx2160aqds.c +++ b/board/freescale/lx2160a/eth_lx2160aqds.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c index 365ff73cef..aeb989a638 100644 --- a/board/freescale/lx2160a/eth_lx2160ardb.c +++ b/board/freescale/lx2160a/eth_lx2160ardb.c @@ -6,6 +6,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 7f83ec180e..b21e170fdd 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c index e7cb6be616..82a3feee69 100644 --- a/board/zyxel/nsa310s/nsa310s.c +++ b/board/zyxel/nsa310s/nsa310s.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index 4910a5da34..c560f2e1cf 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -14,6 +14,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/include/common.h b/include/common.h index 4494cac1af..f3adf06a37 100644 --- a/include/common.h +++ b/include/common.h @@ -88,9 +88,6 @@ const char *symbol_lookup(unsigned long addr, unsigned long *caddr); long get_ram_size (long *, long); phys_size_t get_effective_memsize(void); -/* $(BOARD)/$(BOARD).c */ -void reset_phy (void); - #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/net.h b/include/net.h index a8ee08150f..8a02c923a4 100644 --- a/include/net.h +++ b/include/net.h @@ -917,4 +917,12 @@ static inline struct in_addr env_get_ip(char *var) { return string_to_ip(env_get(var)); } + +/** + * reset_phy() - Reset the Ethernet PHY + * + * This should be implemented by boards if CONFIG_RESET_PHY_R is enabled + */ +void reset_phy(void); + #endif /* __NET_H__ */ From patchwork Thu Dec 12 00:47:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208047 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="J1/rCGC1"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFYs0xmrz9sR7 for ; Thu, 12 Dec 2019 11:49:37 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 94565814FA; Thu, 12 Dec 2019 01:48:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="J1/rCGC1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C53AC8161D; Thu, 12 Dec 2019 01:48:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 73356814D5 for ; Thu, 12 Dec 2019 01:48:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd43.google.com with SMTP id k24so855583ioc.4 for ; Wed, 11 Dec 2019 16:48:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ORuOMDyg98pNelsX26pZ4JKFko6P+NlCPh39Sdoa/uE=; b=J1/rCGC1gp4FPAyiYYJjlC+4NhRtakfqjt+iZKDGL0dX+wXgbi5ppkzrE//NtOvDah JGfWk6ITAD96XWP7ojxNUVmR8GKkBlcgSor2paMTGXC5f8X0AX8JvQWGCHUsgYkzoYYz 01reEKsqaUcaUIPNaGqbzeF8KE4R4uZv5yXUU= 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=ORuOMDyg98pNelsX26pZ4JKFko6P+NlCPh39Sdoa/uE=; b=HS7VCO8abRvPmuut6LxnvzwKBKCNCrc2kpmYqI4/ndV3JyBAlq0KWzbuXmQ+omj03+ gy2d+rp8/oynveUai8rsg+xnC58E86clfAOKDOfW2SrfWHe1WuB5kwt33P2ayNEFIGYl BmjwU8XSkJcHLQJyJQtRlWPrdYb+vaJpsVnm0+qeSOmmC32fG/95Cg9Qun9JPYKWF1mO r0Yk1uLn3e8xvJY9I5Ux+MNPk8NpEEkvlP1n8CBJjM5x+/GHudxTFysR1ugYAessHfrG 2QjsNe+RrsnTodBELjrBnqpMrm1jIQ1gQmDWULTsWSIaUwSQIeRIun/tyTqqgqMiDKa6 QRwQ== X-Gm-Message-State: APjAAAVs4L9WNXSsdyBF7////MpuDRLd9EfiRTSxjAYDOeZb7VyDC2ff 4wPNNJvogJpcw++OgspaNAtmLGIzbKg= X-Google-Smtp-Source: APXvYqy8PmWX5Ir/Ru71RFvlVn8KX3ATdADZUW+rY3DthbD4BNn09Fc/mXi5aQMxV/qC0GDCTC2p8w== X-Received: by 2002:a05:6638:72c:: with SMTP id j12mr6006942jad.136.1576111704079; Wed, 11 Dec 2019 16:48:24 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:23 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 12/35] common: Move CONFIG_SYS_DEF_EEPROM_ADDR out of common.h Date: Wed, 11 Dec 2019 17:47:31 -0700 Message-Id: <20191212004755.11091-7-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This define seems better suited to the eeprom header file, particularly as it is only used in the eeprom.c file. Move it. Signed-off-by: Simon Glass --- include/common.h | 4 ---- include/eeprom.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/common.h b/include/common.h index f3adf06a37..454e88323c 100644 --- a/include/common.h +++ b/include/common.h @@ -88,10 +88,6 @@ const char *symbol_lookup(unsigned long addr, unsigned long *caddr); long get_ram_size (long *, long); phys_size_t get_effective_memsize(void); -#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 - #if defined(CONFIG_SYS_DRAM_TEST) int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ diff --git a/include/eeprom.h b/include/eeprom.h index 61eb826a73..79118eb83d 100644 --- a/include/eeprom.h +++ b/include/eeprom.h @@ -21,4 +21,8 @@ int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt); #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 + #endif From patchwork Thu Dec 12 00:47: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: 1208049 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oKVUG59k"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFZJ481fz9sRf for ; Thu, 12 Dec 2019 11:50:00 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 703EB81685; Thu, 12 Dec 2019 01:48:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oKVUG59k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B9FC781676; Thu, 12 Dec 2019 01:48:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 16AC8814DA for ; Thu, 12 Dec 2019 01:48:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id n1so507826ilm.6 for ; Wed, 11 Dec 2019 16:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kxmOA1L+szZkus0X9l5OXPC48n4qdD4kzXnlVV514J0=; b=oKVUG59koENN3afHZLygXYyBJNiOdp4s69BCEwFeijEGq+NJMEDvhDk+CD5oQJITw3 KAHMxNFyStrg8Zji2ZSO8tLETHNkTTjnjjBE3DzJx2ZjmUwSCQ5V5LYOQswNQAL9fw8/ QTOVuI104nCaqhUu8m3t3xZceazHsn4JMtAoE= 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=kxmOA1L+szZkus0X9l5OXPC48n4qdD4kzXnlVV514J0=; b=Dbn/W1m6Dlp506NMxm/6lcLwzBn2mFNOxCH7SKJCUaDiFwnBn/c8Q39s6XlBlnL210 +kGigHKsQUuFVWhTA9Y3R8nUmXE7RCX6sQrteXk5xDynjNPEIM3o9ahseKRwmHZVd4Ts cJgL2Qu8NlZ5IJllagP0oKjQlVVhfTAwIx49K1WqSuPFYqYDki489m9mybfWsizvqIoN bevzAwwbcfz0Gexl8plObkuiSQbIxExzSfDuvbj2rDtJtgnv2wpC6BpHjgSMB+upgW9R p0uiT1pYYe9wMFxeslpDqkYV+3xf3sjIMapNOBSi0R8nKkiGRiZMNgHTEBtQPwOMGtIA u0mw== X-Gm-Message-State: APjAAAUxtWpsonvtOTeTL/y/NUdZfk2faGllGX/e7HpyzWcRyfxf8tMx TqZFwC0cGZlAAAQWDsZ8X4EYhfEkHlY= X-Google-Smtp-Source: APXvYqwWl16Cp6dbVdYO1P5YMQe55NS4BTyIwojzDLcspPkaBTsajVBd20zwsV3zhVFAWD7G6PV17g== X-Received: by 2002:a92:d084:: with SMTP id h4mr6049322ilh.265.1576111705710; Wed, 11 Dec 2019 16:48:25 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:25 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 13/35] common: Drop CONFIG_POST_STD/ALT_LIST Date: Wed, 11 Dec 2019 17:47:32 -0700 Message-Id: <20191212004755.11091-8-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Boris Brezillon , Pascal Linder , Joe Hershberger , Stefan Roese Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These CONFIG options are not used anymore. CONFIG_POST_ALT_LIST just causes CONFIG_POST_STD_LIST to be set and it causes tests.c to be compiled. So just make compiling tests.c unconditional. Signed-off-by: Simon Glass --- include/common.h | 3 --- post/Makefile | 2 +- scripts/config_whitelist.txt | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/common.h b/include/common.h index 454e88323c..1fba17b0f7 100644 --- a/include/common.h +++ b/include/common.h @@ -125,9 +125,6 @@ int get_serial_clock(void); #ifdef CONFIG_POST #define CONFIG_HAS_POST -#ifndef CONFIG_POST_ALT_LIST -#define CONFIG_POST_STD_LIST -#endif #endif #define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) diff --git a/post/Makefile b/post/Makefile index 5f72708214..afd49403c2 100644 --- a/post/Makefile +++ b/post/Makefile @@ -4,7 +4,7 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-y += post.o -obj-$(CONFIG_POST_STD_LIST) += tests.o +obj-y += tests.o obj-y += drivers/ obj-$(CONFIG_PPC) += lib_powerpc/ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 4449eea2e5..7b3c73745a 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1354,7 +1354,6 @@ CONFIG_PMW_BASE CONFIG_PM_SLEEP CONFIG_POST CONFIG_POSTBOOTMENU -CONFIG_POST_ALT_LIST CONFIG_POST_BSPEC1 CONFIG_POST_BSPEC2 CONFIG_POST_BSPEC3 @@ -1362,7 +1361,6 @@ CONFIG_POST_BSPEC4 CONFIG_POST_BSPEC5 CONFIG_POST_EXTERNAL_WORD_FUNCS CONFIG_POST_SKIP_ENV_FLAGS -CONFIG_POST_STD_LIST CONFIG_POST_UART CONFIG_POST_WATCHDOG CONFIG_POWER From patchwork Thu Dec 12 00:47: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: 1208048 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="f2XHenE6"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFZ43sc8z9sR7 for ; Thu, 12 Dec 2019 11:49:48 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0BD5A81676; Thu, 12 Dec 2019 01:48:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="f2XHenE6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AC76681656; Thu, 12 Dec 2019 01:48:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9C88F81582 for ; Thu, 12 Dec 2019 01:48:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id w13so535384ilo.1 for ; Wed, 11 Dec 2019 16:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lKmDk2+1ijPxFjnIDPAbANN/YxLrow6c3ceM3dPgO4E=; b=f2XHenE6U1Z1JKgZU7cogjnzVcZYKEWGLg3ArqqYjbLyC1xNO2d4cvds2QIjUGdRt0 8KeWTAWA6gAf9fzccVpKU0vUTTvDwBbjZoClkMkrglUvOT9yVmDsRIS/A2hwZ7oOz3Ud jqAIH0xIfkEDzL2BLWJmFTro+kxHIjor8fWOg= 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=lKmDk2+1ijPxFjnIDPAbANN/YxLrow6c3ceM3dPgO4E=; b=iXUYAj89JMlOSLTmUw9Qk0O5XD3gNSwGUOmohYntsVVpda4wJ8fYRyLWUldcqSDVy5 qlrc7XFo3ABPGdrHm5VjrCtvwehAYSyTph5j1+BnEXYlHgEY+g0iezS5StAakLQLQe3a RTir3p+jG+Z5Yecu3xYqIRdpDMHjTazV5TJJwT2IA2nkJ/UOh0jmsAxd6L+smOnSx+0x SXLGu6hE7uxrCvYdSMsCvScxFsl4ihY9B/9aIs/KEKMJlG07aok+3f09LvVXGj69NGLD fMr1fgH0Kn/rxKr6NNsf+tKe78N7QHsXfzdw6beF8JXneRuIiApy6EIukloStX9bc+3w tnHA== X-Gm-Message-State: APjAAAUTHZSDVkltckruJY7OS7VHPtm/H5WCB4n+9lIyqTiN4N766C4D g/MdNlcB7mJQWI6V1CaGzIT2ujarN9M= X-Google-Smtp-Source: APXvYqysDhzQP0EjClGDh/piTqdeZI6oXmTY8Ugv1tM5kktasTpZapV4ygj6+lhdlq+YeKINQiZ4ew== X-Received: by 2002:a92:290a:: with SMTP id l10mr5884253ilg.151.1576111707350; Wed, 11 Dec 2019 16:48:27 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:26 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 14/35] common: Drop CONFIG_HAS_POST Date: Wed, 11 Dec 2019 17:47:33 -0700 Message-Id: <20191212004755.11091-9-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Tom Rini , Joe Hershberger , Heinrich Schuchardt , Boris Brezillon , Chris Packham Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This only exists to control whether the post/ directory is build. It is just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use an ifdef in the Makefile instead. Signed-off-by: Simon Glass --- Makefile | 4 +++- include/common.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0766f78dcb..6b7d80139e 100644 --- a/Makefile +++ b/Makefile @@ -762,7 +762,9 @@ libs-y += cmd/ libs-y += common/ libs-y += env/ libs-$(CONFIG_API) += api/ -libs-$(CONFIG_HAS_POST) += post/ +ifdef CONFIG_POST +libs-y += post/ +endif libs-$(CONFIG_UNIT_TEST) += test/ test/dm/ libs-$(CONFIG_UT_ENV) += test/env/ libs-$(CONFIG_UT_OPTEE) += test/optee/ diff --git a/include/common.h b/include/common.h index 1fba17b0f7..a102f9deff 100644 --- a/include/common.h +++ b/include/common.h @@ -123,10 +123,6 @@ int get_serial_clock(void); /* Put only stuff here that the assembler can digest */ -#ifdef CONFIG_POST -#define CONFIG_HAS_POST -#endif - #define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) /* From patchwork Thu Dec 12 00:47: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: 1208050 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mg35vOx2"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFZY2pG9z9sRf for ; Thu, 12 Dec 2019 11:50:13 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 44F1381682; Thu, 12 Dec 2019 01:48:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mg35vOx2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB1D4814DA; Thu, 12 Dec 2019 01:48:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 415DE8161D for ; Thu, 12 Dec 2019 01:48:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id w13so535428ilo.1 for ; Wed, 11 Dec 2019 16:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PKrVCCCZgE4vVUYxxLysUWP/2a/+Knx9T8cRLPKe/FI=; b=mg35vOx2hfKHmezSPelmYtIByr9MvNKUagTdzaN23+V2zkVsqgdHc2qy6DQxShNSBB DaXdlDxyg21+dfmyocWATY7fYlFtcxjSgV6BJvTvsROlQXOjoplYtSaR2/aUhZ6F2jVR PqZsuQu6RonB5+B1wh0UnzOyd8B89iObcAEKY= 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=PKrVCCCZgE4vVUYxxLysUWP/2a/+Knx9T8cRLPKe/FI=; b=p1IVU+4hmMouXssAsvBpZSeCGko4scvNmZ19XnO3u+AvwyailqnSKgspGRII5OuGt4 PBRKf89I9M89MNff5TluU/yhlMhWAjj/3uop1wStLlvW8AlW+qczjEzIoppu3BDSBDKh 64S67edy4axwJN+1bNneyHk5BxIro+95hBRegeDkBjpMPiwVhZJtZPyIGf1K2TmCDdNz 5nlOu6U16YI0SeLsRfLGDTuqCc56qY2EbMBCFs049nOBaSeEIHAnAZ6ARIrUd9ts5VgU M51/Rye2VyJ8vBIAvl9G2OtLn9urrVyDk7hTvr7naIu/js298lvfjJkRVQcpMTC+MPvS LT/g== X-Gm-Message-State: APjAAAX6tbLuVBCU7+QsRNZSi0BFy4Qlm2wiZF/Ysl4C4/IG1LTxBOoZ l6FYcBmPu6Y+1ujq/ZIpn1VywG9SB4Y= X-Google-Smtp-Source: APXvYqy72OQ1Tzxgwke1UH4oME2bBnxhF/nh9uuQbDZ3cVceIxIMP9/lh6iK7qwQ00IZ8/veJEF1hQ== X-Received: by 2002:a92:4781:: with SMTP id e1mr5770303ilk.147.1576111709035; Wed, 11 Dec 2019 16:48:29 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:28 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 15/35] common: Drop the symbol_lookup() declaration Date: Wed, 11 Dec 2019 17:47:34 -0700 Message-Id: <20191211174637.15.Ib8b4a59067042ac73ab44a515342516cee030549@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function is not called anywhere so we can drop the declaration. If it is needed one day, it should be added in its own header file. Signed-off-by: Simon Glass --- include/common.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/common.h b/include/common.h index a102f9deff..7bb18c572e 100644 --- a/include/common.h +++ b/include/common.h @@ -81,9 +81,6 @@ extern ulong load_addr; /* Default Load Address */ extern ulong save_addr; /* Default Save Address */ extern ulong save_size; /* Default Save Size */ -/* common/kallsysm.c */ -const char *symbol_lookup(unsigned long addr, unsigned long *caddr); - /* common/memsize.c */ long get_ram_size (long *, long); phys_size_t get_effective_memsize(void); From patchwork Thu Dec 12 00:47: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: 1208051 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="huMo1mcP"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFZl6f7Zz9sRf for ; Thu, 12 Dec 2019 11:50:23 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B571981683; Thu, 12 Dec 2019 01:48:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="huMo1mcP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3DA92814DD; Thu, 12 Dec 2019 01:48:35 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DF22181659 for ; Thu, 12 Dec 2019 01:48:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id i11so800521ioi.12 for ; Wed, 11 Dec 2019 16:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2GStVLFx/+gC6XCQXtJkxahxR0a5xw3Rk1NCZ5Ic5cA=; b=huMo1mcPSdFgpHlgN4e/RAxqqOAl9oBDZOKN5p5chX+u2NTjceVDVHqbFPJdRjeqgT 9JJc7ugM3R5Bs+muhJbYBU5K6IZmiwp26eH5FXb+Lwaxg1EHgkcb5ec3bgxZv4jGsxPQ OhkC9s8PJ8MCwQeEv4OOIYnZrB44wNGZKCvoE= 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=2GStVLFx/+gC6XCQXtJkxahxR0a5xw3Rk1NCZ5Ic5cA=; b=i5kfg3BxFbF3isVYl+ON0AWCj68LI2nwwqh4sHBruLtmzedrNQx2IPsCXgdTZ2GzLw 5YaLd1fQe4+fXSQS2MAKVJuQENWhBh+ldTSW9vb/0Cp80xX7QVgT1B01n0u4DqLpQ0zI F8hmXSEmfoxxT0RlBiBtPdNs8JPoLA1h9tWbvKxLP1SpEEIEhNVM20IdbmWqjRypY3MR yAUiFDrl+T0BiMOdIIgGr60XMlEq/wyVY5QunvUMNnCNvByAnbnoeo8DUOqjjLsKfROR otlSvaTkHhQtrzyotzV8RcpK/qs33w1q0+xZxXApwSdNj34xzJdL6pQj/zlpqoCaBazA 2O+A== X-Gm-Message-State: APjAAAULx0hATkzLh2LnhwcTLz70NcC39Zyey+M/wivMFMHTNGyD0kV2 QLC0LVrbt8UiSOvZq6fp723g6xr9Eto= X-Google-Smtp-Source: APXvYqzEY4F2NlSF2AQmlWwD+oCLNXVreMfj6SgmfeEkqoZoboUX9ezoLBz/QQqEFIZH93FuzZJu8A== X-Received: by 2002:a02:cd12:: with SMTP id g18mr5832868jaq.76.1576111710754; Wed, 11 Dec 2019 16:48:30 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:30 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 16/35] common: Move type declarations to linux/types.h Date: Wed, 11 Dec 2019 17:47:35 -0700 Message-Id: <20191212004755.11091-10-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Stefan Agner , Boris Brezillon , Heinrich Schuchardt , Joe Hershberger Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This file already has lots of type declarations so it seems better to put all of them there. Move them. Signed-off-by: Simon Glass --- include/common.h | 5 ----- include/linux/types.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/common.h b/include/common.h index 7bb18c572e..4ee14f78d0 100644 --- a/include/common.h +++ b/include/common.h @@ -15,11 +15,6 @@ #ifndef __ASSEMBLY__ /* put C only stuff in this section */ -typedef unsigned char uchar; -typedef volatile unsigned long vu_long; -typedef volatile unsigned short vu_short; -typedef volatile unsigned char vu_char; - #include #include #include diff --git a/include/linux/types.h b/include/linux/types.h index bd912bcb42..78dfa14ae8 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -163,4 +163,9 @@ struct ustat { #define DECLARE_BITMAP(name, bits) \ unsigned long name[BITS_TO_LONGS(bits)] +typedef unsigned char uchar; +typedef volatile unsigned long vu_long; +typedef volatile unsigned short vu_short; +typedef volatile unsigned char vu_char; + #endif /* _LINUX_TYPES_H */ From patchwork Thu Dec 12 00:47: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: 1208053 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Pnk2ypou"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFb86DFQz9sR7 for ; Thu, 12 Dec 2019 11:50:44 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DEFAD816B5; Thu, 12 Dec 2019 01:48:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Pnk2ypou"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D83581682; Thu, 12 Dec 2019 01:48:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 02624814D5 for ; Thu, 12 Dec 2019 01:48:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id s25so880714iob.0 for ; Wed, 11 Dec 2019 16:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xQHWURsBUOA33PKpcN6y3bwgF2WNf503qugsYCd7uoQ=; b=Pnk2ypouXydHjurqlzIKXclGWMRM/7DpXmXlNL+f/FY0LzxhXVwncFfucI5/9LlPcK UyYll8A0GU5eNCh1RsK5Lr+epsLHy2VMGJa+iDAJHbscjwFquuifB1uFaPbA5sxQ5/re PetFbhsJF25X6J/DwaUxGc4Jn5ZILUJ47tr6A= 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=xQHWURsBUOA33PKpcN6y3bwgF2WNf503qugsYCd7uoQ=; b=SH84D+tr8RB2IF0VZRumOjmtTP8EuB+8fE0WwfDP0T9hBo1pefYWmvx7XZ9sn1at70 KVhOxhDFEPwAg+x6bXuA2J6Z3zQdxDGgWIbnSWLKYIT62PBIAsbGJwfbn1xqwrYZhwil cMbR7SZhdiyiwrxFy2avjCQrbzFvYsUmMkjDuPHguEdW+yEOEw/ytLRJJtBTj5SfFs5t gzjSLuaUeaEDwMqWEll4FESret88mobODY4hCftzX8QxvhUtynyw8tgNA+2wlnu6mhdO XYxgjWGCKc/TXcwnyz1CrSMZ0nwisJ7+2L+OsYknu+OmKKCEwpC8x0+F06H/qf9tqsU5 8laQ== X-Gm-Message-State: APjAAAVeTJRKTApZJ9x/COnTdbiqaak5vHzV+0Oj9BHK0p3KLpMGHnGl dcp1A03fHBDS8BVONZH46qg/WJQTKPY= X-Google-Smtp-Source: APXvYqwx15npmOatOd+Hz+vSN9ifn3pAnrjo9ioIBlnMV6PXkiLq9auL+71i91CwZEN2wGLBK1LwNg== X-Received: by 2002:a6b:17c4:: with SMTP id 187mr928078iox.151.1576111715493; Wed, 11 Dec 2019 16:48:35 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:35 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 17/35] common: Move device-tree setup functions to fdt_support.h Date: Wed, 11 Dec 2019 17:47:36 -0700 Message-Id: <20191212004755.11091-11-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bhaskar Upadhaya , Joe Hershberger , Miquel Raynal , Andy Fleming , Tom Rini , Sumit Garg , Feng Li , Alison Wang , Boris Brezillon , Reinhard Arlt , Paul Gortmaker , Valentin Longchamp , Holger Brunck Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These functions relate to setting up the device tree for booting the OS. The fdt_support.h header file supports similar functions, so move these there. Signed-off-by: Simon Glass --- arch/riscv/lib/bootm.c | 1 + board/esd/vme8349/vme8349.c | 1 + board/freescale/b4860qds/b4860qds.c | 1 + board/freescale/corenet_ds/corenet_ds.c | 1 + board/freescale/ls1012afrdm/ls1012afrdm.c | 1 + board/freescale/ls1012ardb/ls1012ardb.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/mpc8323erdb/mpc8323erdb.c | 1 + board/freescale/mpc832xemds/mpc832xemds.c | 1 + board/freescale/mpc8349emds/mpc8349emds.c | 1 + board/freescale/mpc8349itx/mpc8349itx.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/hisilicon/hikey/hikey.c | 1 + board/ids/ids8313/ids8313.c | 1 + board/keymile/km83xx/km83xx.c | 1 + board/keymile/kmp204x/kmp204x.c | 1 + board/sbc8349/sbc8349.c | 1 + board/ti/am43xx/board.c | 1 + board/ti/am57xx/board.c | 1 + board/ti/dra7xx/evm.c | 1 + board/tqc/tqm834x/tqm834x.c | 1 + board/varisys/cyrus/cyrus.c | 1 + board/ve8313/ve8313.c | 1 + include/common.h | 12 ------------ include/fdt_support.h | 14 ++++++++++++++ 38 files changed, 50 insertions(+), 12 deletions(-) diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index e96137a50c..d1d1573c62 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c index 4c220fa8e1..49d085acf9 100644 --- a/board/esd/vme8349/vme8349.c +++ b/board/esd/vme8349/vme8349.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 45650b4f08..e7f684bfb3 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c index c2fa60e321..66eea32e07 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/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index 31e41ce169..d138c9384e 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index e4527c19b8..90c1824e46 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index eda5cc7a9e..8de13c88f6 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 3efdbe9a69..377f4b7bce 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c index 8039fd55f4..532ca89d94 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 c4ff6775c3..3f09c5150c 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 55a3529296..1445d29bad 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -6,6 +6,7 @@ */ #include +#include #include #if defined(CONFIG_OF_LIBFDT) #include diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index 6c47cb2b38..e513d0bfd5 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index c9f2ac44a6..d4922fe1e1 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/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c index 913b5843e9..0996b87c0f 100644 --- a/board/freescale/mpc8349emds/mpc8349emds.c +++ b/board/freescale/mpc8349emds/mpc8349emds.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c index 81b3f00b56..a2e284f1a2 100644 --- a/board/freescale/mpc8349itx/mpc8349itx.c +++ b/board/freescale/mpc8349itx/mpc8349itx.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index 78f89fc4cb..95ed0ef429 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 85f8517d79..e42337e47a 100644 --- a/board/freescale/t102xqds/t102xqds.c +++ b/board/freescale/t102xqds/t102xqds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index ab07c1f8dd..eee09a5701 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index 61dedf4c06..92dd9237ec 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index 7dacd0c5f1..dc3b59d26f 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c index 6c34db4219..79cc1543f9 100644 --- a/board/freescale/t208xqds/t208xqds.c +++ b/board/freescale/t208xqds/t208xqds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index 3ac61f009c..b5c20112d0 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c index da050bf800..104b40a110 100644 --- a/board/freescale/t4qds/t4240emu.c +++ b/board/freescale/t4qds/t4240emu.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index 11f7489fa2..5608774afd 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index 48aa6b6822..8015666ecc 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index 940ae82c45..28f5cf7fc4 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c index caa36064f0..2b6e4df86f 100644 --- a/board/ids/ids8313/ids8313.c +++ b/board/ids/ids8313/ids8313.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index abbf985eb2..ff7e908f82 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/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index ae9653db78..d61887c665 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/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c index a647de6b11..9051392cd0 100644 --- a/board/sbc8349/sbc8349.c +++ b/board/sbc8349/sbc8349.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index d12f1ebfdf..36f86926bc 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 c755821b74..c57473c802 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 79b8363b86..94001a4dc3 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/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c index 04941b26be..95f95a5c82 100644 --- a/board/tqc/tqm834x/tqm834x.c +++ b/board/tqc/tqm834x/tqm834x.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c index 0515ebbad2..13429072c7 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/ve8313/ve8313.c b/board/ve8313/ve8313.c index 781a07f1d8..2ea762ccfa 100644 --- a/board/ve8313/ve8313.c +++ b/board/ve8313/ve8313.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 4ee14f78d0..463eeb5d43 100644 --- a/include/common.h +++ b/include/common.h @@ -59,16 +59,6 @@ void hang (void) __attribute__ ((noreturn)); #include -/** - * arch_fixup_fdt() - Write arch-specific information to fdt - * - * Defined in arch/$(ARCH)/lib/bootm-fdt.c - * - * @blob: FDT blob to write to - * @return 0 if ok, or -ve FDT_ERR_... on failure - */ -int arch_fixup_fdt(void *blob); - /* common/cmd_source.c */ int source (ulong addr, const char *fit_uname); @@ -90,8 +80,6 @@ void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_misc (void); void reset_cpu (ulong addr); -void ft_cpu_setup(void *blob, bd_t *bd); -void ft_pci_setup(void *blob, bd_t *bd); /* $(CPU)/speed.c */ int get_clocks (void); diff --git a/include/fdt_support.h b/include/fdt_support.h index 2286ea7793..6c04c52eec 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -11,6 +11,20 @@ #include +/** + * arch_fixup_fdt() - Write arch-specific information to fdt + * + * Defined in arch/$(ARCH)/lib/bootm-fdt.c + * + * @blob: FDT blob to write to + * @return 0 if ok, or -ve FDT_ERR_... on failure + */ +int arch_fixup_fdt(void *blob); + +void ft_cpu_setup(void *blob, bd_t *bd); + +void ft_pci_setup(void *blob, bd_t *bd); + u32 fdt_getprop_u32_default_node(const void *fdt, int off, int cell, const char *prop, const u32 dflt); u32 fdt_getprop_u32_default(const void *fdt, const char *path, From patchwork Thu Dec 12 00:47: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: 1208052 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IK3OplXZ"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFZy41Mvz9sRm for ; Thu, 12 Dec 2019 11:50:34 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 62889816B4; Thu, 12 Dec 2019 01:48:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IK3OplXZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 745A5816A5; Thu, 12 Dec 2019 01:48:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 076008161D for ; Thu, 12 Dec 2019 01:48:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd43.google.com with SMTP id z193so876804iof.1 for ; Wed, 11 Dec 2019 16:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qFO0UhUH0d0faVHvYAcX9aBJDNONhUKU/u7HiIE2OlU=; b=IK3OplXZpRtVnNkXvTV5uQ55b3GO47HgfTN8Drb3aOc0oOnBRO9AKNT6B4xxQo+9rp fzqFrp6g3brdWTSFj9ucD8JsBzEWghMdOjmoYtgc68tBVFPH6b9vHc3mpxSz7Qs8qjI6 h361vvyYuGcn1wR0y9V8z68V3uMhV+sN9Cw/8= 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=qFO0UhUH0d0faVHvYAcX9aBJDNONhUKU/u7HiIE2OlU=; b=PPHfwD2NyAE+swZ/vp2npVR70HtnyF9GQLwTGmUSpvTxH7XD89aVzZbGHdrVH9cLij 1RgIsWz1sNFoz2ouh/ttRLTcQU0Ud/srrsf8JXWMg+cpF+VQotSRrylyDn0obkVJpuA2 Y6X+mLlAULGJhc2PFUiJKvYbBIUrakmR+Gqf0W8x15WzttdtGB65AmdqGTlZoCjM32Yu naWCS9fGXeqIyHSQX+yLES2kVBhSd9h9MZ56GzucL88FvUNpzyW/T+nzoQRskMqdsy9X hNf4eN6Xkhm9RLQ8dZeJXMm33bnwQcUSWez6oCn2QEdbDkEGqIsB5kZhEP6q+TsbCKif pqwg== X-Gm-Message-State: APjAAAXRop/Bx5VhHaqGx63BaWRigjV4F9KtzO0SJiKPoYNoTkun9cv9 /Z46WKak96WOv7CzgJ7NcKkAqETpbw4= X-Google-Smtp-Source: APXvYqzyLvdis51pWpDbETeE6FVvnE4BCIr4nKWuik3BodUXUmZPdTj07eJC0jnaUJeCRyHXxJvleQ== X-Received: by 2002:a6b:b9c6:: with SMTP id j189mr921372iof.147.1576111716832; Wed, 11 Dec 2019 16:48:36 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:36 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 18/35] common: arm: Move s_init() to an ARM-specific header Date: Wed, 11 Dec 2019 17:47:37 -0700 Message-Id: <20191212004755.11091-12-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Albert Aribaud , Boris Brezillon , Joe Hershberger Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function is only used on ARM devices so does not belong in the global common header file. Move it to an ARM header. Signed-off-by: Simon Glass --- arch/arm/include/asm/u-boot-arm.h | 2 ++ include/common.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h index 2e8c8e53d7..62cb5b4a98 100644 --- a/arch/arm/include/asm/u-boot-arm.h +++ b/arch/arm/include/asm/u-boot-arm.h @@ -23,6 +23,8 @@ extern ulong _datarellocal_start_ofs; extern ulong _datarelro_start_ofs; extern ulong IRQ_STACK_START_IN; /* 8 bytes in IRQ stack */ +void s_init(void); + /* cpu/.../cpu.c */ int cleanup_before_linux(void); diff --git a/include/common.h b/include/common.h index 463eeb5d43..f38dc2ef3f 100644 --- a/include/common.h +++ b/include/common.h @@ -74,8 +74,6 @@ phys_size_t get_effective_memsize(void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -void s_init(void); - void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_misc (void); From patchwork Thu Dec 12 00:47: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: 1208055 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="bUcL/kld"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFbW0yYdz9sR7 for ; Thu, 12 Dec 2019 11:51:03 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8232F816D6; Thu, 12 Dec 2019 01:48:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="bUcL/kld"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE82D816AC; Thu, 12 Dec 2019 01:48:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AFF6381678 for ; Thu, 12 Dec 2019 01:48:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id z90so495839ilc.8 for ; Wed, 11 Dec 2019 16:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VTPnIkUgH9kLk7l+BbjXAShxlvSyaBUMpZr5HxfTCNA=; b=bUcL/kldGmlZVZSFlUIYBwoVU7CkcbeHQQRqA6CB3I+QxDMLW/eVRqzz9+Iyhs19Xo yQKhB+h9hDJZtY6AcbI4sJHBOI/4pww1fBUrzx/x4bmz+dU3SahbwDfU9t7eySKtWv62 c5ekU5Yitp0rrmnfEjaHzmqmsDUeg7q4RdwfA= 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=VTPnIkUgH9kLk7l+BbjXAShxlvSyaBUMpZr5HxfTCNA=; b=E0KjyqFlyLHBv82Y3wh5dPYdEmXj4o6QdzxS5XAxmZkVd0EBjEQYPEDYYSmPrEyjkM SICw54fMJsrc3mSmC9RKc2qm1Q/84xd19qiJiJsT8RJwLso2y7QW4UjGbWbYvN+d5TL3 AF5514PQVMP2Ys77xRHDGINTbZtd6q/xVe3HRI8fnQa1yrusNpCqVhF667lGXn6gdWmJ MhuMninLZ8CE0em2SuFckLhp2yqQGaHTc3zJdXU/gWAHCopbOK40omkuyWcw/mZhmWiZ 5oyCBfkGDAmz54Drcc1Dn4FUM7zhrzp58AnMWDV/a+zJer6e7UhMA03L1GAjXg2v0W9c Byvg== X-Gm-Message-State: APjAAAWB2m6liahD3lmvJABDtddSxjnuSoEl40zlpWyld9RlRZPnk5fI J4wAil4FvL346TZND0pqvPQw8hC4g2g= X-Google-Smtp-Source: APXvYqxMOIpDns6KR1Hv17Pa2Ub6ucGdXdgf4cVAZG+4L6EJYcTh88P9n6O9BHW+WOZ61nRBxdpqaA== X-Received: by 2002:a92:9959:: with SMTP id p86mr5600037ili.124.1576111718412; Wed, 11 Dec 2019 16:48:38 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:38 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 19/35] common: Move ll_boot_init() to init.h Date: Wed, 11 Dec 2019 17:47:38 -0700 Message-Id: <20191211174637.19.I8dc4586331fffbc0ebe09b18e2cc2ac5cc63ba34@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Joe Hershberger , Vagrant Cascadian , Heinrich Schuchardt , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This is an init-related function so belongs in that file. Move it. Signed-off-by: Simon Glass --- arch/x86/cpu/baytrail/cpu.c | 1 + arch/x86/cpu/baytrail/valleyview.c | 1 + arch/x86/cpu/cpu.c | 1 + arch/x86/cpu/i386/cpu.c | 1 + arch/x86/cpu/i386/interrupt.c | 1 + drivers/pci/pci_rom.c | 1 + drivers/video/broadwell_igd.c | 1 + include/common.h | 7 ------- include/init.h | 7 +++++++ 9 files changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/x86/cpu/baytrail/cpu.c b/arch/x86/cpu/baytrail/cpu.c index 9394eab956..a9cfcedd81 100644 --- a/arch/x86/cpu/baytrail/cpu.c +++ b/arch/x86/cpu/baytrail/cpu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c index 8882a76eae..f2e48f401f 100644 --- a/arch/x86/cpu/baytrail/valleyview.c +++ b/arch/x86/cpu/baytrail/valleyview.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 4e59476fc9..068213865b 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index c66382bdd2..0a6cc11c6b 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index 78aa51a3ea..991cf5c56b 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/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 1d4064e376..90f224b045 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c index e6df037cb9..c23421d25b 100644 --- a/drivers/video/broadwell_igd.c +++ b/drivers/video/broadwell_igd.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index f38dc2ef3f..a971f75f8b 100644 --- a/include/common.h +++ b/include/common.h @@ -114,13 +114,6 @@ int get_serial_clock(void); offsetof(struct structure, member) == offset, \ "`struct " #structure "` offset for `" #member "` is not " #offset) -/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ -#ifdef CONFIG_EFI_STUB -#define ll_boot_init() false -#else -#define ll_boot_init() true -#endif - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include diff --git a/include/init.h b/include/init.h index 3adc382376..ba0d4bc973 100644 --- a/include/init.h +++ b/include/init.h @@ -16,6 +16,13 @@ struct global_data; #ifndef __ASSEMBLY__ /* put C only stuff in this section */ +/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ +#ifdef CONFIG_EFI_STUB +#define ll_boot_init() false +#else +#define ll_boot_init() true +#endif + /* * Function Prototypes */ From patchwork Thu Dec 12 00:47: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: 1208054 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fYtWHCgu"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFbK6Q6Tz9sR7 for ; Thu, 12 Dec 2019 11:50:53 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 70E01816C1; Thu, 12 Dec 2019 01:48:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fYtWHCgu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E500E816AC; Thu, 12 Dec 2019 01:48:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2F56381683 for ; Thu, 12 Dec 2019 01:48:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id u16so486534ilg.10 for ; Wed, 11 Dec 2019 16:48:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TdCUq03agNWAlNKlHwq68O6iOD+kHdYbz4UbHVfn1hA=; b=fYtWHCguVD1wCWi86nF7uOoZjRmrfbQkqeEQrs7llnqb1Ap0U9NiFZ0V/FsqieU+Dy BEen5aVB349uGTGx8Da3giM4CeHjAlTt5FCwwUaZichR1iz/no9+zzZt8DyiVp/j8XIW Gdep34NiMU1SGX+cX8CZ1KDGWwgApPW2JF6+w= 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=TdCUq03agNWAlNKlHwq68O6iOD+kHdYbz4UbHVfn1hA=; b=g1XzF2cF1fEDnmWPbAt0ixhfhrk1jVREC2wIFl9B4cLfMH/w3sB/gQcBC1ENpHQJSA L8XgJti+ZDRF135nJ7Cd8ag8G2lwHZ2/lhxX6HmTI+xnjsC8t73gIILbZ6qgiegyX7Hw 7Z3I5say7Q+z95IYxxRcogxgJfijVTStL/8UDuwHa3nEQXWiEP7DkkgLLDJ5zCSQjSP2 viscirbz4f78Dt4ZqwbDEFlbUiRWHIFQDiuxn0/3BxFtcSwMBwxoCjHPAqz62VhnTdPD 3Odi4Y8upmMQX9z86I57tBHnkKrIMUu8u5DUTwGk1qzlfZHrgDyVhskoetbM+W+6+AB3 ScRw== X-Gm-Message-State: APjAAAWinD70egdaHwOC96jr7PRHBMcaG2frwh4Mm0Y86Hm/J1nDByKG STwYMU2lnc9CbxW3ASOPxGFAFN7393A= X-Google-Smtp-Source: APXvYqyF5OfukOreRVY3T7E2Bq5LhqEKFGlEuXhEfGBrJw1dFSsCixWzRCD+R/QWRvfu83ciSQuOmQ== X-Received: by 2002:a92:8d4e:: with SMTP id s75mr5985090ild.172.1576111719956; Wed, 11 Dec 2019 16:48:39 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:39 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 20/35] common: Move upmconfig() to ppc.h Date: Wed, 11 Dec 2019 17:47:39 -0700 Message-Id: <20191211174637.20.I9706f55e55ff6cc50c4df23598c8a066afc281cc@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Boris Brezillon , Joe Hershberger Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This file is only used by PowerPC so move it to an arch-specific header file. Signed-off-by: Simon Glass --- arch/powerpc/include/asm/ppc.h | 1 + board/socrates/socrates.c | 4 ++-- include/common.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index 5765f6b522..055364c58f 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -121,6 +121,7 @@ void print_reginfo(void); void interrupt_init_cpu(unsigned *); void timer_interrupt_cpu(struct pt_regs *); unsigned long search_exception_table(unsigned long addr); +void upmconfig(uint upm, uint *table, uint size); #endif /* !__ASSEMBLY__ */ diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 5f58b4c21b..f1dec6c6fa 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -165,11 +165,11 @@ void local_bus_init (void) /* Init UPMA for FPGA access */ out_be32 (&lbc->mamr, 0x44440); /* Use a customer-supplied value */ - upmconfig (UPMA, (uint *)UPMTableA, sizeof(UPMTableA)/sizeof(int)); + upmconfig(UPMA, (uint *)UPMTableA, sizeof(UPMTableA) / sizeof(int)); /* Init UPMB for Lime controller access */ out_be32 (&lbc->mbmr, 0x444440); /* Use a customer-supplied value */ - upmconfig (UPMB, (uint *)UPMTableB, sizeof(UPMTableB)/sizeof(int)); + upmconfig(UPMB, (uint *)UPMTableB, sizeof(UPMTableB) / sizeof(int)); } #ifdef CONFIG_BOARD_EARLY_INIT_R diff --git a/include/common.h b/include/common.h index a971f75f8b..1f87070d49 100644 --- a/include/common.h +++ b/include/common.h @@ -74,7 +74,6 @@ phys_size_t get_effective_memsize(void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_misc (void); void reset_cpu (ulong addr); From patchwork Thu Dec 12 00:47: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: 1208133 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="nehg7o4+"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKvF5mMRz9sP6 for ; Thu, 12 Dec 2019 15:04:57 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C9D7814F9; Thu, 12 Dec 2019 05:04:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="nehg7o4+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7CEA7816BB; Thu, 12 Dec 2019 01:48:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 638C58149F for ; Thu, 12 Dec 2019 01:48:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id c16so843627ioh.6 for ; Wed, 11 Dec 2019 16:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q6BExd4vfZR+PyqlHbQyIq7hnF9BSFvB9BECe/nIMLE=; b=nehg7o4+BR+4YczfLWSezlVg6NlrJB6crtQCMCmQdTwDZbM/KoAF6Ih2KlJ3Vr+jF7 5ih+coLvL3AeA7m725wnp98S2oqoQDZRbrZYej1LRHdpwspIa3JSkLne8F4QO+k3nHNT ekuUIiPN6e2W1HhC+4aEnIUhPVN29/6oiqiU0= 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=q6BExd4vfZR+PyqlHbQyIq7hnF9BSFvB9BECe/nIMLE=; b=GnDEBGGAB/XQEbfPBsFHGy/DrzVRFebXrVoNbxziwIwMqNs3djOLqWJ7oQXVlE0uIv zsl7TFHpU61C3SWf62MpuwOF44vi7cpAMJoj4oPd3Sw2U50iy6iAVPpRi5QO2MnvasvI KiljYuviRRRljvNWQN+fjVUzJjoNnHeyrTga+zwCjqD0442AoOMMg+bt87oMEZuoCQwO 8AqromvS1zg/mIQg2vfcxG1G2oJeIBkQgM6NflRF8lMsaejhlIRTR6zmAMVtgy7azUyp ycTmrdVog+zOedrV0scKF8rLX27kIsPaUpGqwRRP5P4E5L5EAnfQNQsVf6ZYKW6kWSVs i15A== X-Gm-Message-State: APjAAAVIJfOVP2gxy7Kv1NAzY9JdNmZPze83Cp+StrkNOy+f8rSU7TaY Y1+bFsF8tXO8/iNbCGiZybngIXrIGCA= X-Google-Smtp-Source: APXvYqzzvmdsFroRE5UGUNWEnmq6MglF4VLJ+RPEgJqtmvdxb30LXWX/VxKcKEPmKzu5TeCFI1Q0vg== X-Received: by 2002:a6b:b846:: with SMTP id i67mr914455iof.124.1576111723489; Wed, 11 Dec 2019 16:48:43 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:42 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 21/35] common: Move clock functions into a new file Date: Wed, 11 Dec 2019 17:47:40 -0700 Message-Id: <20191211174637.21.I65e58ec7a7900f1a2e10e83375297372e378c433@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Eddy_Petri=C8=99or?= , Nikita Kiryanov , Timur Tabi , Pankit Garg , Joe Hershberger , "NXP i.MX U-Boot Team" , Marek Vasut , Tom Rini , Udit Agarwal , Stephen Warren , Angelo Dureghello , Sumit Garg , Heinrich Schuchardt , Jason Liu , Dirk Eibach , Feng Li , Hou Zhiqiang , Huan Wang , Boris Brezillon , Alexander Graf , Oleksandr Zhadan and Michael Durrant , Yinbo Zhu , Christophe Leroy , Ran Wang , Yuantian Tang , Martyn Welch , Po Liu Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by: Simon Glass --- arch/arm/cpu/arm1136/mx35/generic.c | 1 + arch/arm/cpu/arm926ejs/lpc32xx/clk.c | 1 + arch/arm/cpu/arm926ejs/mx25/generic.c | 1 + arch/arm/cpu/armv7/ls102xa/clock.c | 1 + arch/arm/cpu/armv7/ls102xa/fdt.c | 1 + arch/arm/cpu/armv7/vf610/generic.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 1 + .../arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c | 1 + .../arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/soc.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/spl.c | 1 + arch/arm/cpu/armv8/s32v234/generic.c | 1 + arch/arm/mach-imx/mx7/clock.c | 1 + arch/arm/mach-imx/mx7ulp/clock.c | 1 + arch/arm/mach-imx/speed.c | 1 + arch/m68k/cpu/mcf5227x/speed.c | 1 + arch/m68k/cpu/mcf523x/speed.c | 1 + arch/m68k/cpu/mcf52x2/speed.c | 3 ++- arch/m68k/cpu/mcf530x/speed.c | 1 + arch/m68k/cpu/mcf532x/speed.c | 1 + arch/m68k/cpu/mcf5445x/speed.c | 1 + arch/m68k/cpu/mcf547x_8x/speed.c | 1 + arch/mips/mach-ath79/ar933x/clk.c | 1 + arch/mips/mach-ath79/ar934x/clk.c | 1 + arch/mips/mach-ath79/qca953x/clk.c | 1 + arch/mips/mach-ath79/qca956x/clk.c | 1 + arch/powerpc/cpu/mpc83xx/fdt.c | 1 + arch/powerpc/cpu/mpc83xx/speed.c | 1 + arch/powerpc/cpu/mpc83xx/spl_minimal.c | 1 + arch/powerpc/cpu/mpc85xx/fdt.c | 1 + arch/powerpc/cpu/mpc85xx/speed.c | 5 ++--- arch/powerpc/cpu/mpc86xx/speed.c | 1 + arch/powerpc/cpu/mpc8xx/speed.c | 1 + board/Arcturus/ucp1020/spl.c | 1 + board/compulab/cm_fx6/spl.c | 1 + board/freescale/b4860qds/spl.c | 1 + board/freescale/c29xpcie/spl.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/lx2160a/lx2160a.c | 1 + board/freescale/mpc8313erdb/mpc8313erdb.c | 1 + board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c | 1 + board/freescale/p1010rdb/spl.c | 1 + board/freescale/p1022ds/diu.c | 1 + board/freescale/p1022ds/spl.c | 1 + board/freescale/p1_p2_rdb_pc/spl.c | 1 + board/freescale/qemu-ppce500/qemu-ppce500.c | 4 ++-- board/freescale/t102xqds/spl.c | 1 + board/freescale/t102xrdb/spl.c | 1 + board/freescale/t1040qds/diu.c | 1 + board/freescale/t104xrdb/diu.c | 1 + board/freescale/t104xrdb/spl.c | 1 + board/freescale/t208xqds/spl.c | 1 + board/freescale/t208xrdb/spl.c | 1 + board/freescale/t4qds/spl.c | 1 + board/freescale/t4rdb/spl.c | 1 + board/gdsys/p1022/diu.c | 1 + board/kosagi/novena/novena_spl.c | 1 + board/socrates/socrates.c | 1 + common/board_f.c | 1 + drivers/clk/mpc83xx_clk.c | 1 + drivers/net/ag7xxx.c | 1 + drivers/serial/lpc32xx_hsuart.c | 1 + drivers/serial/ns16550.c | 1 + drivers/serial/serial_ar933x.c | 1 + drivers/serial/serial_ns16550.c | 1 + drivers/spi/ath79_spi.c | 1 + include/clock_legacy.h | 14 ++++++++++++++ include/common.h | 5 ----- 71 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 include/clock_legacy.h diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c index a651b8c341..45bf49b5ac 100644 --- a/arch/arm/cpu/arm1136/mx35/generic.c +++ b/arch/arm/cpu/arm1136/mx35/generic.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/clk.c b/arch/arm/cpu/arm926ejs/lpc32xx/clk.c index 5eb630dabe..cb2344d79f 100644 --- a/arch/arm/cpu/arm926ejs/lpc32xx/clk.c +++ b/arch/arm/cpu/arm926ejs/lpc32xx/clk.c @@ -4,6 +4,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 eeb61d0d10..09bda0e339 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/ls102xa/clock.c b/arch/arm/cpu/armv7/ls102xa/clock.c index 7a1053cebb..f3bdb14c07 100644 --- a/arch/arm/cpu/armv7/ls102xa/clock.c +++ b/arch/arm/cpu/armv7/ls102xa/clock.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c index 1aadffff59..16ab8676fe 100644 --- a/arch/arm/cpu/armv7/ls102xa/fdt.c +++ b/arch/arm/cpu/armv7/ls102xa/fdt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index 806c6adf38..6698b821d0 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/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index e993209593..5bad289bfb 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -4,6 +4,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 25e9a495f7..5f845eafab 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 4b047a39c0..69795b0373 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/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 70933a2e03..63e5d6039e 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -5,6 +5,7 @@ */ #include +#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 58a39e1123..c5cc30328e 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/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c index 2c4ea36e07..50ca4198be 100644 --- a/arch/arm/cpu/armv8/s32v234/generic.c +++ b/arch/arm/cpu/armv8/s32v234/generic.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c index 0e08cabb7a..75be4f8ad7 100644 --- a/arch/arm/mach-imx/mx7/clock.c +++ b/arch/arm/mach-imx/mx7/clock.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c index d3365dd411..3c0bcccd0d 100644 --- a/arch/arm/mach-imx/mx7ulp/clock.c +++ b/arch/arm/mach-imx/mx7ulp/clock.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/speed.c b/arch/arm/mach-imx/speed.c index f9e486c7df..e78b1fd71b 100644 --- a/arch/arm/mach-imx/speed.c +++ b/arch/arm/mach-imx/speed.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf5227x/speed.c b/arch/m68k/cpu/mcf5227x/speed.c index f4e53bc82b..207f453480 100644 --- a/arch/m68k/cpu/mcf5227x/speed.c +++ b/arch/m68k/cpu/mcf5227x/speed.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf523x/speed.c b/arch/m68k/cpu/mcf523x/speed.c index a0c1d53e41..2f65ac2318 100644 --- a/arch/m68k/cpu/mcf523x/speed.c +++ b/arch/m68k/cpu/mcf523x/speed.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf52x2/speed.c b/arch/m68k/cpu/mcf52x2/speed.c index 0f274adf45..02ef5d87aa 100644 --- a/arch/m68k/cpu/mcf52x2/speed.c +++ b/arch/m68k/cpu/mcf52x2/speed.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -15,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR; /* get_clocks() fills in gd->cpu_clock and gd->bus_clk */ -int get_clocks (void) +int get_clocks(void) { #if defined(CONFIG_M5208) pll_t *pll = (pll_t *) MMAP_PLL; diff --git a/arch/m68k/cpu/mcf530x/speed.c b/arch/m68k/cpu/mcf530x/speed.c index ae26047780..cf53dfeb15 100644 --- a/arch/m68k/cpu/mcf530x/speed.c +++ b/arch/m68k/cpu/mcf530x/speed.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf532x/speed.c b/arch/m68k/cpu/mcf532x/speed.c index 661abfa887..0f54ea4b6a 100644 --- a/arch/m68k/cpu/mcf532x/speed.c +++ b/arch/m68k/cpu/mcf532x/speed.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf5445x/speed.c b/arch/m68k/cpu/mcf5445x/speed.c index e15e32ebde..eaa3b39bec 100644 --- a/arch/m68k/cpu/mcf5445x/speed.c +++ b/arch/m68k/cpu/mcf5445x/speed.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/m68k/cpu/mcf547x_8x/speed.c b/arch/m68k/cpu/mcf547x_8x/speed.c index 5ba6426c45..bc22560ed2 100644 --- a/arch/m68k/cpu/mcf547x_8x/speed.c +++ b/arch/m68k/cpu/mcf547x_8x/speed.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/arch/mips/mach-ath79/ar933x/clk.c b/arch/mips/mach-ath79/ar933x/clk.c index 7c15c21532..3feb25ce71 100644 --- a/arch/mips/mach-ath79/ar933x/clk.c +++ b/arch/mips/mach-ath79/ar933x/clk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c index a5dace7a99..fc4625d62a 100644 --- a/arch/mips/mach-ath79/ar934x/clk.c +++ b/arch/mips/mach-ath79/ar934x/clk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/mach-ath79/qca953x/clk.c b/arch/mips/mach-ath79/qca953x/clk.c index 7447adef47..d450ad8652 100644 --- a/arch/mips/mach-ath79/qca953x/clk.c +++ b/arch/mips/mach-ath79/qca953x/clk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/mach-ath79/qca956x/clk.c b/arch/mips/mach-ath79/qca956x/clk.c index 33a44cfff4..d71c94e171 100644 --- a/arch/mips/mach-ath79/qca956x/clk.c +++ b/arch/mips/mach-ath79/qca956x/clk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/fdt.c b/arch/powerpc/cpu/mpc83xx/fdt.c index b487e31cc0..5c685353e1 100644 --- a/arch/powerpc/cpu/mpc83xx/fdt.c +++ b/arch/powerpc/cpu/mpc83xx/fdt.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index 93af7f495f..e2fc0b1e8a 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -9,6 +9,7 @@ #ifndef CONFIG_CLK_MPC83XX #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c index 133f7abc31..75b03f3879 100644 --- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c +++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c @@ -4,6 +4,7 @@ */ #include +#include #include #include "lblaw/lblaw.h" diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index db12aefb29..4c3693e840 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index 15b05fcc51..c9fe310710 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -617,8 +617,7 @@ void get_sys_info(sys_info_t *sys_info) #endif } - -int get_clocks (void) +int get_clocks(void) { sys_info_t sys_info; #ifdef CONFIG_ARCH_MPC8544 @@ -700,7 +699,7 @@ int get_clocks (void) * get_bus_freq * return system bus freq in Hz *********************************************/ -ulong get_bus_freq (ulong dummy) +ulong get_bus_freq(ulong dummy) { return gd->bus_clk; } diff --git a/arch/powerpc/cpu/mpc86xx/speed.c b/arch/powerpc/cpu/mpc86xx/speed.c index 434c4f3f43..5001445862 100644 --- a/arch/powerpc/cpu/mpc86xx/speed.c +++ b/arch/powerpc/cpu/mpc86xx/speed.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c index 5a8fc1f200..77d4f8e47f 100644 --- a/arch/powerpc/cpu/mpc8xx/speed.c +++ b/arch/powerpc/cpu/mpc8xx/speed.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index ca02e9eb1b..6a17aeb78e 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index 66186ec853..a406d0046e 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c index a16db9d59a..fe5ce35013 100644 --- a/board/freescale/b4860qds/spl.c +++ b/board/freescale/b4860qds/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c index 9abbfb5dbc..421c2d4b1f 100644 --- a/board/freescale/c29xpcie/spl.c +++ b/board/freescale/c29xpcie/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index 8de13c88f6..b4201e76d1 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 377f4b7bce..b7f8f1d578 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c index 532ca89d94..3876910cbb 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 3f09c5150c..497dce5f0f 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index e5b7fec9a4..7536153433 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 1445d29bad..e5cc824f48 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #if defined(CONFIG_OF_LIBFDT) diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c index b4776c5e46..42b8cab362 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index 240194ad80..159d14b024 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1022ds/diu.c b/board/freescale/p1022ds/diu.c index c6514cf45b..7f7251009c 100644 --- a/board/freescale/p1022ds/diu.c +++ b/board/freescale/p1022ds/diu.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index 81c5bf00e2..39e1bee6f3 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 4ac4756b17..6ed0a816d9 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.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 381d40d67a..b9c7146466 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -323,7 +323,7 @@ void get_sys_info(sys_info_t *sys_info) sys_info->freq_processor[0] = freq; } -int get_clocks (void) +int get_clocks(void) { sys_info_t sys_info; @@ -350,7 +350,7 @@ unsigned long get_tbclk (void) * get_bus_freq * return system bus freq in Hz *********************************************/ -ulong get_bus_freq (ulong dummy) +ulong get_bus_freq(ulong dummy) { sys_info_t sys_info; get_sys_info(&sys_info); diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c index d1dc9f8d63..9f4a43ed56 100644 --- a/board/freescale/t102xqds/spl.c +++ b/board/freescale/t102xqds/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index 0936f28220..aed0721c0d 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t1040qds/diu.c b/board/freescale/t1040qds/diu.c index 804966791c..ab9e922a92 100644 --- a/board/freescale/t1040qds/diu.c +++ b/board/freescale/t1040qds/diu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/diu.c b/board/freescale/t104xrdb/diu.c index aa56b8ea24..25c8597202 100644 --- a/board/freescale/t104xrdb/diu.c +++ b/board/freescale/t104xrdb/diu.c @@ -4,6 +4,7 @@ * Author: Priyanka Jain */ +#include #include #include #include diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index a1c8a47014..2306d0391e 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index fa843ef212..40eb5d30a6 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index f4d68b6706..27e87da409 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c index 4cf7c09943..d72d207a76 100644 --- a/board/freescale/t4qds/spl.c +++ b/board/freescale/t4qds/spl.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index 28b78f3232..5d018c316c 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/diu.c b/board/gdsys/p1022/diu.c index dfccbed763..7e1e6ce85c 100644 --- a/board/gdsys/p1022/diu.c +++ b/board/gdsys/p1022/diu.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c index 7521cacaf9..bc52b91b2f 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/socrates/socrates.c b/board/socrates/socrates.c index f1dec6c6fa..b0ddee7906 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index d66afb37ca..3c6877da33 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c index cbccda5594..6a1fbc0cb5 100644 --- a/drivers/clk/mpc83xx_clk.c +++ b/drivers/clk/mpc83xx_clk.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c index 804d5c20b6..e3a7222efb 100644 --- a/drivers/net/ag7xxx.c +++ b/drivers/net/ag7xxx.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c index 8b0fd254b1..7d31c6d4a1 100644 --- a/drivers/serial/lpc32xx_hsuart.c +++ b/drivers/serial/lpc32xx_hsuart.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 754b6e9921..a92d2b1de8 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -4,6 +4,7 @@ * modified to use CONFIG_SYS_ISA_MEM and new defines */ +#include #include #include #include diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c index 5249c55398..897ea5d6dc 100644 --- a/drivers/serial/serial_ar933x.c +++ b/drivers/serial/serial_ar933x.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index a1069f92a6..ef394b7235 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c index 0b8ebaabe9..f64a28c6e0 100644 --- a/drivers/spi/ath79_spi.c +++ b/drivers/spi/ath79_spi.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/include/clock_legacy.h b/include/clock_legacy.h new file mode 100644 index 0000000000..b0a8333ea6 --- /dev/null +++ b/include/clock_legacy.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __CLOCK_LEGACY_H +#define __CLOCK_LEGACY_H + +int get_clocks(void); +unsigned long get_bus_freq(unsigned long dummy); +int get_serial_clock(void); + +#endif diff --git a/include/common.h b/include/common.h index 1f87070d49..cc3d212a3d 100644 --- a/include/common.h +++ b/include/common.h @@ -78,11 +78,6 @@ ulong get_tbclk (void); void reset_misc (void); void reset_cpu (ulong addr); -/* $(CPU)/speed.c */ -int get_clocks (void); -ulong get_bus_freq (ulong); -int get_serial_clock(void); - /* lib/uuid.c */ #include From patchwork Thu Dec 12 00:47: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: 1208057 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Rtu60vrr"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFbs5H4Kz9sR7 for ; Thu, 12 Dec 2019 11:51:21 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 713A8816FF; Thu, 12 Dec 2019 01:49:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Rtu60vrr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2603D816BF; Thu, 12 Dec 2019 01:48:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F32CA8161D for ; Thu, 12 Dec 2019 01:48:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id f5so516100ilq.5 for ; Wed, 11 Dec 2019 16:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GJczwGt6qUNaJcsXpb4V7d3WN383kMMgrWRlTJ7c1CI=; b=Rtu60vrrtLeDmbUrpMZEDIUENvYWweZUcn4air6KkQmFTJKxYEmu0OxtuFn+SdKtEb Focabl8H1gf3PCuAusJTrBymbnEgIM1mC472DNCvBxfAfvUb3g1DjihqqGxqBC9DbYBu n7RLsIh91Wa6wTnN5WdADnSeuCaiS6rBafKNg= 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=GJczwGt6qUNaJcsXpb4V7d3WN383kMMgrWRlTJ7c1CI=; b=g9EJQsHqQqlcJg1fBA+64fqoE4QXAUcGYJeCy6p42DwDbVTpiqtA2pnjWgc4X1xz58 5dFTRWuVvIjLu31Q6PKJk7d7ZqL7IML8PwDH2hakKFU1JsJfmgfHAdFJmS1YHguXMwGm vC2/X52vxgG6BICNYAcgcSeh2SsKHJxnV6EBK+DKyob3tlhw6cdgLVs7NURrHCSnb502 KFXQVXIhpLc4A+xtfpXcFjgE67AwRUXgphxfZO1cemOcH5uYK9c6F/6nY+Ekv3POiQyR xqKzg5Kw/WHV51/hdEElG3YLIXtRdOt564Hk/o9GpZlFtvt8HYHR77DQMX36YzytT4SG oWzg== X-Gm-Message-State: APjAAAW6qgF8XH152iOf/sD+AE953piM7emdYHEWHgZVfpxE26TsWOQl RcNNO3Tv7zVvo6h2Eh8QvURpIUjb/S4= X-Google-Smtp-Source: APXvYqyzHZl03wMRsDqaDvxKa8WShFw7gKWztedLn/yfRT8kCEp8CW24nADselCjqb6UUuGIiPheJQ== X-Received: by 2002:a92:5a52:: with SMTP id o79mr5991735ilb.201.1576111725437; Wed, 11 Dec 2019 16:48:45 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:44 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 22/35] common: Move get_tbclk() to time.h Date: Wed, 11 Dec 2019 17:47:41 -0700 Message-Id: <20191211174637.22.I752327006892429a8751f27f66b439b3b95c33e7@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , Tom Rini , Joe Hershberger , Heinrich Schuchardt , Michal Simek , Boris Brezillon , Alexander Graf Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by: Simon Glass --- arch/arm/cpu/arm920t/imx/timer.c | 2 +- arch/arm/cpu/arm926ejs/armada100/timer.c | 2 +- arch/arm/cpu/sa1100/timer.c | 2 +- arch/arm/mach-at91/arm926ejs/timer.c | 1 + arch/arm/mach-at91/armv7/timer.c | 1 + arch/arm/mach-orion5x/timer.c | 2 +- arch/arm/mach-versal/clk.c | 1 + arch/arm/mach-zynq/timer.c | 1 + arch/arm/mach-zynqmp/clk.c | 1 + arch/arm/mach-zynqmp/cpu.c | 1 + arch/mips/cpu/time.c | 1 + arch/powerpc/cpu/mpc83xx/cpu.c | 1 + arch/powerpc/cpu/mpc83xx/spd_sdram.c | 1 + arch/powerpc/cpu/mpc83xx/spl_minimal.c | 1 + arch/powerpc/cpu/mpc85xx/cpu.c | 3 ++- arch/powerpc/cpu/mpc85xx/fdt.c | 1 + arch/powerpc/cpu/mpc85xx/interrupts.c | 1 + arch/powerpc/cpu/mpc86xx/cpu.c | 1 + arch/powerpc/cpu/mpc86xx/interrupts.c | 1 + arch/powerpc/cpu/mpc8xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xx/fdt.c | 1 + arch/powerpc/cpu/mpc8xx/interrupts.c | 1 + board/armltd/integrator/timer.c | 2 +- board/freescale/qemu-ppce500/qemu-ppce500.c | 3 ++- drivers/clk/clk_pic32.c | 1 + include/common.h | 1 - include/time.h | 2 ++ 27 files changed, 29 insertions(+), 8 deletions(-) diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c index 17081ddb6d..403cd8ae57 100644 --- a/arch/arm/cpu/arm920t/imx/timer.c +++ b/arch/arm/cpu/arm920t/imx/timer.c @@ -71,7 +71,7 @@ unsigned long long get_ticks(void) * This function is derived from PowerPC code (timebase clock frequency). * On ARM it returns the number of timer ticks per second. */ -ulong get_tbclk (void) +ulong get_tbclk(void) { return CONFIG_SYS_HZ; } diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index 6c6948a8ef..a11a4f3a5b 100644 --- a/arch/arm/cpu/arm926ejs/armada100/timer.c +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c @@ -188,7 +188,7 @@ unsigned long long get_ticks(void) * This function is derived from PowerPC code (timebase clock frequency). * On ARM it returns the number of timer ticks per second. */ -ulong get_tbclk (void) +ulong get_tbclk(void) { return (ulong)CONFIG_SYS_HZ; } diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c index c6b1b2c177..8e20c96bcd 100644 --- a/arch/arm/cpu/sa1100/timer.c +++ b/arch/arm/cpu/sa1100/timer.c @@ -59,7 +59,7 @@ unsigned long long get_ticks(void) * This function is derived from PowerPC code (timebase clock frequency). * On ARM it returns the number of timer ticks per second. */ -ulong get_tbclk (void) +ulong get_tbclk(void) { return CONFIG_SYS_HZ; } diff --git a/arch/arm/mach-at91/arm926ejs/timer.c b/arch/arm/mach-at91/arm926ejs/timer.c index f81e845593..31ad0bf702 100644 --- a/arch/arm/mach-at91/arm926ejs/timer.c +++ b/arch/arm/mach-at91/arm926ejs/timer.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/armv7/timer.c b/arch/arm/mach-at91/armv7/timer.c index 9f08806fb1..15c036cc27 100644 --- a/arch/arm/mach-at91/armv7/timer.c +++ b/arch/arm/mach-at91/armv7/timer.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c index 9da9783822..077eb63e74 100644 --- a/arch/arm/mach-orion5x/timer.c +++ b/arch/arm/mach-orion5x/timer.c @@ -165,7 +165,7 @@ unsigned long long get_ticks(void) * This function is derived from PowerPC code (timebase clock frequency). * On ARM it returns the number of timer ticks per second. */ -ulong get_tbclk (void) +ulong get_tbclk(void) { return (ulong)CONFIG_SYS_HZ; } diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c index b82cea4ccb..9184714e47 100644 --- a/arch/arm/mach-versal/clk.c +++ b/arch/arm/mach-versal/clk.c @@ -5,6 +5,7 @@ */ #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c index 8658abb457..211ea15884 100644 --- a/arch/arm/mach-zynq/timer.c +++ b/arch/arm/mach-zynq/timer.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c index 0593b6310f..db2b4a8be2 100644 --- a/arch/arm/mach-zynqmp/clk.c +++ b/arch/arm/mach-zynqmp/clk.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c index b90d08bbdd..442427bc11 100644 --- a/arch/arm/mach-zynqmp/cpu.c +++ b/arch/arm/mach-zynqmp/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/cpu/time.c b/arch/mips/cpu/time.c index af324f77ce..a1508e3b88 100644 --- a/arch/mips/cpu/time.c +++ b/arch/mips/cpu/time.c @@ -5,6 +5,7 @@ */ #include +#include #include unsigned long notrace timer_read_counter(void) diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index c3e25978a8..f4e25f1f59 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c index a14a438b02..22506a5be5 100644 --- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c +++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c index 75b03f3879..34c8187259 100644 --- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c +++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c @@ -6,6 +6,7 @@ #include #include #include +#include #include "lblaw/lblaw.h" #include "elbc/elbc.h" diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 18556629c3..9f9eed165b 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -332,7 +333,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifndef CONFIG_SYS_FSL_TBCLK_DIV #define CONFIG_SYS_FSL_TBCLK_DIV 8 #endif -__weak unsigned long get_tbclk (void) +__weak unsigned long get_tbclk(void) { unsigned long tbclk_div = CONFIG_SYS_FSL_TBCLK_DIV; diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 4c3693e840..65f909fd1e 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c index e767573193..6f539d2677 100644 --- a/arch/powerpc/cpu/mpc85xx/interrupts.c +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index bb14444a2e..97b93f0213 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index 0f930fcd9e..eb8e73e41c 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #ifdef CONFIG_POST #include diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 0604433e72..4a1698d3bc 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/fdt.c b/arch/powerpc/cpu/mpc8xx/fdt.c index 55c6588249..4719de4d72 100644 --- a/arch/powerpc/cpu/mpc8xx/fdt.c +++ b/arch/powerpc/cpu/mpc8xx/fdt.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c index 6ee6088fa8..3efe8956ec 100644 --- a/arch/powerpc/cpu/mpc8xx/interrupts.c +++ b/arch/powerpc/cpu/mpc8xx/interrupts.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c index e65ae997fd..d701669be0 100644 --- a/board/armltd/integrator/timer.c +++ b/board/armltd/integrator/timer.c @@ -153,7 +153,7 @@ unsigned long long get_ticks(void) * Return the timebase clock frequency * i.e. how often the timer decrements */ -ulong get_tbclk (void) +ulong get_tbclk(void) { unsigned long long tmp = CONFIG_SYS_HZ_CLOCK; diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index b9c7146466..e804cfe986 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -337,7 +338,7 @@ int get_clocks(void) return 0; } -unsigned long get_tbclk (void) +unsigned long get_tbclk(void) { void *fdt = get_fdt_virt(); int cpus_node = fdt_path_offset(fdt, "/cpus"); diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c index b3ac0d5a92..79469c454f 100644 --- a/drivers/clk/clk_pic32.c +++ b/drivers/clk/clk_pic32.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index cc3d212a3d..1d85e5a68c 100644 --- a/include/common.h +++ b/include/common.h @@ -74,7 +74,6 @@ phys_size_t get_effective_memsize(void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -ulong get_tbclk (void); void reset_misc (void); void reset_cpu (ulong addr); diff --git a/include/time.h b/include/time.h index 71446c3171..e99f9c8012 100644 --- a/include/time.h +++ b/include/time.h @@ -6,6 +6,8 @@ #include #include +ulong get_tbclk(void); + unsigned long get_timer(unsigned long base); /* From patchwork Thu Dec 12 00:47: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: 1208056 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HmbAW73/"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFbh5MD7z9sR7 for ; Thu, 12 Dec 2019 11:51:12 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C8F52814D8; Thu, 12 Dec 2019 01:49:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HmbAW73/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D29B9816B4; Thu, 12 Dec 2019 01:48:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F0E8C816AC for ; Thu, 12 Dec 2019 01:48:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id v3so850252ioj.5 for ; Wed, 11 Dec 2019 16:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ef+KBpbOktKI2xrEsrATszN/m0SAx53+8Mczqny4jNw=; b=HmbAW73/Xoi6ipiEZMlBLv5olw45kCfgYRb731YS3u8hPEJe/IiO49eqtLvhNsW9we iaAlAIbLPDI2OuP7iCD/n25SACovLrbwOfr777gFWjS3uGHhYqBXAtkM1a4Jja+YwtQs OG/1YpDe5BL6HiKQF7ZaBz1VoZS+xaKxP7brE= 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=Ef+KBpbOktKI2xrEsrATszN/m0SAx53+8Mczqny4jNw=; b=nstSkj2Cu08SxQCj8Oc75s97kMmlX9TIscHxwUOCFZzizfV+90Wcm4jVdjQJDukWlU PhrbQGLBHo6cIP1m/+SdUByppVzFrm1D3xTvEIqIn3v5rHVAwLjWNvB/9+pGsnc2Lr9y vEcZVhTZZ9cAchU50MOdA7IgNUjT7H8RLrFT3i2/+O29/nhlsBbLmy7RwoXARoRnRohU 430WBcBzDaC1+z2RJSzD5z42sBuU4m9SaPavhggW8/NIpRMKkQhacihcb/gU30X1Wc3n 6hrSLgsyLzrMhqw4+eJ5TgwmaTLgBE1MHvRP16yJQkvB+JFK30wVf7AYOSR0VMJXUNND QLtA== X-Gm-Message-State: APjAAAVbVhpsTjcS2/RUfk4/ppDB5idwgP9g3ydy0d2yb5TbWLKbHbvz EA/rzuZHE8Ft9ODee/FxTZNatBKYU84= X-Google-Smtp-Source: APXvYqwyCcX4ho+lBH58OTVxUN0O0vjP9eiaPWNgVMmL2ZXKaFZRf6y/kpIQfvDdSI6olRPjGtflXA== X-Received: by 2002:a6b:f808:: with SMTP id o8mr294424ioh.201.1576111726760; Wed, 11 Dec 2019 16:48:46 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:46 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 23/35] common: Move reset_misc() function to arch header Date: Wed, 11 Dec 2019 17:47:42 -0700 Message-Id: <20191212004755.11091-13-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function is only used on ARM devices. Move it out of the common file and to a arch-specific header. Signed-off-by: Simon Glass --- arch/arm/include/asm/u-boot-arm.h | 2 ++ include/common.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h index 62cb5b4a98..0b93cc48c5 100644 --- a/arch/arm/include/asm/u-boot-arm.h +++ b/arch/arm/include/asm/u-boot-arm.h @@ -54,6 +54,8 @@ void do_fiq(struct pt_regs *pt_regs); void do_irq(struct pt_regs *pt_regswq); #endif +void reset_misc(void); + #endif /* __ASSEMBLY__ */ #endif /* _U_BOOT_ARM_H_ */ diff --git a/include/common.h b/include/common.h index 1d85e5a68c..cf33b31499 100644 --- a/include/common.h +++ b/include/common.h @@ -74,7 +74,6 @@ phys_size_t get_effective_memsize(void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -void reset_misc (void); void reset_cpu (ulong addr); /* lib/uuid.c */ From patchwork Thu Dec 12 00:47: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: 1208135 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XPSFzGoK"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKvT58gjz9sP6 for ; Thu, 12 Dec 2019 15:05:09 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B11588164C; Thu, 12 Dec 2019 05:04:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XPSFzGoK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DA713816D1; Thu, 12 Dec 2019 01:48:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A1A7E8149F for ; Thu, 12 Dec 2019 01:48:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id b15so525923iln.3 for ; Wed, 11 Dec 2019 16:48:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5BTRd9TGvrzhYEbyAQpguxlLavymbvcg4GVMkqjP01M=; b=XPSFzGoKabQTle2X2H1AWqNWYXsvFa9qABx0P0IpULAVGBNxheKMHDt3c9N6g/3KdM bNemOpqr9veyUVMF86rpQvDH/QFzRtygsYREg9wpr/h0i7Aik3JDu3Xi03YnWo8n3RvT 09p6pYLQ7BrDj6fnS7GLTNGo9EnE2UpjxKX3w= 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=5BTRd9TGvrzhYEbyAQpguxlLavymbvcg4GVMkqjP01M=; b=ntWMIh48pq5lG4uTnbPzoIT1FdcMzGGxYAzCQJS1WCcJrZZdr+TIAqkuaTpfDxAwIr YTqjm683aix1ZYkFVdmjD291PQwg804CD8EjhBWwB3pYNJ5PbG5mfwigjXQRzIvrUFix +k4YDNM+aWW9k/j0GyVB97+pQXMwXA5JddcJpq/ckMDiXmOuyEDuldMLhVsbswx4ddhW 1+6aAT1jHwpcUtf7Gs/j8DEdc5H9PupTgb+tl2EEKWcYMMH8NdvGBOSpkNtGTxs1lzOO 6+vR12dzcekhhxK0agz+S379TYhBuXp3SmikqVGbmHZFfqyPbcFpvdFcrmRjQswxGf4t l3xA== X-Gm-Message-State: APjAAAUYUIoYdtmNVcfikyAex/pjjW+6nSUUUXO7ppg9Cw8Twihh6qKv QnGzaC0gxTNALSU4BCILmbLHzYtA+OU= X-Google-Smtp-Source: APXvYqw70u6QUC/DrDDDA7WLGmSrZfv8AvmkiVgEX3Ek+6p7lST9TU5k7AsMlVxzmmp5oHvrv+3dow== X-Received: by 2002:a92:15c1:: with SMTP id 62mr5790708ilv.216.1576111729469; Wed, 11 Dec 2019 16:48:49 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:48 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 24/35] common: Move reset_cpu() to the CPU header Date: Wed, 11 Dec 2019 17:47:43 -0700 Message-Id: <20191212004755.11091-14-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Feng , =?utf-8?q?Eddy_Petri=C8=99or?= , Bai Ping , Marcel Ziswiler , "Cogent Embedded, Inc." , liuhao , Max Krummenacher , Manivannan Sadhasivam , Stefan Roese , Michal Simek , Marek Vasut , Tom Rini , Ryder Lee , Otavio Salvador , Vanessa Maegima , Heinrich Schuchardt , Robert Hancock , Richard Hu , Eugeniy Paltsev , "NXP i.MX U-Boot Team" , Tetsuyuki Kobayashi , Alexey Brodkin , Nobuhiro Iwamatsu , u-boot-amlogic@groups.io, Eric Nelson , Oliver Graute , Jon Mason , Boris Brezillon , Alexander Graf , Igor Grinberg , Jorge Ramirez-Ortiz , uboot-snps-arc@synopsys.com, Matthias Brugger , shuyiqi , Stefan Agner , Sergey Temerkhanov , Joe Hershberger , Tom Warren , Masakazu Mochizuki , GSS_MTK_Uboot_upstream , Xiaoliang Yang Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass --- arch/arc/lib/reset.c | 1 + arch/arm/cpu/arm920t/ep93xx/cpu.c | 1 + arch/arm/cpu/arm920t/imx/timer.c | 3 ++- arch/arm/cpu/arm926ejs/armada100/timer.c | 3 ++- arch/arm/cpu/arm926ejs/mx25/reset.c | 1 + arch/arm/cpu/arm926ejs/mx27/reset.c | 1 + arch/arm/cpu/arm926ejs/mxs/mxs.c | 1 + arch/arm/cpu/arm926ejs/spear/reset.c | 1 + arch/arm/cpu/armv7/bcm281xx/reset.c | 1 + arch/arm/cpu/armv7/bcmcygnus/reset.c | 1 + arch/arm/cpu/armv7/bcmnsp/reset.c | 1 + arch/arm/cpu/armv7/stv0991/reset.c | 1 + arch/arm/cpu/armv8/s32v234/generic.c | 1 + arch/arm/lib/interrupts.c | 3 ++- arch/arm/lib/interrupts_m.c | 1 + arch/arm/lib/reset.c | 1 + arch/arm/mach-at91/arm920t/reset.c | 1 + arch/arm/mach-at91/arm926ejs/reset.c | 1 + arch/arm/mach-at91/armv7/reset.c | 1 + arch/arm/mach-bcm283x/reset.c | 1 + arch/arm/mach-davinci/reset.c | 1 + arch/arm/mach-imx/mx7ulp/soc.c | 1 + arch/arm/mach-k3/common.c | 1 + arch/arm/mach-keystone/ddr3.c | 1 + arch/arm/mach-kirkwood/cpu.c | 1 + arch/arm/mach-mediatek/mt8516/init.c | 1 + arch/arm/mach-mediatek/mt8518/init.c | 1 + arch/arm/mach-meson/board-common.c | 1 + arch/arm/mach-mvebu/armada3700/cpu.c | 1 + arch/arm/mach-omap2/omap5/hwinit.c | 1 + arch/arm/mach-omap2/reset.c | 1 + arch/arm/mach-socfpga/misc_gen5.c | 1 + arch/arm/mach-tegra/cmd_enterrcm.c | 1 + arch/arm/mach-tegra/pmc.c | 1 + arch/arm/mach-uniphier/reset.c | 1 + arch/arm/mach-zynqmp-r5/cpu.c | 1 + arch/nds32/lib/interrupts.c | 1 + arch/sh/cpu/sh4/cpu.c | 2 +- arch/sh/cpu/sh4/watchdog.c | 1 + board/BuR/brppt2/board.c | 1 + board/abilis/tb100/tb100.c | 1 + board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c | 1 + board/armltd/vexpress64/vexpress64.c | 1 + board/atmark-techno/armadillo-800eva/armadillo-800eva.c | 1 + board/bosch/shc/board.c | 1 + board/broadcom/bcmns2/northstar2.c | 1 + board/cavium/thunderx/thunderx.c | 1 + board/compulab/cm_t335/spl.c | 1 + board/freescale/imx8mm_evk/spl.c | 1 + board/freescale/imx8mn_evk/spl.c | 1 + board/freescale/imx8qm_mek/imx8qm_mek.c | 1 + board/freescale/imx8qxp_mek/imx8qxp_mek.c | 1 + board/freescale/mx6memcal/spl.c | 1 + board/hisilicon/hikey/hikey.c | 1 + board/hisilicon/hikey960/hikey960.c | 1 + board/hisilicon/poplar/poplar.c | 1 + board/kmc/kzm9g/kzm9g.c | 1 + board/liebherr/display5/spl.c | 1 + board/phytium/durian/durian.c | 1 + board/qualcomm/dragonboard410c/dragonboard410c.c | 1 + board/qualcomm/dragonboard820c/dragonboard820c.c | 1 + board/renesas/alt/alt.c | 1 + board/renesas/alt/alt_spl.c | 1 + board/renesas/blanche/blanche.c | 1 + board/renesas/condor/condor.c | 1 + board/renesas/draak/draak.c | 1 + board/renesas/eagle/eagle.c | 1 + board/renesas/ebisu/ebisu.c | 1 + board/renesas/gose/gose.c | 1 + board/renesas/gose/gose_spl.c | 1 + board/renesas/grpeach/grpeach.c | 1 + board/renesas/koelsch/koelsch.c | 1 + board/renesas/koelsch/koelsch_spl.c | 1 + board/renesas/lager/lager.c | 1 + board/renesas/lager/lager_spl.c | 1 + board/renesas/porter/porter.c | 1 + board/renesas/porter/porter_spl.c | 1 + board/renesas/rcar-common/gen3-spl.c | 1 + board/renesas/salvator-x/salvator-x.c | 1 + board/renesas/silk/silk.c | 1 + board/renesas/silk/silk_spl.c | 1 + board/renesas/stout/cpld.c | 1 + board/renesas/stout/stout_spl.c | 1 + board/synopsys/emsdp/emsdp.c | 1 + board/synopsys/iot_devkit/iot_devkit.c | 1 + board/technexion/pico-imx6ul/spl.c | 1 + board/technexion/pico-imx7d/spl.c | 1 + board/toradex/apalis-imx8/apalis-imx8.c | 1 + board/toradex/apalis_imx6/apalis_imx6.c | 1 + board/toradex/colibri-imx8x/colibri-imx8x.c | 1 + board/toradex/colibri_imx6/colibri_imx6.c | 1 + board/toradex/colibri_imx7/colibri_imx7.c | 1 + board/ucRobotics/bubblegum_96/bubblegum_96.c | 1 + board/xilinx/versal/board.c | 1 + cmd/tpm_test.c | 1 + drivers/sysreset/sysreset-uclass.c | 1 + drivers/watchdog/imx_watchdog.c | 1 + drivers/watchdog/ulp_wdog.c | 1 + include/common.h | 2 -- include/cpu_func.h | 2 ++ lib/efi/efi_app.c | 1 + 101 files changed, 104 insertions(+), 6 deletions(-) diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c index 02e08df48d..30dd4b5238 100644 --- a/arch/arc/lib/reset.c +++ b/arch/arc/lib/reset.c @@ -5,6 +5,7 @@ #include #include +#include __weak void reset_cpu(ulong addr) { diff --git a/arch/arm/cpu/arm920t/ep93xx/cpu.c b/arch/arm/cpu/arm920t/ep93xx/cpu.c index 3aae12f8ad..c9ea4e46a8 100644 --- a/arch/arm/cpu/arm920t/ep93xx/cpu.c +++ b/arch/arm/cpu/arm920t/ep93xx/cpu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c index 403cd8ae57..21129a7901 100644 --- a/arch/arm/cpu/arm920t/imx/timer.c +++ b/arch/arm/cpu/arm920t/imx/timer.c @@ -13,6 +13,7 @@ */ #include +#include #include #if defined (CONFIG_IMX) @@ -79,7 +80,7 @@ ulong get_tbclk(void) /* * Reset the cpu by setting up the watchdog timer and let him time out */ -void reset_cpu (ulong ignored) +void reset_cpu(ulong ignored) { /* Disable watchdog and set Time-Out field to 0 */ WCR = 0x00000000; diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index a11a4f3a5b..f4962ec45f 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 #include @@ -138,7 +139,7 @@ int timer_init(void) * 2. Write key value to TMP_WSAR reg. * 3. Perform write operation. */ -void reset_cpu (unsigned long ignored) +void reset_cpu(unsigned long ignored) { struct armd1mpmu_registers *mpmu = (struct armd1mpmu_registers *) ARMD1_MPMU_BASE; diff --git a/arch/arm/cpu/arm926ejs/mx25/reset.c b/arch/arm/cpu/arm926ejs/mx25/reset.c index 576f7fac6f..38df1c9402 100644 --- a/arch/arm/cpu/arm926ejs/mx25/reset.c +++ b/arch/arm/cpu/arm926ejs/mx25/reset.c @@ -16,6 +16,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/mx27/reset.c b/arch/arm/cpu/arm926ejs/mx27/reset.c index e2437d13c8..320b0a65e7 100644 --- a/arch/arm/cpu/arm926ejs/mx27/reset.c +++ b/arch/arm/cpu/arm926ejs/mx27/reset.c @@ -16,6 +16,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 85c65dcb44..62ad8b8c25 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/spear/reset.c b/arch/arm/cpu/arm926ejs/spear/reset.c index 05c7ecdb49..3b884cd0d3 100644 --- a/arch/arm/cpu/arm926ejs/spear/reset.c +++ b/arch/arm/cpu/arm926ejs/spear/reset.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/bcm281xx/reset.c b/arch/arm/cpu/armv7/bcm281xx/reset.c index fbdeea4de3..fda5a9527e 100644 --- a/arch/arm/cpu/armv7/bcm281xx/reset.c +++ b/arch/arm/cpu/armv7/bcm281xx/reset.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/arch/arm/cpu/armv7/bcmcygnus/reset.c b/arch/arm/cpu/armv7/bcmcygnus/reset.c index 7f3f4055e4..3bfed34533 100644 --- a/arch/arm/cpu/armv7/bcmcygnus/reset.c +++ b/arch/arm/cpu/armv7/bcmcygnus/reset.c @@ -4,6 +4,7 @@ */ #include +#include #include #define CRMU_MAIL_BOX1 0x03024028 diff --git a/arch/arm/cpu/armv7/bcmnsp/reset.c b/arch/arm/cpu/armv7/bcmnsp/reset.c index 674166daab..675f99fe99 100644 --- a/arch/arm/cpu/armv7/bcmnsp/reset.c +++ b/arch/arm/cpu/armv7/bcmnsp/reset.c @@ -4,6 +4,7 @@ */ #include +#include #include #define CRU_RESET_OFFSET 0x1803F184 diff --git a/arch/arm/cpu/armv7/stv0991/reset.c b/arch/arm/cpu/armv7/stv0991/reset.c index d4b3ab7fd8..008e271dcc 100644 --- a/arch/arm/cpu/armv7/stv0991/reset.c +++ b/arch/arm/cpu/armv7/stv0991/reset.c @@ -5,6 +5,7 @@ */ #include +#include #include #include void reset_cpu(ulong ignored) diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c index 50ca4198be..ec4641dcdb 100644 --- a/arch/arm/cpu/armv8/s32v234/generic.c +++ b/arch/arm/cpu/armv8/s32v234/generic.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 75b70d9125..6dbf03b00c 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -48,7 +49,7 @@ int disable_interrupts(void) void bad_mode (void) { panic ("Resetting CPU ...\n"); - reset_cpu (0); + reset_cpu(0); } static void show_efi_loaded_images(struct pt_regs *regs) diff --git a/arch/arm/lib/interrupts_m.c b/arch/arm/lib/interrupts_m.c index e4373f3781..1f6fdf2995 100644 --- a/arch/arm/lib/interrupts_m.c +++ b/arch/arm/lib/interrupts_m.c @@ -5,6 +5,7 @@ */ #include +#include #include /* diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index 3c4512d495..835a40e59d 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -21,6 +21,7 @@ */ #include +#include #include __weak void reset_misc(void) diff --git a/arch/arm/mach-at91/arm920t/reset.c b/arch/arm/mach-at91/arm920t/reset.c index 3164182b69..d92bc57d66 100644 --- a/arch/arm/mach-at91/arm920t/reset.c +++ b/arch/arm/mach-at91/arm920t/reset.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/arm926ejs/reset.c b/arch/arm/mach-at91/arm926ejs/reset.c index 06b25db522..56fbbd991e 100644 --- a/arch/arm/mach-at91/arm926ejs/reset.c +++ b/arch/arm/mach-at91/arm926ejs/reset.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/armv7/reset.c b/arch/arm/mach-at91/armv7/reset.c index c114dafac5..8f4c81d1af 100644 --- a/arch/arm/mach-at91/armv7/reset.c +++ b/arch/arm/mach-at91/armv7/reset.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-bcm283x/reset.c b/arch/arm/mach-bcm283x/reset.c index cd8138d702..2b4ccd4727 100644 --- a/arch/arm/mach-bcm283x/reset.c +++ b/arch/arm/mach-bcm283x/reset.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-davinci/reset.c b/arch/arm/mach-davinci/reset.c index 9fbd09c77b..4e6031a593 100644 --- a/arch/arm/mach-davinci/reset.c +++ b/arch/arm/mach-davinci/reset.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 8345b01398..7f8fdc7005 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-k3/common.c b/arch/arm/mach-k3/common.c index bf631b74f8..17fb8d4cf0 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -7,6 +7,7 @@ */ #include +#include #include #include "common.h" #include diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c index 863ae6321b..23ff06466d 100644 --- a/arch/arm/mach-keystone/ddr3.c +++ b/arch/arm/mach-keystone/ddr3.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, */ +#include #include #include #include diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c index 29c0e592e4..5e964af8ea 100644 --- a/arch/arm/mach-kirkwood/cpu.c +++ b/arch/arm/mach-kirkwood/cpu.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c index 186f6c048a..360d94abb0 100644 --- a/arch/arm/mach-mediatek/mt8516/init.c +++ b/arch/arm/mach-mediatek/mt8516/init.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c index 5a97c8cb26..c2b1b76982 100644 --- a/arch/arm/mach-mediatek/mt8518/init.c +++ b/arch/arm/mach-mediatek/mt8518/init.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index d33e7f1741..bc4c92074c 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-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c index 7c8e4cade1..c83268181b 100644 --- a/arch/arm/mach-mvebu/armada3700/cpu.c +++ b/arch/arm/mach-mvebu/armada3700/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c index eba21647d9..30045bd505 100644 --- a/arch/arm/mach-omap2/omap5/hwinit.c +++ b/arch/arm/mach-omap2/omap5/hwinit.c @@ -12,6 +12,7 @@ * Sricharan */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/reset.c b/arch/arm/mach-omap2/reset.c index ea27248e85..2bbd5fcb9b 100644 --- a/arch/arm/mach-omap2/reset.c +++ b/arch/arm/mach-omap2/reset.c @@ -9,6 +9,7 @@ * Sricharan R */ #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c index 22042d0de0..6705a192ca 100644 --- a/arch/arm/mach-socfpga/misc_gen5.c +++ b/arch/arm/mach-socfpga/misc_gen5.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c index 5247e52a5a..b2252f3621 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 #include diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c index afd3c54179..68a211286f 100644 --- a/arch/arm/mach-tegra/pmc.c +++ b/arch/arm/mach-tegra/pmc.c @@ -4,6 +4,7 @@ */ #include +#include #include diff --git a/arch/arm/mach-uniphier/reset.c b/arch/arm/mach-uniphier/reset.c index 31685d0009..92a8b92547 100644 --- a/arch/arm/mach-uniphier/reset.c +++ b/arch/arm/mach-uniphier/reset.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c index 98f63e3427..aa5de863eb 100644 --- a/arch/arm/mach-zynqmp-r5/cpu.c +++ b/arch/arm/mach-zynqmp-r5/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c index 88cc7b98d8..1481e05500 100644 --- a/arch/nds32/lib/interrupts.c +++ b/arch/nds32/lib/interrupts.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index f1b8df9b0b..a8d0590d51 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -31,7 +31,7 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { disable_interrupts(); - reset_cpu (0); + reset_cpu(0); return 0; } diff --git a/arch/sh/cpu/sh4/watchdog.c b/arch/sh/cpu/sh4/watchdog.c index 7c157bc035..1de32cd419 100644 --- a/arch/sh/cpu/sh4/watchdog.c +++ b/arch/sh/cpu/sh4/watchdog.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include +#include #include #include #include diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c index 3284ff0936..590e92b5a0 100644 --- a/board/BuR/brppt2/board.c +++ b/board/BuR/brppt2/board.c @@ -7,6 +7,7 @@ * */ #include +#include #include #include #include diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c index 4f8006da00..e3fbbbaa8a 100644 --- a/board/abilis/tb100/tb100.c +++ b/board/abilis/tb100/tb100.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c index 2f97d5ce96..5017ab8d93 100644 --- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index 7fe539e4d6..dd0ebdd303 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -5,6 +5,7 @@ * Sharma Bhupesh */ #include +#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 867fa82c17..a18fb275d9 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/bosch/shc/board.c b/board/bosch/shc/board.c index 440d02fdbc..d34f3ba007 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c index 1068edca59..292802f4c0 100644 --- a/board/broadcom/bcmns2/northstar2.c +++ b/board/broadcom/bcmns2/northstar2.c @@ -3,6 +3,7 @@ * (C) Copyright 2016 Broadcom Ltd. */ #include +#include #include #include diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index 940455de5b..687ade544a 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/board/cavium/thunderx/thunderx.c @@ -4,6 +4,7 @@ **/ #include +#include #include #include #include diff --git a/board/compulab/cm_t335/spl.c b/board/compulab/cm_t335/spl.c index 93f834f512..6d5b15aef4 100644 --- a/board/compulab/cm_t335/spl.c +++ b/board/compulab/cm_t335/spl.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index 2d08f9a563..d125dc9317 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index cbde9f6b3c..7bc22d905f 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index 68be0fe0cf..5f5e5fd6ab 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 671064fae2..45a7789f91 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c index 75375f12c4..be551bc375 100644 --- a/board/freescale/mx6memcal/spl.c +++ b/board/freescale/mx6memcal/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index 28f5cf7fc4..84400090b3 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -4,6 +4,7 @@ * Peter Griffin */ #include +#include #include #include #include diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c index eb9b99eaa9..84c26e0c14 100644 --- a/board/hisilicon/hikey960/hikey960.c +++ b/board/hisilicon/hikey960/hikey960.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 4926419a90..304f64a032 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -4,6 +4,7 @@ * Jorge Ramirez-Ortiz */ +#include #include #include #include diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c index 8148ace2fe..6ef960b06b 100644 --- a/board/kmc/kzm9g/kzm9g.c +++ b/board/kmc/kzm9g/kzm9g.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index e845edf068..765463e370 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c index 59f307d357..40dd27a7b0 100644 --- a/board/phytium/durian/durian.c +++ b/board/phytium/durian/durian.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index 254af7907a..81bd8bd95b 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c index 7a889646df..6c096b49a1 100644 --- a/board/qualcomm/dragonboard820c/dragonboard820c.c +++ b/board/qualcomm/dragonboard820c/dragonboard820c.c @@ -5,6 +5,7 @@ * (C) Copyright 2017 Jorge Ramirez-Ortiz */ +#include #include #include #include diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 10ef7f931b..70c14d9f33 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c index 4260dff119..dbb210584d 100644 --- a/board/renesas/alt/alt_spl.c +++ b/board/renesas/alt/alt_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c index 08c5448609..7232370d6f 100644 --- a/board/renesas/blanche/blanche.c +++ b/board/renesas/blanche/blanche.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c index d1cbbc3339..11fbd5b07d 100644 --- a/board/renesas/condor/condor.c +++ b/board/renesas/condor/condor.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c index 46d9f74785..7ad21f9812 100644 --- a/board/renesas/draak/draak.c +++ b/board/renesas/draak/draak.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c index d6240b19ef..d5f40717d4 100644 --- a/board/renesas/eagle/eagle.c +++ b/board/renesas/eagle/eagle.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c index cb7d432a15..b608c61e23 100644 --- a/board/renesas/ebisu/ebisu.c +++ b/board/renesas/ebisu/ebisu.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c index f86c9f1a63..c137da64b3 100644 --- a/board/renesas/gose/gose.c +++ b/board/renesas/gose/gose.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c index 2f94d3e76c..42a6758148 100644 --- a/board/renesas/gose/gose_spl.c +++ b/board/renesas/gose/gose_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c index 4f901eea71..ba904609ae 100644 --- a/board/renesas/grpeach/grpeach.c +++ b/board/renesas/grpeach/grpeach.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index 841d337f4d..ff7e458b3c 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/koelsch/koelsch_spl.c b/board/renesas/koelsch/koelsch_spl.c index b7cdcb2216..b3530d7ce7 100644 --- a/board/renesas/koelsch/koelsch_spl.c +++ b/board/renesas/koelsch/koelsch_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index 3cb1a56142..d6b388fead 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c index ba9b494476..d7db361b12 100644 --- a/board/renesas/lager/lager_spl.c +++ b/board/renesas/lager/lager_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index 86f79da7fd..b9c29349cc 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/porter/porter_spl.c b/board/renesas/porter/porter_spl.c index 7bf6823e05..026220d9e2 100644 --- a/board/renesas/porter/porter_spl.c +++ b/board/renesas/porter/porter_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c index 27140c5c35..d9741c1939 100644 --- a/board/renesas/rcar-common/gen3-spl.c +++ b/board/renesas/rcar-common/gen3-spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c index 22fe9619cf..058fa6fbb6 100644 --- a/board/renesas/salvator-x/salvator-x.c +++ b/board/renesas/salvator-x/salvator-x.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c index 25221e3c55..b69e7035ab 100644 --- a/board/renesas/silk/silk.c +++ b/board/renesas/silk/silk.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/silk/silk_spl.c b/board/renesas/silk/silk_spl.c index 64ee75a63e..a2c397f935 100644 --- a/board/renesas/silk/silk_spl.c +++ b/board/renesas/silk/silk_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/stout/cpld.c b/board/renesas/stout/cpld.c index cffdc3e9d2..e6c2051bd4 100644 --- a/board/renesas/stout/cpld.c +++ b/board/renesas/stout/cpld.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include "cpld.h" diff --git a/board/renesas/stout/stout_spl.c b/board/renesas/stout/stout_spl.c index 05a3ced97c..8d01efce56 100644 --- a/board/renesas/stout/stout_spl.c +++ b/board/renesas/stout/stout_spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c index 5ba9f862e1..c09ed8cff8 100644 --- a/board/synopsys/emsdp/emsdp.c +++ b/board/synopsys/emsdp/emsdp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c index 9dbdc128f8..36aa8f6ae5 100644 --- a/board/synopsys/iot_devkit/iot_devkit.c +++ b/board/synopsys/iot_devkit/iot_devkit.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index 7f520beeb0..ae51113f32 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ +#include #include #include #include diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c index 8955622b81..6c432ca5a6 100644 --- a/board/technexion/pico-imx7d/spl.c +++ b/board/technexion/pico-imx7d/spl.c @@ -5,6 +5,7 @@ * Author: Richard Hu */ +#include #include #include #include diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index 3e5174ef8a..aea5ca3a75 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 d4d6eed11a..29f2cb2d45 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index adeee67643..857e9fe345 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 1fd0f2c122..df6b44675d 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index b0914a9ead..15257b68e2 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -3,6 +3,7 @@ * Copyright (C) 2016-2018 Toradex AG */ +#include #include #include #include diff --git a/board/ucRobotics/bubblegum_96/bubblegum_96.c b/board/ucRobotics/bubblegum_96/bubblegum_96.c index a4c202da19..c16f117bf8 100644 --- a/board/ucRobotics/bubblegum_96/bubblegum_96.c +++ b/board/ucRobotics/bubblegum_96/bubblegum_96.c @@ -5,6 +5,7 @@ * Copyright (C) 2018 Manivannan Sadhasivam */ +#include #include #include #include diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 23bb6b9623..9b6ed997f0 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c index c14dd75a26..2cde517d7a 100644 --- a/cmd/tpm_test.c +++ b/cmd/tpm_test.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "tpm-user-utils.h" diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index 39202588ae..8eff6036e7 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -7,6 +7,7 @@ #define LOG_CATEGORY UCLASS_SYSRESET #include +#include #include #include #include diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c index c030360c21..62bf25e9cc 100644 --- a/drivers/watchdog/imx_watchdog.c +++ b/drivers/watchdog/imx_watchdog.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c index 313019f152..7533fc612c 100644 --- a/drivers/watchdog/ulp_wdog.c +++ b/drivers/watchdog/ulp_wdog.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/include/common.h b/include/common.h index cf33b31499..f4a9dc325f 100644 --- a/include/common.h +++ b/include/common.h @@ -74,8 +74,6 @@ phys_size_t get_effective_memsize(void); int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -void reset_cpu (ulong addr); - /* lib/uuid.c */ #include diff --git a/include/cpu_func.h b/include/cpu_func.h index 46f3d92459..f701f02bfe 100644 --- a/include/cpu_func.h +++ b/include/cpu_func.h @@ -83,5 +83,7 @@ enum { * @param flags Flags to control what is done */ int cleanup_before_linux_select(int flags); + +void reset_cpu(ulong addr); ; #endif diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 0047998ee0..af5a878fc3 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include From patchwork Thu Dec 12 00:47: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: 1208141 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="R8zvaP9j"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKwk5rpNz9sP6 for ; Thu, 12 Dec 2019 15:06:14 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 27EF3816CD; Thu, 12 Dec 2019 05:04:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="R8zvaP9j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 89C16816F5; Thu, 12 Dec 2019 01:49:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 652CA816C6 for ; Thu, 12 Dec 2019 01:48:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id s2so815273iog.10 for ; Wed, 11 Dec 2019 16:48:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7hT3H2z0DhkhVI7TrZl6B9P/QsmYQt0+QCB4PfieMqI=; b=R8zvaP9jYP284I5MVnwAQ1lSn9apH9h9kuGdygPKsxm/nLnRwNSlSAzwS9R+kR4JUZ GAVr9VZpH6JHwCzZ3uaHGXuUpHmyFlJ5C7/g1AbXFzXXYmrmvjZS2caBr4OJLMm2hCF6 c6qzi0QdhMoZEtBM0ze4FfL1YGOfHUDIIp544= 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=7hT3H2z0DhkhVI7TrZl6B9P/QsmYQt0+QCB4PfieMqI=; b=SVAZ0mWb8u0e0BEIkC/2eU6xJXLrxbuP5G/Cmar06tvK7zUnvSejS/N6eqGAIL5W4S FnIRiErrk9JV97o+jks1VJxLdNEscvegGbEXzzhZwCdMzipmP447v6xAYp6Ck5ctup7k CyajWsZ2DZC+uiIMbUYFt9nqTmlDS0MHyEWgEHKu6Jt9EJZU/zFhF3iN/RaKLHAwQ5Sy i+6HPIvY3LMLpdhnRao086y3N4SLf2vb7L413v7FJrMmtfWTVlNg70jMRHstP/4/SZz+ Lz5GWANqKwsErXRmXQdClORFInFs9JuISe6CVKTBIUgIXOAK7BkxMfjp9QpbamXwS0TE A9pw== X-Gm-Message-State: APjAAAWC6mfBgGFYVVEn2nTGFq3RX9gFxw7+BQ23k/4E8mUXYCg2ZIgj 4NBT4/hr8LEbHO+XCUxlQLKmvgBIB70= X-Google-Smtp-Source: APXvYqzfrlnFlhubgYCFRGSBufsaj11Ita0x3wC1/7gQcOHkYDd7I2NN50S0IdanqTCFu7T7xO+Rmg== X-Received: by 2002:a5d:81c1:: with SMTP id t1mr947056iol.216.1576111734454; Wed, 11 Dec 2019 16:48:54 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:54 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 25/35] image: Rename load_addr, save_addr, save_size Date: Wed, 11 Dec 2019 17:47:44 -0700 Message-Id: <20191211174637.25.Iae8516460419c864d915f5635b236279ea087504@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kurban Mallachiev , Michal Simek , Miquel Raynal , Adam Heinrich , Eugeniu Rosca , Tom Rini , Tien Fong Chee , Stefan Roese , Stephen Warren , Heiko Stuebner , Abhishek Shah , Stefan Theil , Breno Matheus Lima , Boris Brezillon , Alexander Graf , Ben Wolsieffer , Matthias Brugger , Joe Hershberger , Alexander Dahl , Heinrich Schuchardt , Julius Werner Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These global variables are quite short and generic. In fact the same name is more often used locally for struct members and function arguments. Add a image_ prefix to make them easier to distinguish. Signed-off-by: Simon Glass --- cmd/bmp.c | 8 ++++---- cmd/booti.c | 4 ++-- cmd/bootm.c | 5 +++-- cmd/bootz.c | 4 ++-- cmd/cramfs.c | 4 ++-- cmd/disk.c | 2 +- cmd/elf.c | 4 ++-- cmd/jffs2.c | 4 ++-- cmd/load.c | 6 +++--- cmd/mvebu/bubt.c | 6 ++++-- cmd/nand.c | 2 +- cmd/net.c | 12 ++++++------ cmd/pxe_utils.c | 4 ++-- cmd/reiser.c | 2 +- cmd/source.c | 3 ++- cmd/ximg.c | 2 +- cmd/zfs.c | 2 +- common/board_r.c | 2 +- common/image-fdt.c | 5 +++-- common/image.c | 18 +++++++++--------- common/spl/spl_net.c | 4 ++-- common/update.c | 3 +-- .../ddr/marvell/a38x/ddr3_training_ip_engine.c | 6 +++--- include/common.h | 6 +++--- net/net.c | 2 +- net/nfs.c | 9 +++++---- net/tftp.c | 14 +++++++------- 27 files changed, 74 insertions(+), 69 deletions(-) diff --git a/cmd/bmp.c b/cmd/bmp.c index d2a39f677f..1e4c9720fe 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -95,8 +95,8 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[ ulong addr; switch (argc) { - case 1: /* use load_addr as default address */ - addr = load_addr; + case 1: /* use image_load_addr as default address */ + addr = image_load_addr; break; case 2: /* use argument */ addr = simple_strtoul(argv[1], NULL, 16); @@ -116,8 +116,8 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar splash_get_pos(&x, &y); switch (argc) { - case 1: /* use load_addr as default address */ - addr = load_addr; + case 1: /* use image_load_addr as default address */ + addr = image_load_addr; break; case 2: /* use argument */ addr = simple_strtoul(argv[1], NULL, 16); diff --git a/cmd/booti.c b/cmd/booti.c index d0671deb75..de5058236e 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -30,9 +30,9 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, /* Setup Linux kernel Image entry point */ if (!argc) { - ld = load_addr; + ld = image_load_addr; debug("* kernel: default image load address = 0x%08lx\n", - load_addr); + image_load_addr); } else { ld = simple_strtoul(argv[0], NULL, 16); debug("* kernel: cmdline image address = 0x%08lx\n", ld); diff --git a/cmd/bootm.c b/cmd/bootm.c index 62ee7c4b8a..931d53f0c7 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -144,7 +144,8 @@ int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd) char *local_args[2]; local_args[0] = (char *)cmd; local_args[1] = NULL; - printf("Automatic boot of image at addr 0x%08lX ...\n", load_addr); + printf("Automatic boot of image at addr 0x%08lX ...\n", + image_load_addr); return do_bootm(cmdtp, 0, 1, local_args); } @@ -232,7 +233,7 @@ static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int rcode = 0; if (argc < 2) { - return image_info(load_addr); + return image_info(image_load_addr); } for (arg = 1; arg < argc; ++arg) { diff --git a/cmd/bootz.c b/cmd/bootz.c index 74be62c2c5..7bfc491221 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -33,9 +33,9 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, /* Setup Linux kernel zImage entry point */ if (!argc) { - images->ep = load_addr; + images->ep = image_load_addr; debug("* kernel: default image load address = 0x%08lx\n", - load_addr); + image_load_addr); } else { images->ep = simple_strtoul(argv[0], NULL, 16); debug("* kernel: cmdline image address = 0x%08lx\n", diff --git a/cmd/cramfs.c b/cmd/cramfs.c index 2188910b2a..1bc987528f 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -97,7 +97,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename; int size; - ulong offset = load_addr; + ulong offset = image_load_addr; char *offset_virt; struct part_info part; @@ -127,7 +127,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (argc == 3) { offset = simple_strtoul(argv[1], NULL, 0); - load_addr = offset; + image_load_addr = offset; filename = argv[2]; } diff --git a/cmd/disk.c b/cmd/disk.c index 437c175374..c57561b3cb 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -124,7 +124,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, flush_cache(addr, (cnt+1)*info.blksz); /* Loading ok, update default load address */ - load_addr = addr; + image_load_addr = addr; return bootm_maybe_autostart(cmdtp, argv[0]); } diff --git a/cmd/elf.c b/cmd/elf.c index 32f12a72b9..57736f997b 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -294,7 +294,7 @@ int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* Consume address */ argc--; argv++; } else - addr = load_addr; + addr = image_load_addr; if (!valid_elf_image(addr)) return 1; @@ -348,7 +348,7 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * If we don't know where the image is then we're done. */ if (argc < 2) - addr = load_addr; + addr = image_load_addr; else addr = simple_strtoul(argv[1], NULL, 16); diff --git a/cmd/jffs2.c b/cmd/jffs2.c index b47cd3d989..672ed43b3f 100644 --- a/cmd/jffs2.c +++ b/cmd/jffs2.c @@ -476,7 +476,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) char *filename; int size; struct part_info *part; - ulong offset = load_addr; + ulong offset = image_load_addr; /* pre-set Boot file name */ filename = env_get("bootfile"); @@ -488,7 +488,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (argc == 3) { offset = simple_strtoul(argv[1], NULL, 16); - load_addr = offset; + image_load_addr = offset; filename = argv[2]; } diff --git a/cmd/load.c b/cmd/load.c index 68ff3010b4..bed973ede9 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -109,7 +109,7 @@ static int do_load_serial(cmd_tbl_t *cmdtp, int flag, int argc, rcode = 1; } else { printf("## Start Addr = 0x%08lX\n", addr); - load_addr = addr; + image_load_addr = addr; } #ifdef CONFIG_SYS_LOADS_BAUD_CHANGE @@ -485,12 +485,12 @@ static int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc, addr = load_serial_bin(offset); if (addr == ~0) { - load_addr = 0; + image_load_addr = 0; printf("## Binary (kermit) download aborted\n"); rcode = 1; } else { printf("## Start Addr = 0x%08lX\n", addr); - load_addr = addr; + image_load_addr = addr; } } if (load_baudrate != current_baudrate) { diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c index 84d2d531f0..6c68620d14 100644 --- a/cmd/mvebu/bubt.c +++ b/cmd/mvebu/bubt.c @@ -423,8 +423,10 @@ static int is_usb_active(void) #ifdef CONFIG_CMD_NET static size_t tftp_read_file(const char *file_name) { - /* update global variable load_addr before tftp file from network */ - load_addr = get_load_addr(); + /* + * update global variable image_load_addr before tftp file from network + */ + image_load_addr = get_load_addr(); return net_loop(TFTPGET); } diff --git a/cmd/nand.c b/cmd/nand.c index 5bda69e819..92089a73c1 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -925,7 +925,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd, /* Loading ok, update default load address */ - load_addr = addr; + image_load_addr = addr; return bootm_maybe_autostart(cmdtp, cmd); } diff --git a/cmd/net.c b/cmd/net.c index 237403977e..6bce214e45 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -186,10 +186,10 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, net_boot_file_name_explicit = false; - /* pre-set load_addr */ + /* pre-set image_load_addr */ s = env_get("loadaddr"); if (s != NULL) - load_addr = simple_strtoul(s, NULL, 16); + image_load_addr = simple_strtoul(s, NULL, 16); switch (argc) { case 1: @@ -206,7 +206,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, */ addr = simple_strtoul(argv[1], &end, 16); if (end == (argv[1] + strlen(argv[1]))) { - load_addr = addr; + image_load_addr = addr; /* refresh bootfile name from env */ copy_filename(net_boot_file_name, env_get("bootfile"), sizeof(net_boot_file_name)); @@ -218,7 +218,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, break; case 3: - load_addr = simple_strtoul(argv[1], NULL, 16); + image_load_addr = simple_strtoul(argv[1], NULL, 16); net_boot_file_name_explicit = true; copy_filename(net_boot_file_name, argv[2], sizeof(net_boot_file_name)); @@ -227,8 +227,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, #ifdef CONFIG_CMD_TFTPPUT case 4: - if (strict_strtoul(argv[1], 16, &save_addr) < 0 || - strict_strtoul(argv[2], 16, &save_size) < 0) { + if (strict_strtoul(argv[1], 16, &image_save_addr) < 0 || + strict_strtoul(argv[2], 16, &image_save_size) < 0) { printf("Invalid address/size\n"); return CMD_RET_USAGE; } diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index a636346bb5..ff8b0dcd7b 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -1310,9 +1310,9 @@ void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg) #ifdef CONFIG_CMD_BMP /* display BMP if available */ if (cfg->bmp) { - if (get_relfile(cmdtp, cfg->bmp, load_addr)) { + if (get_relfile(cmdtp, cfg->bmp, image_load_addr)) { run_command("cls", 0); - bmp_display(load_addr, + bmp_display(image_load_addr, BMP_ALIGN_CENTER, BMP_ALIGN_CENTER); } else { printf("Skipping background bmp %s for failure\n", diff --git a/cmd/reiser.c b/cmd/reiser.c index 7f51b927a4..598fab48b3 100644 --- a/cmd/reiser.c +++ b/cmd/reiser.c @@ -154,7 +154,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } /* Loading ok, update default load address */ - load_addr = addr; + image_load_addr = addr; printf ("\n%ld bytes read\n", filelen); env_set_hex("filesize", filelen); diff --git a/cmd/source.c b/cmd/source.c index 3a51ebf0b6..be1135014f 100644 --- a/cmd/source.c +++ b/cmd/source.c @@ -172,7 +172,8 @@ static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) addr = CONFIG_SYS_LOAD_ADDR; debug ("* source: default load address = 0x%08lx\n", addr); #if defined(CONFIG_FIT) - } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) { + } else if (fit_parse_subimage(argv[1], image_load_addr, &addr, + &fit_uname)) { debug ("* source: subimage '%s' from FIT image at 0x%08lx\n", fit_uname, addr); #endif diff --git a/cmd/ximg.c b/cmd/ximg.c index 22b2037a33..dccd1143a7 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -33,7 +33,7 @@ static int do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { - ulong addr = load_addr; + ulong addr = image_load_addr; ulong dest = 0; ulong data, len; int verify; diff --git a/cmd/zfs.c b/cmd/zfs.c index ed5402bb13..1533130635 100644 --- a/cmd/zfs.c +++ b/cmd/zfs.c @@ -112,7 +112,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] zfs_close(&zfile); /* Loading ok, update default load address */ - load_addr = addr; + image_load_addr = addr; printf("%llu bytes read\n", zfile.size); env_set_hex("filesize", zfile.size); diff --git a/common/board_r.c b/common/board_r.c index c560f2e1cf..703b7a90f3 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -467,7 +467,7 @@ static int initr_env(void) #endif /* Initialize from environment */ - load_addr = env_get_ulong("loadaddr", 16, load_addr); + image_load_addr = env_get_ulong("loadaddr", 16, image_load_addr); return 0; } diff --git a/common/image-fdt.c b/common/image-fdt.c index 48388488d9..dbb1e6e131 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -285,7 +285,8 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, *of_flat_tree = NULL; *of_size = 0; - img_addr = (argc == 0) ? load_addr : simple_strtoul(argv[0], NULL, 16); + img_addr = (argc == 0) ? image_load_addr : + simple_strtoul(argv[0], NULL, 16); buf = map_sysmem(img_addr, 0); if (argc > 2) @@ -304,7 +305,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, else if (images->fit_uname_os) default_addr = (ulong)images->fit_hdr_os; else - default_addr = load_addr; + default_addr = image_load_addr; if (fit_parse_conf(select, default_addr, &fdt_addr, &fit_uname_config)) { diff --git a/common/image.c b/common/image.c index eb626dcac9..877c97839b 100644 --- a/common/image.c +++ b/common/image.c @@ -556,9 +556,9 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, /* Shared dual-format routines */ /*****************************************************************************/ #ifndef USE_HOSTCC -ulong load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */ -ulong save_addr; /* Default Save Address */ -ulong save_size; /* Default Save Size (in bytes) */ +ulong image_load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */ +ulong image_save_addr; /* Default Save Address */ +ulong image_save_size; /* Default Save Size (in bytes) */ static int on_loadaddr(const char *name, const char *value, enum env_op op, int flags) @@ -566,7 +566,7 @@ static int on_loadaddr(const char *name, const char *value, enum env_op op, switch (op) { case env_op_create: case env_op_overwrite: - load_addr = simple_strtoul(value, NULL, 16); + image_load_addr = simple_strtoul(value, NULL, 16); break; default: break; @@ -935,15 +935,15 @@ ulong genimg_get_kernel_addr_fit(char * const img_addr, /* find out kernel image address */ if (!img_addr) { - kernel_addr = load_addr; + kernel_addr = image_load_addr; debug("* kernel: default image load address = 0x%08lx\n", - load_addr); + image_load_addr); #if CONFIG_IS_ENABLED(FIT) - } else if (fit_parse_conf(img_addr, load_addr, &kernel_addr, + } else if (fit_parse_conf(img_addr, image_load_addr, &kernel_addr, fit_uname_config)) { debug("* kernel: config '%s' from image at 0x%08lx\n", *fit_uname_config, kernel_addr); - } else if (fit_parse_subimage(img_addr, load_addr, &kernel_addr, + } else if (fit_parse_subimage(img_addr, image_load_addr, &kernel_addr, fit_uname_kernel)) { debug("* kernel: subimage '%s' from image at 0x%08lx\n", *fit_uname_kernel, kernel_addr); @@ -1101,7 +1101,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, if (images->fit_uname_os) default_addr = (ulong)images->fit_hdr_os; else - default_addr = load_addr; + default_addr = image_load_addr; if (fit_parse_conf(select, default_addr, &rd_addr, &fit_uname_config)) { diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index 803303249c..30c050c0b3 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -19,14 +19,14 @@ static ulong spl_net_load_read(struct spl_load_info *load, ulong sector, { debug("%s: sector %lx, count %lx, buf %lx\n", __func__, sector, count, (ulong)buf); - memcpy(buf, (void *)(load_addr + sector), count); + memcpy(buf, (void *)(image_load_addr + sector), count); return count; } static int spl_net_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { - struct image_header *header = (struct image_header *)load_addr; + struct image_header *header = (struct image_header *)image_load_addr; int rv; env_init(); diff --git a/common/update.c b/common/update.c index 13b09ab00f..bfb760e52a 100644 --- a/common/update.c +++ b/common/update.c @@ -45,7 +45,6 @@ extern ulong tftp_timeout_ms; extern int tftp_timeout_count_max; -extern ulong load_addr; #ifdef CONFIG_MTD_NOR_FLASH extern flash_info_t flash_info[]; static uchar *saved_prot_info; @@ -72,7 +71,7 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr) env_set("netretry", "no"); /* download the update file */ - load_addr = addr; + image_load_addr = addr; copy_filename(net_boot_file_name, filename, sizeof(net_boot_file_name)); size = net_loop(TFTPGET); diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c index 74417d61b4..27610d48cf 100644 --- a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c +++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c @@ -612,9 +612,9 @@ int ddr3_tip_load_pattern_to_odpg(u32 dev_num, enum hws_access_type access_type, MASK_ALL_BITS)); } - CHECK_STATUS(ddr3_tip_if_write - (dev_num, access_type, if_id, - ODPG_DATA_BUFFER_OFFS_REG, load_addr, MASK_ALL_BITS)); + CHECK_STATUS(ddr3_tip_if_write(dev_num, access_type, if_id, + ODPG_DATA_BUFFER_OFFS_REG, + image_load_addr, MASK_ALL_BITS)); return MV_OK; } diff --git a/include/common.h b/include/common.h index f4a9dc325f..09b5f62ae3 100644 --- a/include/common.h +++ b/include/common.h @@ -62,9 +62,9 @@ void hang (void) __attribute__ ((noreturn)); /* common/cmd_source.c */ int source (ulong addr, const char *fit_uname); -extern ulong load_addr; /* Default Load Address */ -extern ulong save_addr; /* Default Save Address */ -extern ulong save_size; /* Default Save Size */ +extern ulong image_load_addr; /* Default Load Address */ +extern ulong image_save_addr; /* Default Save Address */ +extern ulong image_save_size; /* Default Save Size */ /* common/memsize.c */ long get_ram_size (long *, long); diff --git a/net/net.c b/net/net.c index 5199d679a1..b9bf0d1a8b 100644 --- a/net/net.c +++ b/net/net.c @@ -636,7 +636,7 @@ restart: printf("Bytes transferred = %d (%x hex)\n", net_boot_file_size, net_boot_file_size); env_set_hex("filesize", net_boot_file_size); - env_set_hex("fileaddr", load_addr); + env_set_hex("fileaddr", image_load_addr); } if (protocol != NETCONS) eth_halt(); diff --git a/net/nfs.c b/net/nfs.c index f4101eb17c..5226e2c163 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -88,14 +88,15 @@ static inline int store_block(uchar *src, unsigned offset, unsigned len) for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) { /* start address in flash? */ - if (load_addr + offset >= flash_info[i].start[0]) { + if (image_load_addr + offset >= flash_info[i].start[0]) { rc = 1; break; } } if (rc) { /* Flash is destination for this packet */ - rc = flash_write((uchar *)src, (ulong)(load_addr+offset), len); + rc = flash_write((uchar *)src, (ulong)image_load_addr + offset, + len); if (rc) { flash_perror(rc); return -1; @@ -103,7 +104,7 @@ static inline int store_block(uchar *src, unsigned offset, unsigned len) } else #endif /* CONFIG_SYS_DIRECT_FLASH_NFS */ { - void *ptr = map_sysmem(load_addr + offset, len); + void *ptr = map_sysmem(image_load_addr + offset, len); memcpy(ptr, src, len); unmap_sysmem(ptr); @@ -912,7 +913,7 @@ void nfs_start(void) net_boot_file_expected_size_in_blocks << 9); print_size(net_boot_file_expected_size_in_blocks << 9, ""); } - printf("\nLoad address: 0x%lx\nLoading: *\b", load_addr); + printf("\nLoad address: 0x%lx\nLoading: *\b", image_load_addr); net_set_timeout_handler(nfs_timeout, nfs_timeout_handler); net_set_udp_handler(nfs_handler); diff --git a/net/tftp.c b/net/tftp.c index 1e3c18ae69..899d3b89d3 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -221,7 +221,7 @@ static int load_block(unsigned block, uchar *dst, unsigned len) ulong tosend = len; tosend = min(net_boot_file_size - offset, tosend); - (void)memcpy(dst, (void *)(save_addr + offset), tosend); + (void)memcpy(dst, (void *)(image_save_addr + offset), tosend); debug("%s: block=%d, offset=%ld, len=%d, tosend=%ld\n", __func__, block, offset, len, tosend); return tosend; @@ -605,7 +605,7 @@ static void tftp_timeout_handler(void) } } -/* Initialize tftp_load_addr and tftp_load_size from load_addr and lmb */ +/* Initialize tftp_load_addr and tftp_load_size from image_load_addr and lmb */ static int tftp_init_load_addr(void) { #ifdef CONFIG_LMB @@ -614,13 +614,13 @@ static int tftp_init_load_addr(void) lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob); - max_size = lmb_get_free_size(&lmb, load_addr); + max_size = lmb_get_free_size(&lmb, image_load_addr); if (!max_size) return -1; tftp_load_size = max_size; #endif - tftp_load_addr = load_addr; + tftp_load_addr = image_load_addr; return 0; } @@ -710,9 +710,9 @@ void tftp_start(enum proto_t protocol) #ifdef CONFIG_CMD_TFTPPUT tftp_put_active = (protocol == TFTPPUT); if (tftp_put_active) { - printf("Save address: 0x%lx\n", save_addr); - printf("Save size: 0x%lx\n", save_size); - net_boot_file_size = save_size; + printf("Save address: 0x%lx\n", image_save_addr); + printf("Save size: 0x%lx\n", image_save_size); + net_boot_file_size = image_save_size; puts("Saving: *\b"); tftp_state = STATE_SEND_WRQ; new_transfer(); From patchwork Thu Dec 12 00:47: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: 1208136 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gnxohp7a"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKvk6XV7z9sR7 for ; Thu, 12 Dec 2019 15:05:22 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C3E0B814FA; Thu, 12 Dec 2019 05:04:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gnxohp7a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E5B4D816F1; Thu, 12 Dec 2019 01:49:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CB345816EB for ; Thu, 12 Dec 2019 01:48:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id s2so815325iog.10 for ; Wed, 11 Dec 2019 16:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0nCt8EJal1W9EjsvPrBF/8iWBP4HbMWfVT+XPDdx1i0=; b=gnxohp7aSFK90qDzBdnHqqeD1twtt1UV9qfsHLPegCZEU4SHlOEVFMAiKF5zcur66d Oee+7INOalYxgCBNxO+m3J1k/CAc1gRawlu/9b7mkvOak92I1wmAWQmGGviiMJHLgAtE Esq2FQvL/bvEvEZR5y/Q16590UyXh4e7kbzFI= 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=0nCt8EJal1W9EjsvPrBF/8iWBP4HbMWfVT+XPDdx1i0=; b=MJO49u7/IW6TEX4S1J6tPBZ/SMvi7U03bXcnmDRi131qBBFnwAqxAoRMk5KolI1/G9 lAKPqdVBnMasLO4G/2f36h0djb2EsuyhoPRVm8zngCjwbewI/kSalZ8Ogru4oxdnNWbR FkizFIhndGSLyTYSAXdqcAFWi0n7i9D4KXLQ2inthn0ID4dt8qqPSXMZrDtW4x+FjtKc hkjQfXuqc/6F0jYxsUYzrQAmOiht7RrhmyWdM14sdr1ws7tcsHJdrE67FvWhycOXFiC2 BQvzS0gqpuoj4Boxb56B9d/9HGVsIXIYnaFz51+QeR7RhDYWNMLGbQyp7PZwbEcw6OwX 00Gw== X-Gm-Message-State: APjAAAUhhSJ8xsoyeV/Mwz7CP0j2TCum3tiBjLyQ6KKjxDJIsqw7Ke0E giA4pYclEGjG05Xz84ARtaonSjtOCFE= X-Google-Smtp-Source: APXvYqwTxFnLQjCpVHy6l77Igs4pYkOp8mIitgv1T9RIAXXnZjDWsmVA/zQhcrdL8PdOwVzfa+VAbQ== X-Received: by 2002:a02:ad16:: with SMTP id s22mr5979445jan.26.1576111737475; Wed, 11 Dec 2019 16:48:57 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:57 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 26/35] common: Move the image globals into image.h Date: Wed, 11 Dec 2019 17:47:45 -0700 Message-Id: <20191211174637.26.I761c462a2a7b917e9439642c60973f647f25062f@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kurban Mallachiev , Joe Hershberger , Miquel Raynal , Adam Heinrich , Eugeniu Rosca , Chris Packham , Tom Rini , Stefan Roese , Stephen Warren , Heinrich Schuchardt , Abhishek Shah , Boris Brezillon , Alexander Graf , Ben Wolsieffer , Matthias Brugger , Alexander Dahl , Robert Berger , Julius Werner Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These three globals relate to image handling. Move them to the image header file. Signed-off-by: Simon Glass --- cmd/bmp.c | 1 + cmd/bootz.c | 1 + cmd/cramfs.c | 1 + cmd/disk.c | 1 + cmd/elf.c | 1 + cmd/jffs2.c | 1 + cmd/load.c | 1 + cmd/mvebu/bubt.c | 1 + cmd/nand.c | 1 + cmd/net.c | 1 + cmd/pxe_utils.c | 1 + common/board_r.c | 1 + common/update.c | 1 + drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c | 1 + include/common.h | 4 ---- include/image.h | 4 ++++ lib/optee/optee.c | 1 + net/net.c | 1 + net/nfs.c | 1 + net/tftp.c | 1 + 20 files changed, 22 insertions(+), 4 deletions(-) diff --git a/cmd/bmp.c b/cmd/bmp.c index 1e4c9720fe..edf4f56426 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bootz.c b/cmd/bootz.c index 7bfc491221..f14a5fefbf 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/cramfs.c b/cmd/cramfs.c index 1bc987528f..ad232deae0 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/disk.c b/cmd/disk.c index c57561b3cb..15973b7d13 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -6,6 +6,7 @@ #include #include #include +#include #include int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, diff --git a/cmd/elf.c b/cmd/elf.c index 57736f997b..ba06df06cf 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_X86 diff --git a/cmd/jffs2.c b/cmd/jffs2.c index 672ed43b3f..da2580d85d 100644 --- a/cmd/jffs2.c +++ b/cmd/jffs2.c @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/load.c b/cmd/load.c index bed973ede9..fab30fe894 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c index 6c68620d14..2041a7a29a 100644 --- a/cmd/mvebu/bubt.c +++ b/cmd/mvebu/bubt.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/nand.c b/cmd/nand.c index 92089a73c1..4de6892a01 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/cmd/net.c b/cmd/net.c index 6bce214e45..1b724cc570 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -10,6 +10,7 @@ #include #include #include +#include #include static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []); diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index ff8b0dcd7b..8b830212ce 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index 703b7a90f3..b13d310774 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/common/update.c b/common/update.c index bfb760e52a..c8dd346a09 100644 --- a/common/update.c +++ b/common/update.c @@ -8,6 +8,7 @@ #include #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/ddr/marvell/a38x/ddr3_training_ip_engine.c b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c index 27610d48cf..9293d54e5a 100644 --- a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c +++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c @@ -6,6 +6,7 @@ #include "ddr3_init.h" #include "mv_ddr_regs.h" #include "ddr_training_ip_db.h" +#include #define PATTERN_1 0x55555555 #define PATTERN_2 0xaaaaaaaa diff --git a/include/common.h b/include/common.h index 09b5f62ae3..5e38c5fc58 100644 --- a/include/common.h +++ b/include/common.h @@ -62,10 +62,6 @@ void hang (void) __attribute__ ((noreturn)); /* common/cmd_source.c */ int source (ulong addr, const char *fit_uname); -extern ulong image_load_addr; /* Default Load Address */ -extern ulong image_save_addr; /* Default Save Address */ -extern ulong image_save_size; /* Default Save Size */ - /* common/memsize.c */ long get_ram_size (long *, long); phys_size_t get_effective_memsize(void); diff --git a/include/image.h b/include/image.h index f4d2aaf53e..cc52de567b 100644 --- a/include/image.h +++ b/include/image.h @@ -112,6 +112,10 @@ struct fdt_region; # define IMAGE_OF_SYSTEM_SETUP 0 #endif +extern ulong image_load_addr; /* Default Load Address */ +extern ulong image_save_addr; /* Default Save Address */ +extern ulong image_save_size; /* Default Save Size */ + enum ih_category { IH_ARCH, IH_COMP, diff --git a/lib/optee/optee.c b/lib/optee/optee.c index c883c498e1..9b49eb8ee7 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/net/net.c b/net/net.c index b9bf0d1a8b..d8a60b6119 100644 --- a/net/net.c +++ b/net/net.c @@ -93,6 +93,7 @@ #include #include #include +#include #include #include #include diff --git a/net/nfs.c b/net/nfs.c index 5226e2c163..72e1018a3b 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/net/tftp.c b/net/tftp.c index 899d3b89d3..02401898c5 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include From patchwork Thu Dec 12 00:47: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: 1208058 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OmxaC6dY"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFc30D9Cz9sR7 for ; Thu, 12 Dec 2019 11:51:30 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B3D31816F1; Thu, 12 Dec 2019 01:49:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OmxaC6dY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 17BE8816F6; Thu, 12 Dec 2019 01:49:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5DD288149F for ; Thu, 12 Dec 2019 01:49:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id b15so501994ila.7 for ; Wed, 11 Dec 2019 16:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sXncWkVnwhaBWh35gQIrf0E47rj6UO6JxR7zdFzjSbg=; b=OmxaC6dYmTd6vYX0cQD4GtDk/gpYjkmEYq9PGQ5ZfQLlef5QdrGSGzKAeugYBBQKYT vMzBRGSwt7E7brmbljUu9kjaahlxyPgDTrk8OSD7vYJ73GU3eMHc4Tto4A8st3pFYMVD WTzCJs6ZG2/coTBu5GqVK1KlD37F9KV99ejSY= 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=sXncWkVnwhaBWh35gQIrf0E47rj6UO6JxR7zdFzjSbg=; b=KOojXTvEKF77DAUBCxWzy8VJo9j8//KU/sZM4cI/0yWzAkmFxLoeVOwQWCusu1ETHG uWOYvgBSnX92w6b48pha+3IgeTL14VjULoGcEElQWAXNxYvh6KhY/geyg3sN6X7wuO5i Mdr/+20+LEzfYLz3NYADTaz1EKzbjS5Rn2szDx3WTEktF7PQDsnpF1lC8rXGk9xYw2NX FHl2Rh1O3RMHG6DNshdwC0dIAf0SxiYUCjZjpe4vctV5lIae4UaRn69i4wZqQOwCNTay bDVRLOKeeonAE314sLeW9n8U1g2VHBNf5OuQvUDJ7ViBydpScWZcgYTp1VDT0E1laMZw EQLQ== X-Gm-Message-State: APjAAAVY7xQw9+GhPRsggbGRTRHi3x+rdF0M+XepUsKVp0iVbJ6IJh9M CFhbv+6Jc+cpFpvB2nUOHDrBC7q85vA= X-Google-Smtp-Source: APXvYqxEOYOH9McAqL/HExHe0JqTInH7FjNCeqqT/TaK+18B0cgUQROkUggz468LozEPCTpjsJS96A== X-Received: by 2002:a92:5ec8:: with SMTP id f69mr6026266ilg.8.1576111738975; Wed, 11 Dec 2019 16:48:58 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:58 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 27/35] common: Rename and move source() Date: Wed, 11 Dec 2019 17:47:46 -0700 Message-Id: <20191211174637.27.Ib2b4120d6b5dd9ad0c5111fb3721c65a1a6568c6@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Tom Rini , Eugeniu Rosca , Joe Hershberger , Boris Brezillon , Julius Werner , Chris Packham Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function has a very generic name which does not adequately describe its purpose. Rename it and move it to image.h, since it relates to reading a script from an image. Signed-off-by: Simon Glass --- cmd/source.c | 5 ++--- drivers/usb/gadget/f_sdp.c | 2 +- include/common.h | 3 --- include/image.h | 12 ++++++++++++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/cmd/source.c b/cmd/source.c index be1135014f..92f8f77ee6 100644 --- a/cmd/source.c +++ b/cmd/source.c @@ -41,8 +41,7 @@ static const char *get_default_image(const void *fit) } #endif -int -source (ulong addr, const char *fit_uname) +int image_source_script(ulong addr, const char *fit_uname) { ulong len; #if defined(CONFIG_LEGACY_IMAGE_FORMAT) @@ -183,7 +182,7 @@ static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } printf ("## Executing script at %08lx\n", addr); - rcode = source (addr, fit_uname); + rcode = image_source_script(addr, fit_uname); return rcode; } diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index bcd1c5d47c..50836db4a0 100644 --- a/drivers/usb/gadget/f_sdp.c +++ b/drivers/usb/gadget/f_sdp.c @@ -726,7 +726,7 @@ static void sdp_handle_in_ep(struct spl_image_info *spl_image) jump_to_image_no_args(&spl_image); #else /* In U-Boot, allow jumps to scripts */ - source(sdp_func->jmp_address, "script@1"); + image_source_script(sdp_func->jmp_address, "script@1"); #endif } diff --git a/include/common.h b/include/common.h index 5e38c5fc58..c69bad9771 100644 --- a/include/common.h +++ b/include/common.h @@ -59,9 +59,6 @@ void hang (void) __attribute__ ((noreturn)); #include -/* common/cmd_source.c */ -int source (ulong addr, const char *fit_uname); - /* common/memsize.c */ long get_ram_size (long *, long); phys_size_t get_effective_memsize(void); diff --git a/include/image.h b/include/image.h index cc52de567b..80c0737463 100644 --- a/include/image.h +++ b/include/image.h @@ -673,6 +673,18 @@ int fit_image_load(bootm_headers_t *images, ulong addr, int arch, int image_type, int bootstage_id, enum fit_load_op load_op, ulong *datap, ulong *lenp); +/** + * image_source_script() - Execute a script + * + * Executes a U-Boot script at a particular address in memory. The script should + * have a header (FIT or legacy) with the script type (IH_TYPE_SCRIPT). + * + * @addr: Address of script + * @fit_uname: FIT subimage name + * @return result code (enum command_ret_t) + */ +int image_source_script(ulong addr, const char *fit_uname); + #ifndef USE_HOSTCC /** * fit_get_node_from_config() - Look up an image a FIT by type From patchwork Thu Dec 12 00:47: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: 1208137 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="YFpxSaQC"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKvx38cPz9sP6 for ; Thu, 12 Dec 2019 15:05:33 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA54581676; Thu, 12 Dec 2019 05:04:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="YFpxSaQC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D862816EC; Thu, 12 Dec 2019 01:49:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E9AF3816FB for ; Thu, 12 Dec 2019 01:49:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id b10so56702iof.11 for ; Wed, 11 Dec 2019 16:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fmFA5FxD9napyhuLFpjKYEM+4G2l+6KnT/Da41VMWWA=; b=YFpxSaQCSFPgVl9NUfhqDpc5gIKSFw8zUx7QrDPKUW8hP5kJfC30vK46/MF0CVOTaz Yl++nuy3XFutCRMqvCtSHepZ4Z1R3MrusflO7MgeVBdWfXWK5WcUKA+zQdZyE5I9sc/I shDZMKo/ZOa4hiuDGcCSYgF2nPJh0lRra+AEc= 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=fmFA5FxD9napyhuLFpjKYEM+4G2l+6KnT/Da41VMWWA=; b=KGa+VqgI3kL8WLJGhbiG6TMHoB+pPk+5vJl8CDEVYdPcXnoNgqMIHUWn+gtZq1/orS eem2AD/vSmcBA3j1r704qDNSWgI6y8qzaly3i+ly6znwpJJGFWmbIn9HeDLOKGTkaM+x KYW4FWjEc+Lb4HcojvL/jAUOKF1nmmBtKRXOy8Ly2u8PDwPqtG8wI1Av3+7Uvc4WnXWO IVsqdvWbZOXA6peKW3X9G0CGieMa7zVLfvRuKONqphZM8s3WMgbspAnLxQ17rktZDCNw ZdJsULnuc38IzJubPhVXZF9hx3qLhTYLc6o1p26dPQxmckEHGAfydWSGWAWHAdlF+qd2 NnOw== X-Gm-Message-State: APjAAAU6cNXXMgAUIxQjNEIYllhdIjDDn5zvMZ447tBZ8IfTx/gMqSoa PnHLJDk8S2nreXF+UTpuaxGkJ+x/Tvg= X-Google-Smtp-Source: APXvYqz/CyCXeMDetAVx99oxeemHv5xQtRnQkDgQr08OMbs43FjFmqyAQ78KwhQ7pTThaT7dncHK2w== X-Received: by 2002:a02:6d2b:: with SMTP id m43mr5941587jac.37.1576111741778; Wed, 11 Dec 2019 16:49:01 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:01 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 28/35] common: Move RAM-sizing functions to init.h Date: Wed, 11 Dec 2019 17:47:47 -0700 Message-Id: <20191211174637.28.Ibf2a89e8247fb54de790b3b8b55622b9ed234b2b@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: GSS_MTK_Uboot_upstream , Chander Kashyap , Andrej Rosano , Michal Simek , Daniel Gorsulowski , Parthiban Nallathambi , Jon Mason , Steve Rae , Sandeep Sheriker M , Krunal Bhargav , Joe Hershberger , "NXP i.MX U-Boot Team" , Dalon Westergreen , Brad Griffis , Boris Brezillon , Udit Agarwal , Krzysztof Kozlowski , u-boot-amlogic@groups.io, Stelian Pop , Erik van Luijk , Igor Grinberg , Vitaly Andrianov , Marcel Ziswiler , Andes , Nikita Kiryanov , Max Krummenacher , Stefan Roese , Richard Hu , Tom Rini , Niel Fourie , Uri Mashiach , Dirk Eibach , Hou Zhiqiang , Alison Wang , Vladimir Zapolskiy , Yuantian Tang , Thomas Schaefer , Jorge Ramirez-Ortiz , =?utf-8?q?Eddy_Petri=C8=99or?= , uboot-stm32@st-md-mailman.stormreply.com, Wolfgang Wegner , Marek Vasut , Ryder Lee , Angelo Dureghello , egnite GmbH , Jason Liu , Mateusz Kulikowski , Stefan Agner , Hans de Goede , Reinhard Arlt , Ilya Yanok , Martyn Welch , Nicolas Ferre , Tom Warren Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass --- arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 1 + arch/arm/cpu/arm926ejs/spear/spr_misc.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/mach-davinci/misc.c | 1 + arch/arm/mach-imx/imx8/cpu.c | 1 + arch/arm/mach-imx/mx5/mx53_dram.c | 1 + arch/arm/mach-imx/mx6/litesom.c | 1 + arch/arm/mach-mediatek/mt7623/init.c | 1 + arch/arm/mach-meson/board-axg.c | 1 + arch/arm/mach-meson/board-g12a.c | 1 + arch/arm/mach-meson/board-gx.c | 1 + arch/arm/mach-mvebu/dram.c | 1 + arch/arm/mach-omap2/am33xx/board.c | 1 + arch/arm/mach-omap2/emif-common.c | 1 + arch/arm/mach-omap2/sec-common.c | 1 + arch/arm/mach-orion5x/dram.c | 1 + arch/arm/mach-sunxi/dram_sun4i.c | 1 + arch/arm/mach-tegra/board.c | 1 + arch/mips/mach-ath79/dram.c | 1 + arch/mips/mach-mtmips/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/traps.c | 1 + arch/powerpc/cpu/mpc86xx/traps.c | 1 + arch/powerpc/lib/bootm.c | 1 + arch/x86/cpu/tangier/sdram.c | 1 + board/AndesTech/adp-ae3xx/adp-ae3xx.c | 1 + board/AndesTech/adp-ag101p/adp-ag101p.c | 1 + board/AndesTech/ax25-ae350/ax25-ae350.c | 1 + board/CarMediaLab/flea3/flea3.c | 1 + board/armltd/integrator/integrator.c | 1 + board/armltd/vexpress/vexpress_common.c | 1 + board/astro/mcf5373l/mcf5373l.c | 1 + board/atmel/at91rm9200ek/at91rm9200ek.c | 1 + board/atmel/at91sam9260ek/at91sam9260ek.c | 1 + board/atmel/at91sam9261ek/at91sam9261ek.c | 1 + board/atmel/at91sam9263ek/at91sam9263ek.c | 1 + board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 1 + board/atmel/at91sam9n12ek/at91sam9n12ek.c | 1 + board/atmel/at91sam9rlek/at91sam9rlek.c | 1 + board/atmel/sam9x60ek/sam9x60ek.c | 1 + board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 1 + board/barco/platinum/platinum.c | 1 + board/barco/titanium/titanium.c | 1 + board/bluewater/snapper9260/snapper9260.c | 1 + board/broadcom/bcm23550_w1d/bcm23550_w1d.c | 1 + board/broadcom/bcm28155_ap/bcm28155_ap.c | 1 + board/broadcom/bcm_ep/board.c | 1 + board/broadcom/bcmns2/northstar2.c | 1 + board/calao/usb_a9263/usb_a9263.c | 1 + board/compulab/cl-som-imx7/spl.c | 1 + board/compulab/cm_fx6/spl.c | 1 + board/compulab/cm_t335/spl.c | 1 + board/compulab/cm_t43/spl.c | 1 + board/egnite/ethernut5/ethernut5.c | 1 + board/esd/meesc/meesc.c | 1 + board/esd/vme8349/vme8349.c | 1 + board/freescale/bsc9131rdb/ddr.c | 1 + board/freescale/mpc8308rdb/sdram.c | 1 + board/freescale/mx53ard/mx53ard.c | 1 + board/freescale/mx53smd/mx53smd.c | 1 + board/freescale/s32v234evb/s32v234evb.c | 1 + board/freescale/vf610twr/vf610twr.c | 1 + board/gdsys/mpc8308/sdram.c | 1 + board/hisilicon/poplar/poplar.c | 1 + board/ids/ids8313/ids8313.c | 1 + board/inversepath/usbarmory/usbarmory.c | 1 + board/l+g/vinco/vinco.c | 1 + board/laird/wb45n/wb45n.c | 1 + board/mini-box/picosam9g45/picosam9g45.c | 1 + board/mpc8308_p1m/sdram.c | 1 + board/phytec/pcl063/pcl063.c | 1 + board/phytec/phycore_am335x_r2/board.c | 1 + board/ronetix/pm9261/pm9261.c | 1 + board/ronetix/pm9263/pm9263.c | 1 + board/ronetix/pm9g45/pm9g45.c | 1 + board/samsung/arndale/arndale.c | 1 + board/samsung/smdkc100/smdkc100.c | 1 + board/samsung/smdkv310/smdkv310.c | 1 + board/seco/mx6quq7/mx6quq7.c | 1 + board/siemens/corvus/board.c | 1 + board/siemens/smartweb/smartweb.c | 1 + board/siemens/taurus/taurus.c | 1 + board/socrates/sdram.c | 1 + board/sunxi/board.c | 1 + board/sysam/amcore/amcore.c | 1 + board/technexion/pico-imx6ul/spl.c | 2 ++ board/technologic/ts4800/ts4800.c | 1 + board/ti/ks2_evm/board.c | 1 + board/timll/devkit3250/devkit3250.c | 1 + board/toradex/colibri_imx7/colibri_imx7.c | 2 ++ board/tqc/tqm834x/tqm834x.c | 1 + board/ve8313/ve8313.c | 2 +- board/woodburn/woodburn.c | 1 + cmd/ti/ddr3.c | 1 + common/memsize.c | 1 + drivers/ddr/altera/sdram_gen5.c | 1 + drivers/ddr/altera/sdram_s10.c | 1 + drivers/ram/bmips_ram.c | 1 + drivers/ram/mpc83xx_sdram.c | 1 + drivers/ram/stm32mp1/stm32mp1_ram.c | 1 + drivers/ram/stm32mp1/stm32mp1_tests.c | 1 + include/common.h | 4 ---- include/init.h | 3 +++ lib/fdtdec.c | 1 + 103 files changed, 106 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index 7818d72908..542543cc28 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c index ccf944f814..d5be646555 100644 --- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c +++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c @@ -9,6 +9,7 @@ #include #include #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 6c87c1b11a..7a378d93df 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index 80e964274e..3e5185261c 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index d31af47c31..2110380957 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx5/mx53_dram.c b/arch/arm/mach-imx/mx5/mx53_dram.c index 39ac287fb4..a7f033f3f4 100644 --- a/arch/arm/mach-imx/mx5/mx53_dram.c +++ b/arch/arm/mach-imx/mx5/mx53_dram.c @@ -5,6 +5,7 @@ */ #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-imx/mx6/litesom.c b/arch/arm/mach-imx/mx6/litesom.c index 4f4df7433b..b0a6bd589c 100644 --- a/arch/arm/mach-imx/mx6/litesom.c +++ b/arch/arm/mach-imx/mx6/litesom.c @@ -4,6 +4,7 @@ * Copyright (C) 2016 Grinn */ +#include #include #include #include diff --git a/arch/arm/mach-mediatek/mt7623/init.c b/arch/arm/mach-mediatek/mt7623/init.c index 0ee8c6664c..2778e260e0 100644 --- a/arch/arm/mach-mediatek/mt7623/init.c +++ b/arch/arm/mach-mediatek/mt7623/init.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-meson/board-axg.c b/arch/arm/mach-meson/board-axg.c index 173905e762..6874458e36 100644 --- a/arch/arm/mach-meson/board-axg.c +++ b/arch/arm/mach-meson/board-axg.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c index 24786df6cd..26d6b90790 100644 --- a/arch/arm/mach-meson/board-g12a.c +++ b/arch/arm/mach-meson/board-g12a.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c index ab8f1a81f8..191fd49005 100644 --- a/arch/arm/mach-meson/board-gx.c +++ b/arch/arm/mach-meson/board-gx.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-mvebu/dram.c b/arch/arm/mach-mvebu/dram.c index ba8ebc6288..6c6f8d8c5c 100644 --- a/arch/arm/mach-mvebu/dram.c +++ b/arch/arm/mach-mvebu/dram.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index 03460c3eb7..055eb6b760 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c index c900f28af2..bb81063c0f 100644 --- a/arch/arm/mach-omap2/emif-common.c +++ b/arch/arm/mach-omap2/emif-common.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index e9b3e746fe..f3df8affa3 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -14,6 +14,7 @@ #include #include +#include #include #include diff --git a/arch/arm/mach-orion5x/dram.c b/arch/arm/mach-orion5x/dram.c index b52c417e30..33f65db48e 100644 --- a/arch/arm/mach-orion5x/dram.c +++ b/arch/arm/mach-orion5x/dram.c @@ -10,6 +10,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-sunxi/dram_sun4i.c b/arch/arm/mach-sunxi/dram_sun4i.c index 396c0424ea..72de807a47 100644 --- a/arch/arm/mach-sunxi/dram_sun4i.c +++ b/arch/arm/mach-sunxi/dram_sun4i.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c index 61eaba711a..31c49a7c84 100644 --- a/arch/arm/mach-tegra/board.c +++ b/arch/arm/mach-tegra/board.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/mach-ath79/dram.c b/arch/mips/mach-ath79/dram.c index 138a7f8483..1abe2a49e6 100644 --- a/arch/mips/mach-ath79/dram.c +++ b/arch/mips/mach-ath79/dram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c index 7afc2c5940..cee3c0cb0a 100644 --- a/arch/mips/mach-mtmips/cpu.c +++ b/arch/mips/mach-mtmips/cpu.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c index 804788d050..bc2fc93e11 100644 --- a/arch/powerpc/cpu/mpc85xx/traps.c +++ b/arch/powerpc/cpu/mpc85xx/traps.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c index 1820187d1d..79bab91367 100644 --- a/arch/powerpc/cpu/mpc86xx/traps.c +++ b/arch/powerpc/cpu/mpc86xx/traps.c @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index f2e670eb6b..390e8c0673 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c index b47d896e20..8c7e1c10c2 100644 --- a/arch/x86/cpu/tangier/sdram.c +++ b/arch/x86/cpu/tangier/sdram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c index db08d86de5..a04415deca 100644 --- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c +++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c @@ -5,6 +5,7 @@ * Macpaul Lin, Andes Technology Corporation */ +#include #include #include #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH) diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c index 657921e741..faf39b4ba6 100644 --- a/board/AndesTech/adp-ag101p/adp-ag101p.c +++ b/board/AndesTech/adp-ag101p/adp-ag101p.c @@ -6,6 +6,7 @@ */ #include +#include #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH) #include #endif diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c index 47e6929365..f164073000 100644 --- a/board/AndesTech/ax25-ae350/ax25-ae350.c +++ b/board/AndesTech/ax25-ae350/ax25-ae350.c @@ -5,6 +5,7 @@ */ #include +#include #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH) #include #endif diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c index be0bc228ec..fb66c9ecc7 100644 --- a/board/CarMediaLab/flea3/flea3.c +++ b/board/CarMediaLab/flea3/flea3.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index 5cdf7905a9..1a472f50d3 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c index 416c18adec..14626c1f55 100644 --- a/board/armltd/vexpress/vexpress_common.c +++ b/board/armltd/vexpress/vexpress_common.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c index db157a83c8..9adf58eb8a 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/atmel/at91rm9200ek/at91rm9200ek.c b/board/atmel/at91rm9200ek/at91rm9200ek.c index 5d228fcc16..e75d5b182f 100644 --- a/board/atmel/at91rm9200ek/at91rm9200ek.c +++ b/board/atmel/at91rm9200ek/at91rm9200ek.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index d1e78dabf2..42fa762772 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 28765315f7..36f2149b61 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 fc941d447f..b811d931c4 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 6df915fcf1..8aabc55951 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 51b24e1d59..90d32353e9 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 4e674d49b3..f81dccc9cc 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/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c index 7be1dd54f4..fbd05c78a9 100644 --- a/board/atmel/sam9x60ek/sam9x60ek.c +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c index fda06c824d..e9159d470f 100644 --- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/barco/platinum/platinum.c b/board/barco/platinum/platinum.c index 1c6514af6e..c2c7c09553 100644 --- a/board/barco/platinum/platinum.c +++ b/board/barco/platinum/platinum.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/barco/titanium/titanium.c b/board/barco/titanium/titanium.c index 407bfe95ed..6348f123ad 100644 --- a/board/barco/titanium/titanium.c +++ b/board/barco/titanium/titanium.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c index d2a1b97d7b..47ce307880 100644 --- a/board/bluewater/snapper9260/snapper9260.c +++ b/board/bluewater/snapper9260/snapper9260.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c index ce9f0494ee..d83eb9bd52 100644 --- a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c +++ b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c index 87616386cb..40ced1a87c 100644 --- a/board/broadcom/bcm28155_ap/bcm28155_ap.c +++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c index 63fb98ba7c..e4dbe42649 100644 --- a/board/broadcom/bcm_ep/board.c +++ b/board/broadcom/bcm_ep/board.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c index 292802f4c0..6cbad9c1f0 100644 --- a/board/broadcom/bcmns2/northstar2.c +++ b/board/broadcom/bcmns2/northstar2.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include diff --git a/board/calao/usb_a9263/usb_a9263.c b/board/calao/usb_a9263/usb_a9263.c index 9e8e1f36f7..919e3ed27c 100644 --- a/board/calao/usb_a9263/usb_a9263.c +++ b/board/calao/usb_a9263/usb_a9263.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cl-som-imx7/spl.c b/board/compulab/cl-som-imx7/spl.c index f9a19f08da..6833608a53 100644 --- a/board/compulab/cl-som-imx7/spl.c +++ b/board/compulab/cl-som-imx7/spl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index a406d0046e..1ddf424e42 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/compulab/cm_t335/spl.c b/board/compulab/cm_t335/spl.c index 6d5b15aef4..39ca535d11 100644 --- a/board/compulab/cm_t335/spl.c +++ b/board/compulab/cm_t335/spl.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c index 7da9a9ad86..fdab9c3fd1 100644 --- a/board/compulab/cm_t43/spl.c +++ b/board/compulab/cm_t43/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/egnite/ethernut5/ethernut5.c b/board/egnite/ethernut5/ethernut5.c index 9dea2ba80e..bfd5a4fe36 100644 --- a/board/egnite/ethernut5/ethernut5.c +++ b/board/egnite/ethernut5/ethernut5.c @@ -53,6 +53,7 @@ */ #include +#include #include #include #include diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c index 4271b0db19..6c5992733c 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/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c index 49d085acf9..ff811643a6 100644 --- a/board/esd/vme8349/vme8349.c +++ b/board/esd/vme8349/vme8349.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/bsc9131rdb/ddr.c b/board/freescale/bsc9131rdb/ddr.c index 4b6d91df21..0951d7758a 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/mpc8308rdb/sdram.c b/board/freescale/mpc8308rdb/sdram.c index 317e63ea6a..6e0922cd53 100644 --- a/board/freescale/mpc8308rdb/sdram.c +++ b/board/freescale/mpc8308rdb/sdram.c @@ -12,6 +12,7 @@ */ #include +#include #include #include diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c index e8fccccafd..33d056b47d 100644 --- a/board/freescale/mx53ard/mx53ard.c +++ b/board/freescale/mx53ard/mx53ard.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c index cab0e79a6b..2599272173 100644 --- a/board/freescale/mx53smd/mx53smd.c +++ b/board/freescale/mx53smd/mx53smd.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/s32v234evb/s32v234evb.c b/board/freescale/s32v234evb/s32v234evb.c index 9bc9ddf649..a7301e2a2e 100644 --- a/board/freescale/s32v234evb/s32v234evb.c +++ b/board/freescale/s32v234evb/s32v234evb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/vf610twr/vf610twr.c b/board/freescale/vf610twr/vf610twr.c index f6cd7a4c8d..17427f23d8 100644 --- a/board/freescale/vf610twr/vf610twr.c +++ b/board/freescale/vf610twr/vf610twr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/sdram.c b/board/gdsys/mpc8308/sdram.c index 2a77fed270..9695fb0a10 100644 --- a/board/gdsys/mpc8308/sdram.c +++ b/board/gdsys/mpc8308/sdram.c @@ -14,6 +14,7 @@ #ifndef CONFIG_MPC83XX_SDRAM #include +#include #include #include diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 304f64a032..36999bdcea 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c index 2b6e4df86f..6e74e939c3 100644 --- a/board/ids/ids8313/ids8313.c +++ b/board/ids/ids8313/ids8313.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index e9eea40e45..4fa34e1b51 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c index 029ab12391..5a998e37d8 100644 --- a/board/l+g/vinco/vinco.c +++ b/board/l+g/vinco/vinco.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/laird/wb45n/wb45n.c b/board/laird/wb45n/wb45n.c index e7f31ec9e7..0d1be3f784 100644 --- a/board/laird/wb45n/wb45n.c +++ b/board/laird/wb45n/wb45n.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c index 9a724040b0..5e55918fa6 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/mpc8308_p1m/sdram.c b/board/mpc8308_p1m/sdram.c index baf70d8807..cbf8781746 100644 --- a/board/mpc8308_p1m/sdram.c +++ b/board/mpc8308_p1m/sdram.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/board/phytec/pcl063/pcl063.c b/board/phytec/pcl063/pcl063.c index 96dd9e38f3..9e6940f9c7 100644 --- a/board/phytec/pcl063/pcl063.c +++ b/board/phytec/pcl063/pcl063.c @@ -6,6 +6,7 @@ * Copyright (C) 2015-2016 Stefan Roese */ +#include #include #include #include diff --git a/board/phytec/phycore_am335x_r2/board.c b/board/phytec/phycore_am335x_r2/board.c index 02d6c27cec..8964fb5dda 100644 --- a/board/phytec/phycore_am335x_r2/board.c +++ b/board/phytec/phycore_am335x_r2/board.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 bad673412a..57f8a20ccb 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/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c index 2da39c4acd..3cd6384fc3 100644 --- a/board/ronetix/pm9263/pm9263.c +++ b/board/ronetix/pm9263/pm9263.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c index c5d28c61e2..17dc7d6b4d 100644 --- a/board/ronetix/pm9g45/pm9g45.c +++ b/board/ronetix/pm9g45/pm9g45.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index 1d547b1c38..9abad3f824 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c index 13c057b426..a80300b0c0 100644 --- a/board/samsung/smdkc100/smdkc100.c +++ b/board/samsung/smdkc100/smdkc100.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c index 0eba7b66ee..05369d2227 100644 --- a/board/samsung/smdkv310/smdkv310.c +++ b/board/samsung/smdkv310/smdkv310.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c index c1e36b652e..671fba283e 100644 --- a/board/seco/mx6quq7/mx6quq7.c +++ b/board/seco/mx6quq7/mx6quq7.c @@ -7,6 +7,7 @@ * Modified by: Boris Brezillon */ +#include #include #include #include diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index a569bd53af..03768201c3 100644 --- a/board/siemens/corvus/board.c +++ b/board/siemens/corvus/board.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index e1be384994..cb7206a561 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 1cf1f9e1f7..0979df563a 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c index 4c76b4d0a8..9ee6f3d154 100644 --- a/board/socrates/sdram.c +++ b/board/socrates/sdram.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/sunxi/board.c b/board/sunxi/board.c index b9450a0e36..a7c4f7f71c 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sysam/amcore/amcore.c b/board/sysam/amcore/amcore.c index 0efea3d5cc..4502005941 100644 --- a/board/sysam/amcore/amcore.c +++ b/board/sysam/amcore/amcore.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index ae51113f32..d3cbaf3989 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0+ +#include #include +#include #include #include #include diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c index 82eb0c285c..ff1a189c7e 100644 --- a/board/technologic/ts4800/ts4800.c +++ b/board/technologic/ts4800/ts4800.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index e3305fbaf6..da98c1c739 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -9,6 +9,7 @@ #include #include "board.h" #include +#include #include #include #include diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c index a4b963d463..b455844c89 100644 --- a/board/timll/devkit3250/devkit3250.c +++ b/board/timll/devkit3250/devkit3250.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 15257b68e2..caa34abc68 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -3,7 +3,9 @@ * Copyright (C) 2016-2018 Toradex AG */ +#include #include +#include #include #include #include diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c index 95f95a5c82..02b3d2dea1 100644 --- a/board/tqc/tqm834x/tqm834x.c +++ b/board/tqc/tqm834x/tqm834x.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c index 2ea762ccfa..d1c9535f46 100644 --- a/board/ve8313/ve8313.c +++ b/board/ve8313/ve8313.c @@ -82,7 +82,7 @@ static long fixed_sdram(void) /* now check the real size */ disable_addr_trans (); - msize = get_ram_size (CONFIG_SYS_SDRAM_BASE, msize); + msize = get_ram_size(CONFIG_SYS_SDRAM_BASE, msize); enable_addr_trans (); #endif diff --git a/board/woodburn/woodburn.c b/board/woodburn/woodburn.c index 5cab3f4487..c69df6c7bf 100644 --- a/board/woodburn/woodburn.c +++ b/board/woodburn/woodburn.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c index 55130898c9..a452fe7876 100644 --- a/cmd/ti/ddr3.c +++ b/cmd/ti/ddr3.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/common/memsize.c b/common/memsize.c index 13b0047786..e95c68265a 100644 --- a/common/memsize.c +++ b/common/memsize.c @@ -5,6 +5,7 @@ */ #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c index 8c8ea19eb9..ed46e49143 100644 --- a/drivers/ddr/altera/sdram_gen5.c +++ b/drivers/ddr/altera/sdram_gen5.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index 82d9a13efa..f61aad2e9a 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include "sdram_s10.h" diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c index 3e1dd9e241..8f953e79af 100644 --- a/drivers/ram/bmips_ram.c +++ b/drivers/ram/bmips_ram.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c index f03d0428b2..46449d3d12 100644 --- a/drivers/ram/mpc83xx_sdram.c +++ b/drivers/ram/mpc83xx_sdram.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c index a362cf98bf..eb78f1198d 100644 --- a/drivers/ram/stm32mp1/stm32mp1_ram.c +++ b/drivers/ram/stm32mp1/stm32mp1_ram.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c index 581ee4897f..12298cf327 100644 --- a/drivers/ram/stm32mp1/stm32mp1_tests.c +++ b/drivers/ram/stm32mp1/stm32mp1_tests.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index c69bad9771..f9ad184f4a 100644 --- a/include/common.h +++ b/include/common.h @@ -59,10 +59,6 @@ void hang (void) __attribute__ ((noreturn)); #include -/* common/memsize.c */ -long get_ram_size (long *, long); -phys_size_t get_effective_memsize(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 ba0d4bc973..3dc109b209 100644 --- a/include/init.h +++ b/include/init.h @@ -95,6 +95,9 @@ int dram_init(void); */ int dram_init_banksize(void); +long get_ram_size(long *base, long size); +phys_size_t get_effective_memsize(void); + /** * arch_reserve_stacks() - Reserve all necessary stacks * diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 61af3472e6..f1bdc9f2e2 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include From patchwork Thu Dec 12 00:47: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: 1208059 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="kAiXm9x8"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFcD3sHCz9sR7 for ; Thu, 12 Dec 2019 11:51:40 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0BFB181700; Thu, 12 Dec 2019 01:49:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="kAiXm9x8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 70655816C6; Thu, 12 Dec 2019 01:49:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E891F816F1 for ; Thu, 12 Dec 2019 01:49:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x141.google.com with SMTP id t9so517870iln.4 for ; Wed, 11 Dec 2019 16:49:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y4zi4W/4WX0CU3pwwqGEa02Was380sPwfrIay0cJcuI=; b=kAiXm9x85rMbRaQry6Q9zjedsBB1TgkWfScXI07QBaHBMX5nZoohr8J5tiGAxRz7N1 U/XQcNs5xPaiWslAqVm398QYHrPIEnxUUWhxE6zLsf4jiI8D/ANDVJfe8Vh5Ej0o71p0 q4Z1JpQrJ9GJJWa+jtAYoDlcMGuZkzHtERnvw= 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=y4zi4W/4WX0CU3pwwqGEa02Was380sPwfrIay0cJcuI=; b=r/ZZrFCbB9o1giuZ38r+3e0IJcgaNra+OqjNyJbrApfwpPVrd+Tac4HLGgSMYGM8BI RukYSS5PMaAFHZ6qKk0R+KDtQ7opRlG0m4vo2CrBDkcOtn460W9GrfaLB0QJiHsOTgO3 bsnYRabaHjgS+3j9VVisaJ5mU8OBQZ6rF5QyXgtVKJwIJgN89ZHLTKzFXOYk7g789k9I Pqsg3Ez6MSVn6VyIB+Iqd4a3eV1aHddBR/uQaoaOcJ0DdvEZ92d5l9p+sKybdPYNKHdD uvWOOnpjmOFkl9qZ4smyD5K3OtPZhndRN2u3ryRPjqDEHxn1D0MMpqhBJXXto/QJg5wV IAIg== X-Gm-Message-State: APjAAAVEGwJfZ69MCqTnS9VVJQS+qKzpKMw2Bj+K6moKWN1cBH8U4Tb5 MkuzxiIPUVopfnHVAGeaFvykST8myKg= X-Google-Smtp-Source: APXvYqydrv6t20EY+VBeFAzn6fsiPRI5JIPE0XpjV9gUBdvtMUJkPt2ZV8aruMqKBgzseAP2s2DbDA== X-Received: by 2002:a92:bb4a:: with SMTP id w71mr6210912ili.112.1576111743501; Wed, 11 Dec 2019 16:49:03 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:03 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 29/35] common: Move testdram() into init.h Date: Wed, 11 Dec 2019 17:47:48 -0700 Message-Id: <20191211174637.29.Ib2bd6f24fe1abce6bfd090fcc8016269f82388e6@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sinan Akman , Tom Rini , Martyn Welch , Angelo Dureghello , Joe Hershberger , Paul Gortmaker , Boris Brezillon , Jason Liu , Jens Scharsig , TsiChung Liew Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This function is called during init so move it to the init header file. Signed-off-by: Simon Glass --- board/BuS/eb_cpu5282/eb_cpu5282.c | 3 ++- board/cobra5272/cobra5272.c | 3 ++- board/freescale/m5208evbe/m5208evbe.c | 1 + board/freescale/m52277evb/m52277evb.c | 1 + board/freescale/m5235evb/m5235evb.c | 1 + board/freescale/m5249evb/m5249evb.c | 4 +++- board/freescale/m5253demo/m5253demo.c | 1 + board/freescale/m5272c3/m5272c3.c | 4 +++- board/freescale/m5275evb/m5275evb.c | 1 + board/freescale/m53017evb/m53017evb.c | 1 + board/freescale/m5329evb/m5329evb.c | 1 + board/freescale/m5373evb/m5373evb.c | 1 + board/freescale/m54418twr/m54418twr.c | 1 + board/freescale/m54451evb/m54451evb.c | 1 + board/freescale/mpc837xerdb/mpc837xerdb.c | 1 + board/sbc8641d/sbc8641d.c | 2 +- board/socrates/sdram.c | 2 +- board/sysam/stmark2/stmark2.c | 1 + include/common.h | 4 ---- include/init.h | 2 ++ 20 files changed, 26 insertions(+), 10 deletions(-) diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index 0b916d2482..a667413bfc 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -12,6 +12,7 @@ #include "asm/m5282.h" #include #include +#include #include #include @@ -98,7 +99,7 @@ int dram_init(void) } #if defined(CONFIG_SYS_DRAM_TEST) -int testdram (void) +int testdram(void) { uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START; uint *pend = (uint *) CONFIG_SYS_MEMTEST_END; diff --git a/board/cobra5272/cobra5272.c b/board/cobra5272/cobra5272.c index a0a416b50c..a79884cb50 100644 --- a/board/cobra5272/cobra5272.c +++ b/board/cobra5272/cobra5272.c @@ -5,6 +5,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -31,7 +32,7 @@ int dram_init(void) return 0; }; -int testdram (void) +int testdram(void) { /* TODO: XXX XXX XXX */ printf ("DRAM test not implemented!\n"); diff --git a/board/freescale/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c index 82cadb2c33..e448a64abc 100644 --- a/board/freescale/m5208evbe/m5208evbe.c +++ b/board/freescale/m5208evbe/m5208evbe.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c index 13ce4886e5..a4b795fc39 100644 --- a/board/freescale/m52277evb/m52277evb.c +++ b/board/freescale/m52277evb/m52277evb.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/board/freescale/m5235evb/m5235evb.c b/board/freescale/m5235evb/m5235evb.c index fbd2e61604..5d40393755 100644 --- a/board/freescale/m5235evb/m5235evb.c +++ b/board/freescale/m5235evb/m5235evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c index 9969f71da1..da3adc5954 100644 --- a/board/freescale/m5249evb/m5249evb.c +++ b/board/freescale/m5249evb/m5249evb.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -89,7 +90,8 @@ int dram_init(void) }; -int testdram (void) { +int testdram(void) +{ /* TODO: XXX XXX XXX */ printf ("DRAM test not implemented!\n"); diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index dcf6d7f1db..76c18b8504 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/m5272c3/m5272c3.c b/board/freescale/m5272c3/m5272c3.c index d4457abfbd..1017ef0c2a 100644 --- a/board/freescale/m5272c3/m5272c3.c +++ b/board/freescale/m5272c3/m5272c3.c @@ -7,6 +7,7 @@ */ #include +#include #include #include @@ -33,7 +34,8 @@ int dram_init(void) return 0; }; -int testdram (void) { +int testdram(void) +{ /* TODO: XXX XXX XXX */ printf ("DRAM test not implemented!\n"); diff --git a/board/freescale/m5275evb/m5275evb.c b/board/freescale/m5275evb/m5275evb.c index a01133612c..e65e6d0af5 100644 --- a/board/freescale/m5275evb/m5275evb.c +++ b/board/freescale/m5275evb/m5275evb.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c index 01f51b7c95..8bdb4ad127 100644 --- a/board/freescale/m53017evb/m53017evb.c +++ b/board/freescale/m53017evb/m53017evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c index 88cdba719c..d93800b364 100644 --- a/board/freescale/m5329evb/m5329evb.c +++ b/board/freescale/m5329evb/m5329evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c index 37011fb730..1d52ce047f 100644 --- a/board/freescale/m5373evb/m5373evb.c +++ b/board/freescale/m5373evb/m5373evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m54418twr/m54418twr.c b/board/freescale/m54418twr/m54418twr.c index a4943e76ae..8c90cfe537 100644 --- a/board/freescale/m54418twr/m54418twr.c +++ b/board/freescale/m54418twr/m54418twr.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/m54451evb/m54451evb.c b/board/freescale/m54451evb/m54451evb.c index 7cb840346c..82a2b9093b 100644 --- a/board/freescale/m54451evb/m54451evb.c +++ b/board/freescale/m54451evb/m54451evb.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 4ad62bcf1d..45038acf32 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index 0a9dab8939..d053eaeec3 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -56,7 +56,7 @@ int dram_init(void) } #if defined(CONFIG_SYS_DRAM_TEST) -int testdram (void) +int testdram(void) { uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START; uint *pend = (uint *) CONFIG_SYS_MEMTEST_END; diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c index 9ee6f3d154..8eb4f8fc95 100644 --- a/board/socrates/sdram.c +++ b/board/socrates/sdram.c @@ -62,7 +62,7 @@ phys_size_t fixed_sdram(void) #endif #if defined(CONFIG_SYS_DRAM_TEST) -int testdram (void) +int testdram(void) { uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START; uint *pend = (uint *) CONFIG_SYS_MEMTEST_END; diff --git a/board/sysam/stmark2/stmark2.c b/board/sysam/stmark2/stmark2.c index 790199a640..ce8b541ccd 100644 --- a/board/sysam/stmark2/stmark2.c +++ b/board/sysam/stmark2/stmark2.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index f9ad184f4a..b25744854c 100644 --- a/include/common.h +++ b/include/common.h @@ -59,10 +59,6 @@ void hang (void) __attribute__ ((noreturn)); #include -#if defined(CONFIG_SYS_DRAM_TEST) -int testdram(void); -#endif /* CONFIG_SYS_DRAM_TEST */ - /* lib/uuid.c */ #include diff --git a/include/init.h b/include/init.h index 3dc109b209..8c766f2c1a 100644 --- a/include/init.h +++ b/include/init.h @@ -98,6 +98,8 @@ int dram_init_banksize(void); long get_ram_size(long *base, long size); phys_size_t get_effective_memsize(void); +int testdram(void); + /** * arch_reserve_stacks() - Reserve all necessary stacks * From patchwork Thu Dec 12 00:47: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: 1208142 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Mi1WvYF3"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YKww6WSxz9sP6 for ; Thu, 12 Dec 2019 15:06:24 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C42EC816EC; Thu, 12 Dec 2019 05:04:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Mi1WvYF3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4CE4816EC; Thu, 12 Dec 2019 01:49:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D68CF814EE for ; Thu, 12 Dec 2019 01:49:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id b10so57192iof.11 for ; Wed, 11 Dec 2019 16:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fAIeEFLzEl6GKeVFI/M9T26yxP7QagMxlp2dD/j+ePs=; b=Mi1WvYF3RNtXL/Ds34+utOlOGI82fmsm/hJM5DvhXkH2gy0SdUz5IBFzBxzZhi3LYl zolVXMyPMdHO51oVDDIm0ibVGcl/FBUpkVzenrNLEMX/+sAcKFu+/ttEtLTqsq5RQBrr jMp+3grsMMRm+BC9qM/5mukexXYWh1Fo2BG8s= 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=fAIeEFLzEl6GKeVFI/M9T26yxP7QagMxlp2dD/j+ePs=; b=X0k/82LV+Fj7h+RhCf1PyBxv8DyONW9V9f/o8XSTwoI2L5FgrXs8Ti5EnZwK3ofWdO JY/DikSLnajVWxSQArthkAiBj9dl1fKGfd0t9pfIpp81t/YAy1X86O9TlhjsCHbbI/jO aCKolrfbYm6Jc7aHxPFQ/seZ5FFHDAfshVlZwwEeMPvytS//P34qg5BRyspusuDVZIiF cnxBRAbRdr+mZF1XMzYBm1xgmf+VkKHQuw3RQJZF/Tin8iXxikgHh80Z7q5ZExhynZPX EXh446wQtHEfvqNuFWJziRdGgs549Sewp+ikFXgEs0CN3oSuJaP82k8DIdb0O21oURke eRdw== X-Gm-Message-State: APjAAAWJBJUc3UzwoYKsr03+K0IXcLc0NLm2l/TFfZU6G3Rtiiv6bJ0q C566mFEH4ZHjx8HVoxd7NK0zHaDTGGs= X-Google-Smtp-Source: APXvYqz7kunnYYa1yOugeD9ZAkwEbXAiHHPjJP5oJWLBb6QF/LEb6A66JJG8vXX30wFL1xbwu/gviQ== X-Received: by 2002:a02:2404:: with SMTP id f4mr5815073jaa.50.1576111754492; Wed, 11 Dec 2019 16:49:14 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:14 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 30/35] common: Move hang() to the same header as panic() Date: Wed, 11 Dec 2019 17:47:49 -0700 Message-Id: <20191211174637.30.Ib56e30aaca2085dc27227e82b20395025365142f@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Dec 2019 05:04:11 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robert Hancock , York Sun , Kevin Scholz , Nobuhiro Iwamatsu , Krunal Bhargav , Bhaskar Upadhaya , Joe Hershberger , "NXP i.MX U-Boot Team" , Dalon Westergreen , Udit Agarwal , Krzysztof Kozlowski , Sumit Garg , Alexey Brodkin , Eric Jarrige , Boris Brezillon , Alexander Graf , Vitaly Andrianov , Philippe Reynes , GSS_MTK_Uboot_upstream , Nikita Kiryanov , Richard Hu , Tom Rini , Stephen Warren , Heinrich Schuchardt , Uri Mashiach , Dirk Eibach , Hou Zhiqiang , Yuantian Tang , Thomas Schaefer , "Cogent Embedded, Inc." , uboot-stm32@st-md-mailman.stormreply.com, Marek Vasut , Ryder Lee , Xiaoliang Yang , Stefan Roese , Hans de Goede , Vagrant Cascadian , Tom Warren Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 1 + arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 1 + arch/arm/cpu/armv8/cache_v8.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/include/asm/armv8/mmu.h | 1 + arch/arm/lib/bootm.c | 1 + arch/arm/lib/div0.c | 4 ++-- arch/arm/mach-at91/spl.c | 1 + arch/arm/mach-at91/spl_at91.c | 1 + arch/arm/mach-at91/spl_atmel.c | 1 + arch/arm/mach-davinci/spl.c | 1 + arch/arm/mach-imx/mx6/ddr.c | 1 + arch/arm/mach-imx/spl.c | 1 + arch/arm/mach-k3/security.c | 1 + arch/arm/mach-keystone/mon.c | 1 + arch/arm/mach-mediatek/spl.c | 1 + arch/arm/mach-mvebu/spl.c | 1 + arch/arm/mach-omap2/am33xx/clock.c | 1 + arch/arm/mach-omap2/am33xx/fdt.c | 1 + arch/arm/mach-omap2/clocks-common.c | 1 + arch/arm/mach-omap2/emif-common.c | 1 + arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 1 + arch/arm/mach-omap2/omap5/fdt.c | 1 + arch/arm/mach-omap2/sec-common.c | 1 + arch/arm/mach-rockchip/bootrom.c | 1 + arch/arm/mach-rockchip/rk3188/rk3188.c | 1 + arch/arm/mach-rockchip/spl.c | 1 + arch/arm/mach-rockchip/tpl.c | 1 + arch/arm/mach-socfpga/mailbox_s10.c | 1 + arch/arm/mach-socfpga/spl_a10.c | 1 + arch/arm/mach-socfpga/spl_gen5.c | 1 + arch/arm/mach-socfpga/spl_s10.c | 1 + arch/arm/mach-stm32mp/spl.c | 1 + arch/arm/mach-tegra/cboot.c | 1 + arch/arm/mach-uniphier/spl_board_init.c | 1 + arch/arm/mach-zynq/spl.c | 1 + arch/microblaze/cpu/exception.c | 1 + arch/microblaze/lib/bootm.c | 1 + arch/mips/lib/traps.c | 1 + arch/mips/mach-ath79/ar934x/clk.c | 1 + arch/mips/mach-jz47xx/jz4780/jz4780.c | 1 + arch/mips/mach-jz47xx/jz4780/sdram.c | 1 + arch/nds32/lib/bootm.c | 1 + arch/nios2/cpu/traps.c | 5 +++-- arch/powerpc/cpu/mpc8xxx/fsl_lbc.c | 1 + arch/riscv/lib/bootm.c | 1 + arch/riscv/lib/interrupts.c | 1 + arch/riscv/lib/reset.c | 1 + arch/riscv/lib/spl.c | 1 + arch/sandbox/cpu/spl.c | 1 + arch/x86/cpu/i386/interrupt.c | 1 + arch/x86/cpu/quark/mrc_util.c | 1 + arch/x86/lib/bootm.c | 1 + arch/x86/lib/spl.c | 1 + arch/x86/lib/tpl.c | 1 + board/BuR/brppt2/board.c | 1 + board/armadeus/apf27/apf27.c | 1 + board/bosch/shc/mux.c | 1 + board/compulab/cl-som-imx7/spl.c | 1 + board/compulab/cm_fx6/spl.c | 1 + board/compulab/cm_t43/spl.c | 1 + board/firefly/firefly-rk3288/firefly-rk3288.c | 1 + board/freescale/imx8mm_evk/spl.c | 1 + board/freescale/imx8mn_evk/spl.c | 1 + board/freescale/imx8mq_evk/spl.c | 1 + board/freescale/ls1012ardb/ls1012ardb.c | 1 + board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 1 + board/gateworks/gw_ventana/gw_ventana_spl.c | 1 + board/gdsys/p1022/controlcenterd-id.c | 1 + board/renesas/alt/alt.c | 1 + board/renesas/condor/condor.c | 1 + board/renesas/draak/draak.c | 1 + board/renesas/eagle/eagle.c | 1 + board/renesas/ebisu/ebisu.c | 1 + board/renesas/gose/gose.c | 1 + board/renesas/koelsch/koelsch.c | 1 + board/renesas/lager/lager.c | 1 + board/renesas/porter/porter.c | 1 + board/renesas/silk/silk.c | 1 + board/samsung/common/board.c | 1 + board/st/stm32mp1/stm32mp1.c | 1 + board/sunxi/board.c | 1 + board/technexion/pico-imx6ul/spl.c | 1 + board/ti/ks2_evm/board.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + common/board_f.c | 1 + common/board_r.c | 1 + common/bootstage.c | 1 + common/cli.c | 1 + common/spl/spl.c | 1 + common/spl/spl_opensbi.c | 1 + drivers/cache/cache-v5l2.c | 1 + drivers/ddr/altera/sdram_s10.c | 1 + drivers/misc/imx8/scu_api.c | 1 + drivers/mmc/fsl_esdhc_spl.c | 1 + drivers/mtd/nand/raw/mxc_nand_spl.c | 1 + drivers/mtd/spi/fsl_espi_spl.c | 1 + drivers/net/fsl_mcdmafec.c | 1 + drivers/net/mcffec.c | 1 + drivers/net/mpc8xx_fec.c | 1 + drivers/ram/k3-j721e/k3-j721e-ddrss.c | 1 + drivers/ram/rockchip/dmc-rk3368.c | 1 + drivers/ram/rockchip/sdram_rk3188.c | 1 + drivers/ram/rockchip/sdram_rk3288.c | 1 + drivers/serial/serial.c | 1 + drivers/serial/serial_pxa.c | 1 + drivers/sysreset/sysreset-uclass.c | 1 + drivers/usb/musb/musb_udc.c | 1 + drivers/usb/phy/rockchip_usb2_phy.c | 1 + drivers/watchdog/imx_watchdog.c | 1 + drivers/watchdog/mtk_wdt.c | 1 + drivers/watchdog/wdt-uclass.c | 1 + examples/api/libgenwrap.c | 3 ++- include/common.h | 5 ----- include/hang.h | 22 +++++++++++++++++++ lib/fdtdec.c | 1 + lib/hang.c | 1 + lib/libavb/avb_sysdeps_posix.c | 1 + lib/panic.c | 1 + lib/zlib/zutil.c | 3 ++- 120 files changed, 145 insertions(+), 11 deletions(-) create mode 100644 include/hang.h diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 62ad8b8c25..23a8aca745 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 7a1b39844e..7c57cab0b1 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index c1a08fb4ac..6a5518f9de 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -9,6 +9,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 7a378d93df..d8326d1147 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h index 4a573208df..fc97c55114 100644 --- a/arch/arm/include/asm/armv8/mmu.h +++ b/arch/arm/include/asm/armv8/mmu.h @@ -7,6 +7,7 @@ #ifndef _ASM_ARMV8_MMU_H_ #define _ASM_ARMV8_MMU_H_ +#include #include /* diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 769a64257f..a135bcfc7b 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c index e185bfe0c6..b91b408f64 100644 --- a/arch/arm/lib/div0.c +++ b/arch/arm/lib/div0.c @@ -4,10 +4,10 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ +#include + /* Replacement (=dummy) for GNU/Linux division-by zero handler */ void __div0 (void) { - extern void hang (void); - hang(); } diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c index 6da6d41be2..156150c89c 100644 --- a/arch/arm/mach-at91/spl.c +++ b/arch/arm/mach-at91/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index 1065f090e0..822f877de7 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c index 85290be369..6ee0e1c24c 100644 --- a/arch/arm/mach-at91/spl_atmel.c +++ b/arch/arm/mach-at91/spl_atmel.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c index be3daa9bc0..d44e840aa0 100644 --- a/arch/arm/mach-davinci/spl.c +++ b/arch/arm/mach-davinci/spl.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c index 84b9236249..a1fa613708 100644 --- a/arch/arm/mach-imx/mx6/ddr.c +++ b/arch/arm/mach-imx/mx6/ddr.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index dde1635a9d..4d869eed30 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 4e011ee10e..6934e88a96 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c index cc2ec88505..b7de9ba099 100644 --- a/arch/arm/mach-keystone/mon.c +++ b/arch/arm/mach-keystone/mon.c @@ -5,6 +5,7 @@ * Copyright (C) 2012-2019 Texas Instruments Incorporated - http://www.ti.com/ */ +#include #include #include #include diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c index 9b3590ff3d..37f1f219b2 100644 --- a/arch/arm/mach-mediatek/spl.c +++ b/arch/arm/mach-mediatek/spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "init.h" diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 3cb27b7f4b..a99bf166fd 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c index 7c666be758..8c61547ee9 100644 --- a/arch/arm/mach-omap2/am33xx/clock.c +++ b/arch/arm/mach-omap2/am33xx/clock.c @@ -8,6 +8,7 @@ * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/am33xx/fdt.c b/arch/arm/mach-omap2/am33xx/fdt.c index 1005a5be96..c81dc808e5 100644 --- a/arch/arm/mach-omap2/am33xx/fdt.c +++ b/arch/arm/mach-omap2/am33xx/fdt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c index 5932d694d3..9aff83e9df 100644 --- a/arch/arm/mach-omap2/clocks-common.c +++ b/arch/arm/mach-omap2/clocks-common.c @@ -13,6 +13,7 @@ * Rajendra Nayak */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c index bb81063c0f..4658f67e84 100644 --- a/arch/arm/mach-omap2/emif-common.c +++ b/arch/arm/mach-omap2/emif-common.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c index 9eda57c450..598074ba21 100644 --- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c +++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c index 5ba8806dd7..c4adba31e6 100644 --- a/arch/arm/mach-omap2/omap5/fdt.c +++ b/arch/arm/mach-omap2/omap5/fdt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index f3df8affa3..28b929f84f 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -14,6 +14,7 @@ #include #include +#include #include #include diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c index 10614c99d9..1524eca272 100644 --- a/arch/arm/mach-rockchip/bootrom.c +++ b/arch/arm/mach-rockchip/bootrom.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c index 1b012f7f67..61d410d780 100644 --- a/arch/arm/mach-rockchip/rk3188/rk3188.c +++ b/arch/arm/mach-rockchip/rk3188/rk3188.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 514032a44a..7d0e6fa1af 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index c3734cb070..31a3eb4c28 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c index 4498ab55df..1fbb732a03 100644 --- a/arch/arm/mach-socfpga/mailbox_s10.c +++ b/arch/arm/mach-socfpga/mailbox_s10.c @@ -5,6 +5,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 d36732447b..4679b870b4 100644 --- a/arch/arm/mach-socfpga/spl_a10.c +++ b/arch/arm/mach-socfpga/spl_a10.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c index 408e409375..9c8c12ddc2 100644 --- a/arch/arm/mach-socfpga/spl_gen5.c +++ b/arch/arm/mach-socfpga/spl_gen5.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c index ec65e1ce64..c02fa7d518 100644 --- a/arch/arm/mach-socfpga/spl_s10.c +++ b/arch/arm/mach-socfpga/spl_s10.c @@ -4,6 +4,7 @@ * */ +#include #include #include #include diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index a3b0d6f382..ca4231cd0d 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c index 0762144ecf..c5361ca73d 100644 --- a/arch/arm/mach-tegra/cboot.c +++ b/arch/arm/mach-tegra/cboot.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-uniphier/spl_board_init.c b/arch/arm/mach-uniphier/spl_board_init.c index d09c91ab42..c7262d70a5 100644 --- a/arch/arm/mach-uniphier/spl_board_init.c +++ b/arch/arm/mach-uniphier/spl_board_init.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "init.h" diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c index 9b7c0be951..96ba90fb7a 100644 --- a/arch/arm/mach-zynq/spl.c +++ b/arch/arm/mach-zynq/spl.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include diff --git a/arch/microblaze/cpu/exception.c b/arch/microblaze/cpu/exception.c index bdcbe08685..b8dedc4e19 100644 --- a/arch/microblaze/cpu/exception.c +++ b/arch/microblaze/cpu/exception.c @@ -6,6 +6,7 @@ */ #include +#include #include void _hw_exception_handler (void) diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index efd5acf359..2d6a41be2f 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index 6fe8ebd16b..b8568c00fe 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/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c index fc4625d62a..09bdc253ae 100644 --- a/arch/mips/mach-ath79/ar934x/clk.c +++ b/arch/mips/mach-ath79/ar934x/clk.c @@ -5,6 +5,7 @@ #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 0ae5e09e01..015840de25 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/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c index 5b25c8d002..65afefe53e 100644 --- a/arch/mips/mach-jz47xx/jz4780/sdram.c +++ b/arch/mips/mach-jz47xx/jz4780/sdram.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c index a472f6a187..1003bc87b9 100644 --- a/arch/nds32/lib/bootm.c +++ b/arch/nds32/lib/bootm.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/nios2/cpu/traps.c b/arch/nios2/cpu/traps.c index 1c3cc03178..087a05097d 100644 --- a/arch/nios2/cpu/traps.c +++ b/arch/nios2/cpu/traps.c @@ -4,8 +4,9 @@ * Scott McNutt */ -#include #include +#include +#include void trap_handler (struct pt_regs *regs) { @@ -21,5 +22,5 @@ void soft_emulation (struct pt_regs *regs) */ printf ("\n\n*** ERROR: unimplemented instruction @ %08x\n", regs->reg[29] - 4); - hang (); + hang(); } diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c index c43732f7c5..afcb75ba17 100644 --- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c +++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c @@ -4,6 +4,7 @@ */ #include +#include #include #ifdef CONFIG_MPC83xx diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index d1d1573c62..fad16901c5 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index 3b25c5b7a7..512dce0619 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/riscv/lib/reset.c b/arch/riscv/lib/reset.c index b8cecb309d..ce3c1cf872 100644 --- a/arch/riscv/lib/reset.c +++ b/arch/riscv/lib/reset.c @@ -5,6 +5,7 @@ #include #include +#include int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c index dc7577f751..ae07bbe40a 100644 --- a/arch/riscv/lib/spl.c +++ b/arch/riscv/lib/spl.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 44c68a39bc..d5f683bbaa 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index 991cf5c56b..70edbe06e4 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/quark/mrc_util.c b/arch/x86/cpu/quark/mrc_util.c index 8a68ddba97..b0bc59b71e 100644 --- a/arch/x86/cpu/quark/mrc_util.c +++ b/arch/x86/cpu/quark/mrc_util.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 5443a862ab..07d8f1f279 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index f0e2bf053d..90baec2a17 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c index 784e3a02de..34804b53cc 100644 --- a/arch/x86/lib/tpl.c +++ b/arch/x86/lib/tpl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c index 590e92b5a0..c91d2f9494 100644 --- a/board/BuR/brppt2/board.c +++ b/board/BuR/brppt2/board.c @@ -8,6 +8,7 @@ */ #include #include +#include #include #include #include diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c index 75395d92cd..29e0bf388d 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/bosch/shc/mux.c b/board/bosch/shc/mux.c index b04c5914f0..0a97eafea6 100644 --- a/board/bosch/shc/mux.c +++ b/board/bosch/shc/mux.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cl-som-imx7/spl.c b/board/compulab/cl-som-imx7/spl.c index 6833608a53..360c4df17b 100644 --- a/board/compulab/cl-som-imx7/spl.c +++ b/board/compulab/cl-som-imx7/spl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index 1ddf424e42..592d741095 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c index fdab9c3fd1..016c63a509 100644 --- a/board/compulab/cm_t43/spl.c +++ b/board/compulab/cm_t43/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c index a3f784f0a3..a2b0eb5a99 100644 --- a/board/firefly/firefly-rk3288/firefly-rk3288.c +++ b/board/firefly/firefly-rk3288/firefly-rk3288.c @@ -4,6 +4,7 @@ */ #include +#include #ifdef CONFIG_SPL_BUILD static int setup_led(void) diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index d125dc9317..a26fc96b91 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index 7bc22d905f..7aed14c52b 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c index 9164cfb9d8..e442510f44 100644 --- a/board/freescale/imx8mq_evk/spl.c +++ b/board/freescale/imx8mq_evk/spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index 90c1824e46..0f665c7bc6 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -5,6 +5,7 @@ #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 c85243f58b..71fca8ca1e 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 @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index b0891379a1..80fec5f9cf 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 04d3809566..ad56dd7d01 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 70c14d9f33..a6d7cb48a2 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c index 11fbd5b07d..6505beda81 100644 --- a/board/renesas/condor/condor.c +++ b/board/renesas/condor/condor.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c index 7ad21f9812..2f9364c484 100644 --- a/board/renesas/draak/draak.c +++ b/board/renesas/draak/draak.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c index d5f40717d4..cf06a173e4 100644 --- a/board/renesas/eagle/eagle.c +++ b/board/renesas/eagle/eagle.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c index b608c61e23..81d7f8eafa 100644 --- a/board/renesas/ebisu/ebisu.c +++ b/board/renesas/ebisu/ebisu.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c index c137da64b3..eb6ee6f6a4 100644 --- a/board/renesas/gose/gose.c +++ b/board/renesas/gose/gose.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index ff7e458b3c..e09d3d0a63 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index d6b388fead..9ac9515925 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index b9c29349cc..097710b479 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c index b69e7035ab..e7cbd75776 100644 --- a/board/renesas/silk/silk.c +++ b/board/renesas/silk/silk.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index ee2fc7971e..5d4646d14c 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/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index cee3500737..5f6bcab034 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sunxi/board.c b/board/sunxi/board.c index a7c4f7f71c..6afea6ef42 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index d3cbaf3989..41b053ab1c 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index da98c1c739..6554c0eb11 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -9,6 +9,7 @@ #include #include "board.h" #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 920d0d3420..c6a14a0554 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 3c6877da33..3f0132a6e3 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/common/board_r.c b/common/board_r.c index b13d310774..5a80e7e439 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/common/bootstage.c b/common/bootstage.c index 79972e46f2..d2ed33663b 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/common/cli.c b/common/cli.c index 67ceb635a6..7ffe902b88 100644 --- a/common/cli.c +++ b/common/cli.c @@ -15,6 +15,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/spl/spl.c b/common/spl/spl.c index d51dbe9942..4fbc6d6762 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/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c index 6404373eca..a136073fdb 100644 --- a/common/spl/spl_opensbi.c +++ b/common/spl/spl_opensbi.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c index d367171b36..1373e7c387 100644 --- a/drivers/cache/cache-v5l2.c +++ b/drivers/cache/cache-v5l2.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index f61aad2e9a..d7e24a5226 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c index b2fdeef13a..b34191753b 100644 --- a/drivers/misc/imx8/scu_api.c +++ b/drivers/misc/imx8/scu_api.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c index 3021c3d6d4..afe55fad9d 100644 --- a/drivers/mmc/fsl_esdhc_spl.c +++ b/drivers/mmc/fsl_esdhc_spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c index 6c03db8428..e1e542519d 100644 --- a/drivers/mtd/nand/raw/mxc_nand_spl.c +++ b/drivers/mtd/nand/raw/mxc_nand_spl.c @@ -11,6 +11,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 580b1e24b7..5c41d7558c 100644 --- a/drivers/mtd/spi/fsl_espi_spl.c +++ b/drivers/mtd/spi/fsl_espi_spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index b2936b78d7..ec912a6cca 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 9a3a8455a1..96f6321e94 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c index 0a80985192..69b2174ab3 100644 --- a/drivers/net/mpc8xx_fec.c +++ b/drivers/net/mpc8xx_fec.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c index 9feb0aa766..a9b7d40890 100644 --- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c +++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c index 9df8f8f4af..8addee8cc3 100644 --- a/drivers/ram/rockchip/dmc-rk3368.c +++ b/drivers/ram/rockchip/dmc-rk3368.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c index d3e4316ef0..9b5eb38ecc 100644 --- a/drivers/ram/rockchip/sdram_rk3188.c +++ b/drivers/ram/rockchip/sdram_rk3188.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c index 690751d074..3eb14cdb32 100644 --- a/drivers/ram/rockchip/sdram_rk3288.c +++ b/drivers/ram/rockchip/sdram_rk3288.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index bf5f39215d..baeaeaac8e 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c index cf4d8f6442..6f8f7e1198 100644 --- a/drivers/serial/serial_pxa.c +++ b/drivers/serial/serial_pxa.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index 8eff6036e7..51fdb1055e 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c index 584564bac2..4d7723621d 100644 --- a/drivers/usb/musb/musb_udc.c +++ b/drivers/usb/musb/musb_udc.c @@ -38,6 +38,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c index 69e408b6c1..ec998901ab 100644 --- a/drivers/usb/phy/rockchip_usb2_phy.c +++ b/drivers/usb/phy/rockchip_usb2_phy.c @@ -4,6 +4,7 @@ */ #include +#include #include #include "../gadget/dwc2_udc_otg_priv.h" diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c index 62bf25e9cc..01762df019 100644 --- a/drivers/watchdog/imx_watchdog.c +++ b/drivers/watchdog/imx_watchdog.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index dafd2b56a8..669a32320d 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index bbfac4f0f9..cf1c527473 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c index 67b2d641fc..769dcc7038 100644 --- a/examples/api/libgenwrap.c +++ b/examples/api/libgenwrap.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -41,7 +42,7 @@ void *malloc (size_t len) return NULL; } -void hang (void) +void hang(void) { while (1) ; } diff --git a/include/common.h b/include/common.h index b25744854c..ca08db0467 100644 --- a/include/common.h +++ b/include/common.h @@ -52,11 +52,6 @@ */ #include -/* - * Function Prototypes - */ -void hang (void) __attribute__ ((noreturn)); - #include /* lib/uuid.c */ diff --git a/include/hang.h b/include/hang.h new file mode 100644 index 0000000000..27cda49359 --- /dev/null +++ b/include/hang.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __HANG_H +#define __HANG_H + +#ifndef __ASSEMBLY__ +/** + * hang() - Print a message and stop execution + * + * This shows a 'hang' message where possible and then goes into an infinite + * loop. This is called by panic() if CONFIG_PANIC_HANG is enabled. + * + * This function does not return. + */ +void hang(void) __attribute__ ((noreturn)); +#endif + +#endif diff --git a/lib/fdtdec.c b/lib/fdtdec.c index f1bdc9f2e2..17051d409c 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/hang.c b/lib/hang.c index 4d026a3e64..578ac78d45 100644 --- a/lib/hang.c +++ b/lib/hang.c @@ -9,6 +9,7 @@ #include #include +#include #include /** diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c index 4ccf41e428..0bb0cc1498 100644 --- a/lib/libavb/avb_sysdeps_posix.c +++ b/lib/libavb/avb_sysdeps_posix.c @@ -3,6 +3,7 @@ * Copyright (C) 2016 The Android Open Source Project */ +#include #include #include diff --git a/lib/panic.c b/lib/panic.c index bae8a35935..8e72c265a6 100644 --- a/lib/panic.c +++ b/lib/panic.c @@ -10,6 +10,7 @@ */ #include +#include #if !defined(CONFIG_PANIC_HANG) #include #endif diff --git a/lib/zlib/zutil.c b/lib/zlib/zutil.c index 227343e48d..609aac55ce 100644 --- a/lib/zlib/zutil.c +++ b/lib/zlib/zutil.c @@ -6,6 +6,7 @@ /* @(#) $Id$ */ #include "zutil.h" +#include #ifndef NO_DUMMY_DECL struct internal_state {int dummy;}; /* for buggy compilers */ @@ -34,7 +35,7 @@ void z_error (m) char *m; { fprintf(stderr, "%s\n", m); - hang (); + hang(); } #endif From patchwork Thu Dec 12 00:47: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: 1208060 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SzCs/yNU"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFcQ1x87z9sRf for ; Thu, 12 Dec 2019 11:51:50 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 78FA281705; Thu, 12 Dec 2019 01:49:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SzCs/yNU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2BE281706; Thu, 12 Dec 2019 01:49:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3270481707 for ; Thu, 12 Dec 2019 01:49:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id r81so542441ilk.0 for ; Wed, 11 Dec 2019 16:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EzeY6EMzPLlf1VToVcqMlkjiNJ8NU310CVp13tGqDFQ=; b=SzCs/yNUg22H1d7RbufmUTsXsX0qnFRUNUhzckujD+ktL83ESV0tACr+Vq9J0hFzLa 2uP4RtUZRSahb96P2DXb/sWul5rfC+T4PtgrCG7Vq1HCGg4YRh8xJLNzMCTx1ZpnKQ4Z m2DZCZoR7sSCf9uLAzO6c212jgHW08q7ESdhs= 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=EzeY6EMzPLlf1VToVcqMlkjiNJ8NU310CVp13tGqDFQ=; b=GMahlUzlFEVovL4vUogvcisAAByC5yYZP/t0goY+J7H8I83eS5XgyTMnlUAS4Blt8T gtA8eB5oE+UFEezm9pzmnkV250POYRnhcPqkDwqqGnSaYad7IQJj6+e3Rpk6JEyCeYEp DQ5HWhoAoyWGq9U5k/iEj9L2lX3u0jXJD9J2pz6S8HhVKcu6ZlR3NdWsbjmBJMW37U7L grxwgz64MVzYlO/FhTpIhfNDGZ+8RkqtY0ebmKjRHfmvRgcrJo4zL/z7tKrsNuwx6fCs JocHShzPomi/P1jKRdhdGvKASvNyvPFZBvluzwmmGTKI23qg/Azsf/TRrKTtMO+8YHdC hslg== X-Gm-Message-State: APjAAAWIO46jaTsOqvj8P9oqVVQB46wvA+s2n58uX5CwqBxuHIxTIG/7 gBryghyAznZkeaOvrr1Or4rQwWQzGJY= X-Google-Smtp-Source: APXvYqzu9AOEtFrwrBGhiwJF9GslKx6iCQBljWI+3SoC3BlD5jJu8ad9cudasDWoziN5mUtFbYndCQ== X-Received: by 2002:a92:690b:: with SMTP id e11mr6037701ilc.4.1576111755901; Wed, 11 Dec 2019 16:49:15 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:15 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 31/35] common: Move check_member() to kernel.h Date: Wed, 11 Dec 2019 17:47:50 -0700 Message-Id: <20191212004755.11091-15-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Joe Hershberger , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean The kernel.h file has a number of useful macros including a few related to structures. Move check_member() there too. Signed-off-by: Simon Glass --- include/common.h | 11 ----------- include/linux/kernel.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/common.h b/include/common.h index ca08db0467..4110f75a93 100644 --- a/include/common.h +++ b/include/common.h @@ -73,17 +73,6 @@ #define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) -/* - * check_member() - Check the offset of a structure member - * - * @structure: Name of structure (e.g. global_data) - * @member: Name of member (e.g. baudrate) - * @offset: Expected offset in bytes - */ -#define check_member(structure, member, offset) _Static_assert( \ - offsetof(struct structure, member) == offset, \ - "`struct " #structure "` offset for `" #member "` is not " #offset) - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 564819a1c0..fefbc07375 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -268,4 +268,15 @@ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) +/* + * check_member() - Check the offset of a structure member + * + * @structure: Name of structure (e.g. global_data) + * @member: Name of member (e.g. baudrate) + * @offset: Expected offset in bytes + */ +#define check_member(structure, member, offset) _Static_assert( \ + offsetof(struct structure, member) == (offset), \ + "`struct " #structure "` offset for `" #member "` is not " #offset) + #endif From patchwork Thu Dec 12 00:47: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: 1208061 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VHRD00/J"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFcb28yVz9sR7 for ; Thu, 12 Dec 2019 11:51:59 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E0C76814ED; Thu, 12 Dec 2019 01:49:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VHRD00/J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3351D816F7; Thu, 12 Dec 2019 01:49:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 84BB3816F7 for ; Thu, 12 Dec 2019 01:49:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id v18so874892iol.2 for ; Wed, 11 Dec 2019 16:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JdRFQgt9/2tv0jRWjq+HOGRx5TlojyfrGux4qiBB5jQ=; b=VHRD00/Jtke+YpE7KE6/f5sQq0BiylOeSQKIaTJgo+t0D2drBi0tR3dBnsX+10QCSr WZ5yoHZsb4lIUtiIt+0Z92aBBC/YNJXVlrRWswDgUcdn5Hw+51xpxCGoShG8tcRQXbLo UnO2l8m1V2gD48Gr8G1YnTHuvOhPu79wTpA3Y= 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=JdRFQgt9/2tv0jRWjq+HOGRx5TlojyfrGux4qiBB5jQ=; b=oDr+k+jcJFV/7EkdSZs59uWEmSAyhdfQ2GECV1a5WlAjSTAAXTNbx8ai9Ann/uFfP/ xhAUc9UlQ0FghaGXlwBlsrmZeBNMu+PfVnQTXNs0mzmosDzadxi03h6EXwMgf+K7oJ9K kyX48HZPjnvtRuQeybVciE1eqm9Y7a5X2YxhCU+o0liFfnuNcLtKZjaWF8znTIR6pgZw Vjo0KiJYuLVF+9DHXUS+SWg3GG0PA9+GxH3XusFgouX2rQtrBsMjzV3HP2DL4zzZWHRA 0F1UGlk0NpW+oOuLAH34EEiGGf6wR8OAwXOhjrtKu+Y+xMdHm4kwJytJJo3rzIWRP82D cFsw== X-Gm-Message-State: APjAAAX/aujtywiFy2YpraGxsTsbYTM56LCAZlfckuu+snoEgU89LgdA jz7XF25HFqgX3uH5gwkVQfrLgfVaeO4= X-Google-Smtp-Source: APXvYqxbONCN9bAnkETmBNDKiViWrUKOktsKmJoP0PX/jEuGOFwupV6zb+lFP6eFeRRl/ginKw6v0Q== X-Received: by 2002:a02:334b:: with SMTP id k11mr5800599jak.51.1576111757208; Wed, 11 Dec 2019 16:49:17 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 32/35] common: Move ROUND() into kernel.h Date: Wed, 11 Dec 2019 17:47:51 -0700 Message-Id: <20191212004755.11091-16-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Joe Hershberger , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move this macro in with all the other rounding macros. Signed-off-by: Simon Glass --- include/common.h | 2 -- include/linux/kernel.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common.h b/include/common.h index 4110f75a93..997828311e 100644 --- a/include/common.h +++ b/include/common.h @@ -71,8 +71,6 @@ /* Put only stuff here that the assembler can digest */ -#define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fefbc07375..b88c210065 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -69,6 +69,8 @@ #define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d)) +#define ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1)) + #if BITS_PER_LONG == 32 # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) #else From patchwork Thu Dec 12 00:47: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: 1208062 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="B1BlG3gx"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFcp0WMjz9sRf for ; Thu, 12 Dec 2019 11:52:10 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2819D81704; Thu, 12 Dec 2019 01:49:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="B1BlG3gx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C924181707; Thu, 12 Dec 2019 01:49:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 51557814ED for ; Thu, 12 Dec 2019 01:49:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id c16so844714ioh.6 for ; Wed, 11 Dec 2019 16:49:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8ooTNP+DPoZUZAIdgWsWNKbFOERIe8H6gC3yQOoRKMU=; b=B1BlG3gxQgmXpzFOlw2aLqOs4QWB4ExldvJGaRTb8iXVlhzsCYJnoGZ+xFhPcM2HTh Y4PC3RYAA4JhjWT5EtPc6s7Lxo6cBzkAilkeXqySvOnGGKIcXzDQTh/ByyCkgyIpbhqm jWYUUot/wLn94GTdeLvBCelY6uGhiPkiELgVY= 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=8ooTNP+DPoZUZAIdgWsWNKbFOERIe8H6gC3yQOoRKMU=; b=UFeumgkhspl4TFxevywI7hGg91iPs8Jc77+8whgeBvkF/sYDy2JnPW/RzMjf5HeWOF 1xKUB1DINuqwWgxXSRcjnl3ReCLFWHmbxauMdxRGmWKwxn49oJ9RtAxT+Ki/8XvDcp5W qtNS2TG+4ZLJOnlpiUIa0AlM54bU7taK/Arg4M4S6OBMyvUUBV01iUXfWaBJrG4LkWmr ntOhfjr/tr/GZk7KMH5mqBSdqdogmnGpZHVReigpbQQzOHjTTTUmrZE92mIqMgJRysbZ 70t91aJZ6TZv6WXrR8ucw5/kJ9a1oL7x8oFwLct068Lsp+hG4HP/rpN3IazOcL4BMBxq YUyA== X-Gm-Message-State: APjAAAXBg1cfaC6wbOMQlvqGJzrb4c1+qJI+5as+WyTpgzzbMiL5BOll AiWUpAxZPS8A7sDBc4Hn/jHrvTPjCDk= X-Google-Smtp-Source: APXvYqz85QJo0rAe1GsHg+Yl8BCsAKwWljZBkBdnMiKkd6XHvf4ifoiIITZblIzgGhnOLW0AEW188w== X-Received: by 2002:a05:6602:24d8:: with SMTP id h24mr922171ioe.27.1576111758805; Wed, 11 Dec 2019 16:49:18 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:18 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 33/35] common: Move and rename CONFIG_SYS_SUPPORT_64BIT_DATA Date: Wed, 11 Dec 2019 17:47:52 -0700 Message-Id: <20191211174637.33.I2f34381f0cb31107db4a96054db4a518ea20f9d4@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Marek Vasut , Tom Rini , Stefan Roese , Pascal Linder , Heinrich Schuchardt , Michal Simek , Boris Brezillon , Christoph Muellner Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This is not really a CONFIG since it is not intended to be set by boards. Move it into the compiler header with other similar defines, and rename it. Signed-off-by: Simon Glass --- README | 2 +- cmd/mem.c | 54 ++++++++++++++++++------------------ common/command.c | 2 +- include/common.h | 4 --- include/compiler.h | 4 +++ lib/display_options.c | 8 +++--- scripts/config_whitelist.txt | 1 - 7 files changed, 37 insertions(+), 38 deletions(-) diff --git a/README b/README index 78f59c391a..c1324c1296 100644 --- a/README +++ b/README @@ -2460,7 +2460,7 @@ typically in board_init_f() and board_init_r(). Configuration Settings: ----------------------- -- CONFIG_SYS_SUPPORT_64BIT_DATA: Defined automatically if compiled as 64-bit. +- MEM_SUPPORT_64BIT_DATA: Defined automatically if compiled as 64-bit. Optionally it can be defined to support 64-bit memory commands. - CONFIG_SYS_LONGHELP: Defined when you want long help messages included; diff --git a/cmd/mem.c b/cmd/mem.c index 4de5ab01fd..f32985ca7d 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -107,7 +107,7 @@ static int do_mem_nm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA u64 writeval; #else ulong writeval; @@ -132,7 +132,7 @@ static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* Get the value to write. */ -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA writeval = simple_strtoull(argv[2], NULL, 16); #else writeval = simple_strtoul(argv[2], NULL, 16); @@ -151,7 +151,7 @@ static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) while (count-- > 0) { if (size == 4) *((u32 *)buf) = (u32)writeval; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA else if (size == 8) *((u64 *)buf) = (u64)writeval; #endif @@ -228,7 +228,7 @@ static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int rcode = 0; const char *type; const void *buf1, *buf2, *base; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA u64 word1, word2; #else ulong word1, word2; @@ -260,7 +260,7 @@ static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (size == 4) { word1 = *(u32 *)buf1; word2 = *(u32 *)buf2; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA } else if (size == 8) { word1 = *(u64 *)buf1; word2 = *(u64 *)buf2; @@ -274,7 +274,7 @@ static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (word1 != word2) { ulong offset = buf1 - base; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA printf("%s at 0x%p (%#0*llx) != %s at 0x%p (%#0*llx)\n", type, (void *)(addr1 + offset), size, word1, type, (void *)(addr2 + offset), size, word2); @@ -378,7 +378,7 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc, { ulong addr, length, i, bytes; int size; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA volatile u64 *llp; #endif volatile u32 *longp; @@ -411,7 +411,7 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc, * If we have only one object, just run infinite loops. */ if (length == 1) { -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA if (size == 8) { llp = (u64 *)buf; for (;;) @@ -433,7 +433,7 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc, i = *cp; } -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA if (size == 8) { for (;;) { llp = (u64 *)buf; @@ -476,7 +476,7 @@ static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc, { ulong addr, length, i, bytes; int size; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA volatile u64 *llp; u64 data; #else @@ -506,7 +506,7 @@ static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc, length = simple_strtoul(argv[2], NULL, 16); /* data to write */ -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA data = simple_strtoull(argv[3], NULL, 16); #else data = simple_strtoul(argv[3], NULL, 16); @@ -519,7 +519,7 @@ static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc, * If we have only one object, just run infinite loops. */ if (length == 1) { -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA if (size == 8) { llp = (u64 *)buf; for (;;) @@ -541,7 +541,7 @@ static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc, *cp = data; } -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA if (size == 8) { for (;;) { llp = (u64 *)buf; @@ -968,7 +968,7 @@ static int mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) { ulong addr; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA u64 i; #else ulong i; @@ -1007,7 +1007,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) printf("%08lx:", addr); if (size == 4) printf(" %08x", *((u32 *)ptr)); -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA else if (size == 8) printf(" %016llx", *((u64 *)ptr)); #endif @@ -1034,7 +1034,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) #endif else { char *endp; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA i = simple_strtoull(console_buffer, &endp, 16); #else i = simple_strtoul(console_buffer, &endp, 16); @@ -1046,7 +1046,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) bootretry_reset_cmd_timeout(); if (size == 4) *((u32 *)ptr) = i; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA else if (size == 8) *((u64 *)ptr) = i; #endif @@ -1140,7 +1140,7 @@ static int do_random(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( md, 3, 1, do_mem_md, "memory display", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address [# of objects]" #else "[.b, .w, .l] address [# of objects]" @@ -1151,7 +1151,7 @@ U_BOOT_CMD( U_BOOT_CMD( mm, 2, 1, do_mem_mm, "memory modify (auto-incrementing address)", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address" #else "[.b, .w, .l] address" @@ -1162,7 +1162,7 @@ U_BOOT_CMD( U_BOOT_CMD( nm, 2, 1, do_mem_nm, "memory modify (constant address)", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address" #else "[.b, .w, .l] address" @@ -1172,7 +1172,7 @@ U_BOOT_CMD( U_BOOT_CMD( mw, 4, 1, do_mem_mw, "memory write (fill)", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address value [count]" #else "[.b, .w, .l] address value [count]" @@ -1182,7 +1182,7 @@ U_BOOT_CMD( U_BOOT_CMD( cp, 4, 1, do_mem_cp, "memory copy", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] source target count" #else "[.b, .w, .l] source target count" @@ -1192,7 +1192,7 @@ U_BOOT_CMD( U_BOOT_CMD( cmp, 4, 1, do_mem_cmp, "memory compare", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] addr1 addr2 count" #else "[.b, .w, .l] addr1 addr2 count" @@ -1243,7 +1243,7 @@ U_BOOT_CMD( U_BOOT_CMD( loop, 3, 1, do_mem_loop, "infinite loop on address range", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address number_of_objects" #else "[.b, .w, .l] address number_of_objects" @@ -1254,7 +1254,7 @@ U_BOOT_CMD( U_BOOT_CMD( loopw, 4, 1, do_mem_loopw, "infinite write loop on address range", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address number_of_objects data_to_write" #else "[.b, .w, .l] address number_of_objects data_to_write" @@ -1274,7 +1274,7 @@ U_BOOT_CMD( U_BOOT_CMD( mdc, 4, 1, do_mem_mdc, "memory display cyclic", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address count delay(ms)" #else "[.b, .w, .l] address count delay(ms)" @@ -1284,7 +1284,7 @@ U_BOOT_CMD( U_BOOT_CMD( mwc, 4, 1, do_mem_mwc, "memory write cyclic", -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA "[.b, .w, .l, .q] address value delay(ms)" #else "[.b, .w, .l] address value delay(ms)" diff --git a/common/command.c b/common/command.c index ceca992510..0d8bf244be 100644 --- a/common/command.c +++ b/common/command.c @@ -469,7 +469,7 @@ int cmd_get_data_size(char* arg, int default_size) return 2; case 'l': return 4; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA case 'q': return 8; #endif diff --git a/include/common.h b/include/common.h index 997828311e..32999f9cbf 100644 --- a/include/common.h +++ b/include/common.h @@ -35,10 +35,6 @@ #include #include -#ifdef __LP64__ -#define CONFIG_SYS_SUPPORT_64BIT_DATA -#endif - #include #include /* boot information for Linux kernel */ diff --git a/include/compiler.h b/include/compiler.h index 29507f9840..0eaa8c86bd 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -144,4 +144,8 @@ typedef unsigned long int uintptr_t; #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) +#ifdef __LP64__ +#define MEM_SUPPORT_64BIT_DATA +#endif + #endif diff --git a/lib/display_options.c b/lib/display_options.c index ec16d75e0e..74f769d9ff 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -137,7 +137,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count, { /* linebuf as a union causes proper alignment */ union linebuf { -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA uint64_t uq[MAX_LINE_LENGTH_BYTES/sizeof(uint64_t) + 1]; #endif uint32_t ui[MAX_LINE_LENGTH_BYTES/sizeof(uint32_t) + 1]; @@ -145,7 +145,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count, uint8_t uc[MAX_LINE_LENGTH_BYTES/sizeof(uint8_t) + 1]; } lb; int i; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA uint64_t __maybe_unused x; #else uint32_t __maybe_unused x; @@ -168,7 +168,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count, for (i = 0; i < thislinelen; i++) { if (width == 4) x = lb.ui[i] = *(volatile uint32_t *)data; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA else if (width == 8) x = lb.uq[i] = *(volatile uint64_t *)data; #endif @@ -178,7 +178,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count, x = lb.uc[i] = *(volatile uint8_t *)data; #if defined(CONFIG_SPL_BUILD) printf(" %x", (uint)x); -#elif defined(CONFIG_SYS_SUPPORT_64BIT_DATA) +#elif defined(MEM_SUPPORT_64BIT_DATA) printf(" %0*llx", width * 2, (long long)x); #else printf(" %0*x", width * 2, x); diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 7b3c73745a..419a375b61 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -3897,7 +3897,6 @@ CONFIG_SYS_STACK_SIZE CONFIG_SYS_STATUS_C CONFIG_SYS_STATUS_OK CONFIG_SYS_STMICRO_BOOT -CONFIG_SYS_SUPPORT_64BIT_DATA CONFIG_SYS_SXCNFG_VAL CONFIG_SYS_TBIPA_VALUE CONFIG_SYS_TCLK From patchwork Thu Dec 12 00:47: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: 1208063 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="imOYk7gW"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFcz3SQ7z9sR7 for ; Thu, 12 Dec 2019 11:52:19 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2A59E81709; Thu, 12 Dec 2019 01:49:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="imOYk7gW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EBA0881708; Thu, 12 Dec 2019 01:49:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4921F8170A for ; Thu, 12 Dec 2019 01:49:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id g12so531271ild.2 for ; Wed, 11 Dec 2019 16:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8T77GmrHUKU2a7BIRPSxAuPsX7ykDBSd/FonyYb/5v4=; b=imOYk7gWB95XY/OSrCDLyxyX7DwN9rzDBtL2swg4dyiekkXntcvd44IMPbn/aAOI1n 93ze62tVFRGZaXfnkcHv3a5NSjRBPqLnilyfTi9bATQ1rrJU1i+KSy+W3A02M7CwBqwS fQNMrcjoYUCmQp8G7XSY805cP0zAbvDZF7yfw= 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=8T77GmrHUKU2a7BIRPSxAuPsX7ykDBSd/FonyYb/5v4=; b=UNXk6o83Iddqj5pM0xX98jIlyIqn2eVeg95KVjDb2ZusoYTDat95lhZVaPqcoxxeyZ qD12b7uUjcpkUcS2n8M1t7F5DDgAlWG9ZqA/HmHIMccwj34A6KYYqXOopCXFjwsAz2HK GcsWnXX/ICppNhBNS8VrCmEmEqgWgXUW+dTSmfj7gz4yiIXzJ9cbI8VnxbR9Cby8narX IoeOurK/Q5Dtmz7MKBb8PwvlTrFd3y8WD9N/H1dXwyZFRvpyciS3ZycwykS93JVhcUqw ZSrkt9TjTnWFpVCAOXCFazJvgVkgMlPoFsDrlIU7foePkgZowwUSUqN3Y9JOShSOj9uV CK2A== X-Gm-Message-State: APjAAAUjttI8RWbupY/t6fBhbOTSfgnRD7TWiBxACziSNn+ywD46CIGV fq+6DNWTN3lSO7KuVmQJRpH8fnIY6/Q= X-Google-Smtp-Source: APXvYqxEJhKPOV/35iBVKb0rW7W7AosF/fdVsdSV4UFlRKCFpvkgwtpMS0BAKJSBqnc5ysqUhKQMpQ== X-Received: by 2002:a92:51:: with SMTP id 78mr5984911ila.121.1576111760079; Wed, 11 Dec 2019 16:49:20 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:19 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 34/35] common: Collect all the header files together Date: Wed, 11 Dec 2019 17:47:53 -0700 Message-Id: <20191212004755.11091-17-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean There are many header files included here. Put them all together since the blank lines are not useful. Signed-off-by: Simon Glass --- include/common.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/include/common.h b/include/common.h index 32999f9cbf..388d98a1db 100644 --- a/include/common.h +++ b/include/common.h @@ -14,7 +14,6 @@ #define __COMMON_H_ 1 #ifndef __ASSEMBLY__ /* put C only stuff in this section */ - #include #include #include @@ -30,43 +29,20 @@ #include #include #include - #include #include #include - #include - #include /* boot information for Linux kernel */ #include /* global data used for startup functions */ - -/* startup functions, used in: - * common/board_f.c - * common/init/board_init.c - * common/board_r.c - * common/board_info.c - */ #include - #include - -/* lib/uuid.c */ #include - -/* lib/vsprintf.c */ #include - -/* lib/net_utils.c */ #include - #include - -#else /* __ASSEMBLY__ */ - #endif /* __ASSEMBLY__ */ -/* Put only stuff here that the assembler can digest */ - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include From patchwork Thu Dec 12 00:47: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: 1208064 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dzDJn1AF"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFd85dvmz9sR7 for ; Thu, 12 Dec 2019 11:52:28 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6DCFF8170F; Thu, 12 Dec 2019 01:49:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dzDJn1AF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 861D4814BC; Thu, 12 Dec 2019 01:49:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6D51C81704 for ; Thu, 12 Dec 2019 01:49:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id a22so867359ios.3 for ; Wed, 11 Dec 2019 16:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IrUgIP9jvwQS1Rw6zrh+tcs2vAZ0w9B7eyL+XvuLoIc=; b=dzDJn1AFL01rkO08vI6Ug7w1TkMSg5GdLA6s+HWNcTav1I1Ab287U0nCx4xdrQxWWs o6jZfWoCAadV2c5tWZftZrk41POsxnliAduZHiIYM0S8jKHnNyeSJivAA9ZfA7U+p+V2 svOnqwV6KfyTKoj6p7SNsKCDGux6uzttF04Rg= 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=IrUgIP9jvwQS1Rw6zrh+tcs2vAZ0w9B7eyL+XvuLoIc=; b=cnaqPP8n/2+zSKZXELPL/twyjgMLBoRhAhAFJPuvKcZ2H1NuEjmTmYFnmm4BU0hctj F5Oaj3DkzcPTMf4FvlwFxcZ05HdnP7eLJQ2jVLhLqTKVofO6nMc1MD9QMAvHMDEe6Kl7 NWOwWq4vFlLNR8mtbwlBhewMVT25EmRKSsQDDrfkiYfWXDojYZ6Vy7Yqywxi3B8nbd3a YzrB2eaaaIJfL3/eOXuPvdQOw2/UgmqmZF31ERo766y/J8mRLOKiQeGfctbxouXfDCIH QpSLinz/K3ipD3SMUBp7CWWx8eOfgzmGVu7Kxxdp6ao8UhxGeJWAqTlh5GLDahQ51/By W77g== X-Gm-Message-State: APjAAAVnaW92rsHZNyvsNRyL1abNr7uRCpRuL1xPc0wFPrZwfQ+c/Er6 09LowX6PQt6eg4mTL0orrGeVcDr/1m8= X-Google-Smtp-Source: APXvYqxQxxN4B5gjrVM7VRbKQZwbKOxEJHLkQBBmJKaivUyEcHPYseQzEru8wyfujGPdHhSKHBJZdA== X-Received: by 2002:a6b:3a8a:: with SMTP id h132mr933329ioa.207.1576111761115; Wed, 11 Dec 2019 16:49:21 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:20 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 35/35] common: Update comment to show progress Date: Wed, 11 Dec 2019 17:47:54 -0700 Message-Id: <20191212004755.11091-18-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Tom Rini , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This file doesn't include any declarations anymore but it does include other headers. Update the header comment to mention this. Signed-off-by: Simon Glass --- include/common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/common.h b/include/common.h index 388d98a1db..0ef8505fc7 100644 --- a/include/common.h +++ b/include/common.h @@ -2,9 +2,8 @@ /* * Common header file for U-Boot * - * This file still includes quite a bit of stuff that should be in separate - * headers. Please think before adding more things. - * Patches to remove things are welcome. + * This file still includes quite a few headers that should be included + * individually as needed. Patches to remove things are welcome. * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.