From patchwork Mon May 27 05:29:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 246526 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 6DCC72C02AD for ; Mon, 27 May 2013 15:30:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE9E64A048; Mon, 27 May 2013 07:30:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bXizOq5dm2ka; Mon, 27 May 2013 07:30:04 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 69F114A033; Mon, 27 May 2013 07:29:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E9E2D4A02A for ; Mon, 27 May 2013 07:29:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zXU720I8Zohn for ; Mon, 27 May 2013 07:29:45 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=SKIP(-1.5) (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 9553D4A029 for ; Mon, 27 May 2013 07:29:42 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id r4R5Td7O029841 for ; Mon, 27 May 2013 14:29:39 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili12) with ESMTP id r4R5TdG25670 for ; Mon, 27 May 2013 14:29:39 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi16) id r4R5TdGf008207; Mon, 27 May 2013 14:29:39 +0900 Received: from poodle by lomi16.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r4R5TcWV008191; Mon, 27 May 2013 14:29:38 +0900 Received: from beagle.diag.org (beagle.diag.org [10.186.51.83]) by poodle (Postfix) with ESMTP id DEF442740045; Mon, 27 May 2013 14:29:38 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 27 May 2013 14:29:21 +0900 Message-Id: <1369632562-13916-2-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1369632562-13916-1-git-send-email-yamada.m@jp.panasonic.com> References: <1369632562-13916-1-git-send-email-yamada.m@jp.panasonic.com> Subject: [U-Boot] [PATCH 1/2] arm: fix displaying IRQ stack info X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de With CONFIG_USE_IRQ and DEBUG macro defined, display_banner function printed stack address for IRQ and FIQ. Global variables IRQ_STACK_START and FIQ_STACK_START are set in interrupt_init function. The function display_banner is called from board_init_f, while interrupt_init is called from board_init_r. So, display_banner always resulted in just printing initial values of IRQ_STACK_START and FIQ_STACK_START as follows: IRQ Stack: 0badc0de FIQ Stack: 0badc0de It is almost meaningless information because 0x0badc0de is a hard-coded value in arch/arm/cpu/$(CPU)/start.S. This commit moves the stack info display code after interrupt_init call. Signed-off-by: Masahiro Yamada --- arch/arm/lib/board.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 09ab4ad..34a394e 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -126,10 +126,6 @@ static int display_banner(void) #ifdef CONFIG_MODEM_SUPPORT debug("Modem Support enabled\n"); #endif -#ifdef CONFIG_USE_IRQ - debug("IRQ Stack: %08lx\n", IRQ_STACK_START); - debug("FIQ Stack: %08lx\n", FIQ_STACK_START); -#endif return (0); } @@ -650,6 +646,12 @@ void board_init_r(gd_t *id, ulong dest_addr) /* set up exceptions */ interrupt_init(); + +#ifdef CONFIG_USE_IRQ + debug("IRQ Stack: %08lx\n", IRQ_STACK_START); + debug("FIQ Stack: %08lx\n", FIQ_STACK_START); +#endif + /* enable exceptions */ enable_interrupts();