From patchwork Tue Sep 25 00:31:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 186668 X-Patchwork-Delegate: trini@ti.com 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 6C7582C0090 for ; Tue, 25 Sep 2012 10:35:45 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AEC9E280DC; Tue, 25 Sep 2012 02:35:01 +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 jzYs4Q39afOy; Tue, 25 Sep 2012 02:35:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 406B42811D; Tue, 25 Sep 2012 02:33:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 44C4428081 for ; Tue, 25 Sep 2012 02:33:11 +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 39PP2dkaH2OV for ; Tue, 25 Sep 2012 02:33:11 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by theia.denx.de (Postfix) with ESMTPS id 743562809A for ; Tue, 25 Sep 2012 02:32:23 +0200 (CEST) Received: by mail-pa0-f44.google.com with SMTP id fb11so1811529pad.3 for ; Mon, 24 Sep 2012 17:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=jMjN2l5eIKKpR5R3ruBcyFFUAphkf+h1R8WW3V5S3tc=; b=w0I481hVzlhC66hnGCVZky9IQoi7jPKHolmGzBNmR4A4lwz66RyOE8qau5ILjxMGjr U0Q6Ssy3echbpyOG3jsossVQz9Y0Sg8hQKarzqghFyVxw3F9h4UAMSi3iRE/SldhsSJP RY8oCd5+fhXiEn5hxt6DCwmslRV+czHe0UcAsGy7c+Nqtcsczjz1jeWQeOpyqXC/UtIi 970c004qeQei8QAWXP/MHL+rxCjAfsYl45YO8vhVTu7JW2Z+7t0+ylqc0bpiS9eCpSxK X7tiOjD+M2PGncrKPf+Ydd3bw3i5amNMndfsajtCRjmryboOZJ1uRp7Jh5qP3b4bDZKi Sgrg== Received: by 10.68.189.69 with SMTP id gg5mr12707067pbc.36.1348533142975; Mon, 24 Sep 2012 17:32:22 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id pj10sm10377538pbb.46.2012.09.24.17.32.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 17:32:21 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Mon, 24 Sep 2012 17:31:06 -0700 Message-Id: <1348533068-13038-29-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348533068-13038-1-git-send-email-trini@ti.com> References: <1348533068-13038-1-git-send-email-trini@ti.com> Cc: Sudhakar Rajashekhara , Christian Riesch Subject: [U-Boot] [PATCH v7 28/29] SPL: Rework how we inform about un-headered images 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 First, remove the puts from the case where we don't have an mkimage header as this is somewhat common and intentional for no-arg target images. Second, rework the final switch statement in board_init_r to, in the case of !CONFIG_SPL_OS_BOOT be only about doing debug prints about if we know what the magic is or not (the CONFIG_SPL_OS_BOOT case is unchanged). Then we call jump_to_image_no_args(). This gives us the same behavior as before but with slightly smaller code. Signed-off-by: Tom Rini --- common/spl/spl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 3aa0703..f2f6de7 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -102,7 +102,6 @@ void spl_parse_image_header(const struct image_header *header) spl_image.name, spl_image.load_addr, spl_image.size); } else { /* Signature not found - assume u-boot.bin */ - puts("mkimage signature not found, assuming u-boot.bin ..\n"); debug("mkimage signature not found - ih_magic = %x\n", header->ih_magic); /* Let's assume U-Boot will not be more than 200 KB */ @@ -181,19 +180,17 @@ void board_init_r(gd_t *dummy1, ulong dummy2) switch (spl_image.os) { case IH_OS_U_BOOT: debug("Jumping to U-Boot\n"); - jump_to_image_no_args(); break; #ifdef CONFIG_SPL_OS_BOOT case IH_OS_LINUX: debug("Jumping to Linux\n"); spl_board_prepare_for_linux(); jump_to_image_linux((void *)CONFIG_SYS_SPL_ARGS_ADDR); - break; #endif default: - puts("Unsupported OS image.. Jumping nevertheless..\n"); - jump_to_image_no_args(); + debug("Unsupported OS image.. Jumping nevertheless..\n"); } + jump_to_image_no_args(); } /*