From patchwork Fri Aug 1 00:40:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Wu X-Patchwork-Id: 375486 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 65ADA14013B for ; Fri, 1 Aug 2014 10:40:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B4AE4A044; Fri, 1 Aug 2014 02:40:47 +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 bx6lmlY+NBIP; Fri, 1 Aug 2014 02:40:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 657CB4A05D; Fri, 1 Aug 2014 02:40:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B258B4A044 for ; Fri, 1 Aug 2014 02:40:33 +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 e5sPh423uUen for ; Fri, 1 Aug 2014 02:40:30 +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-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by theia.denx.de (Postfix) with ESMTPS id 080744A02F for ; Fri, 1 Aug 2014 02:40:24 +0200 (CEST) Received: by mail-pa0-f54.google.com with SMTP id fa1so4626753pad.41 for ; Thu, 31 Jul 2014 17:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=swvc+rbcft3e0rX/LyeZkA8noRrIgJaVOU2EnRuoP1s=; b=jDHKrwjlQ6cWJ8xGR2Z5cwlH9PPYLWxAT4TojCam8BABrZj4+evavV6Rh1R2T5xnWH wfK+RenJ/yj7/Ns2sHDYAn8oWvBM+2rPSY0w344YhEQDqSFwZiMDE+V5cxy17lPkx/pq pCk4xSU50uoHk22Hb6lVsAp2sW3+DfC4IxauzAQYy1dzoytlIm5xqgcivqzZV56O+dHF NuTFkI5kLmF02bFqrtXctVDOSbG98/fXU7lypHqzBIsSRk4rhNxUMZutkr1d5PYWVLbG aau8uiiroOzTedaCTSamSrO3X1dzEIYRp/CgtEY4JUjE4OPZGOgKfBf8YbHDSuIvay2u BOMQ== X-Received: by 10.68.93.65 with SMTP id cs1mr1897654pbb.52.1406853623544; Thu, 31 Jul 2014 17:40:23 -0700 (PDT) Received: from localhost (thunderhill.nvidia.com. [216.228.112.22]) by mx.google.com with ESMTPSA id ez1sm6756618pbd.91.2014.07.31.17.40.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Jul 2014 17:40:22 -0700 (PDT) From: Bryan Wu X-Google-Original-From: Bryan Wu To: sjg@chromium.org, trini@ti.com, swarren@wwwdotorg.org, u-boot@lists.denx.de Date: Thu, 31 Jul 2014 17:40:00 -0700 Message-Id: <1406853600-30615-4-git-send-email-pengw@nvidia.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406853600-30615-1-git-send-email-pengw@nvidia.com> References: <1406853600-30615-1-git-send-email-pengw@nvidia.com> Subject: [U-Boot] [PATCH 3/3] bootm: use genimg_get_kernel_addr() 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 Use the new API which is originally taken out from boot_get_kernel of bootm.c Signed-off-by: Bryan Wu Tested-by: Stephen Warren Reviewed-by: Stephen Warren --- common/bootm.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 7ec2ed8..aee68cd 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -731,26 +731,7 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, int os_noffset; #endif - /* find out kernel image address */ - if (argc < 1) { - img_addr = load_addr; - debug("* kernel: default image load address = 0x%08lx\n", - load_addr); -#if defined(CONFIG_FIT) - } else if (fit_parse_conf(argv[0], load_addr, &img_addr, - &fit_uname_config)) { - debug("* kernel: config '%s' from image at 0x%08lx\n", - fit_uname_config, img_addr); - } else if (fit_parse_subimage(argv[0], load_addr, &img_addr, - &fit_uname_kernel)) { - debug("* kernel: subimage '%s' from image at 0x%08lx\n", - fit_uname_kernel, img_addr); -#endif - } else { - img_addr = simple_strtoul(argv[0], NULL, 16); - debug("* kernel: cmdline image address = 0x%08lx\n", - img_addr); - } + img_addr = genimg_get_kernel_addr(argv[0]); bootstage_mark(BOOTSTAGE_ID_CHECK_MAGIC); @@ -807,6 +788,10 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, #endif #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: + if (!fit_parse_conf(argv[0], load_addr, &img_addr, + fit_uname_config)) + fit_parse_subimage(argv[0], load_addr, &img_addr, + fit_uname_kernel); os_noffset = fit_image_load(images, img_addr, &fit_uname_kernel, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_KERNEL,