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 */