From patchwork Tue Oct 10 18:59:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tuomas Tynkkynen X-Patchwork-Id: 824027 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lEaXYZTT"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yBRLc5jj0z9t6M for ; Wed, 11 Oct 2017 06:02:16 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 814E1C21E45; Tue, 10 Oct 2017 19:01:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2A6F1C21E39; Tue, 10 Oct 2017 19:00:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C7736C21D8D; Tue, 10 Oct 2017 19:00:11 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by lists.denx.de (Postfix) with ESMTPS id 7C7D7C21DC5 for ; Tue, 10 Oct 2017 19:00:00 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id a132so24089651lfa.7 for ; Tue, 10 Oct 2017 12:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=x1LxWjUiobgydIb8Kc1WlYoo5nSIshSS1FGrytv8cqs=; b=lEaXYZTTFhu5/FCu3sA09KvAo4uIuAQPFrPBHT+34+fZgoZ90/QfNATc23NokZg9hn WH9//nQL5nxrnaiSopurV0eQKyP02vPDJDmHtH/MY8Qn8G/0nWjqpP7wp9pciRB8HQY7 j8O/E3PZxun747cEbF6d6joQ7gcbVv8f78J6yBEYnCAIkaq9LLcLt67yBDAYVa/GXWlU uF32TQkH3dgcZDfe7atOfv+q4JUhAUy3m+DI5gq3JnyPy760LeQZm6WyNhShKX8IzP4J DmXN9/Nod8vrXH67gEOzYeteP/BBSseP2xzkf64xkVF70dAVJ0bRVVMeH69qERMFUEzq ey3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=x1LxWjUiobgydIb8Kc1WlYoo5nSIshSS1FGrytv8cqs=; b=FcgGXv/tJYB6UspKJE6lxPtL9whclnHsFqb/mq8sa3yJpvvrpmZk1m2e5Y3+I7pTLW +85GoIVM5Gbik8neJVBYjPgsv+oD6bu4Ga1r0NqWNTS0Oox0UlMKJrCAnLEALSJfvGYF rpkKbRGzN2er3RRHGz11f8w6n75TFPOg7ByKS7NAmcpiPHHFObh/vDX9HTGY+MqIi2I6 aWkirXMd8WF5fPBXDXiI7ntB4b6gdikJFox42dTYztpmfgIWV0yDXnVtjqDgYCuGjLWl k+H7HiB5fDnn8xEVopKCIaZ8unzUlVaZGBTB7CPvlh8nxw+IO0VOhpD/29FxB4KDydLC Solg== X-Gm-Message-State: AMCzsaVQP942yy0lj4n2WbQXr0aB9n/njXqRf2D6w3LsmrQzatjoujbP hZ/i489IIP45UQ0ajrFdjCX4FQ== X-Google-Smtp-Source: AOwi7QAu4fN3o38TR+7jNPy92cL87UGj/cfelv3Wpm/OlKmmbeGO0m0tHcYTY9FNJ9SZKthbmtm5jg== X-Received: by 10.25.153.136 with SMTP id b130mr2391964lfe.233.1507661999690; Tue, 10 Oct 2017 11:59:59 -0700 (PDT) Received: from duuni.pp.htv.fi (dytyyyyyk71bpbhncm94t-3.rev.dnainternet.fi. [2001:14ba:400:0:8dd:42c0:9962:5771]) by smtp.gmail.com with ESMTPSA id m3sm1901426lfe.37.2017.10.10.11.59.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2017 11:59:59 -0700 (PDT) From: Tuomas Tynkkynen To: u-boot@lists.denx.de Date: Tue, 10 Oct 2017 21:59:43 +0300 Message-Id: <20171010185943.25696-5-tuomas.tynkkynen@iki.fi> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171010185943.25696-1-tuomas.tynkkynen@iki.fi> References: <20171010185943.25696-1-tuomas.tynkkynen@iki.fi> Subject: [U-Boot] [PATCH 4/4] common: Remove genimg_get_image() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Removal of the legacy DataFlash code turned genimg_get_image() into a no-op. Drop all calls to it and the function itself. Signed-off-by: Tuomas Tynkkynen --- common/bootm.c | 3 --- common/image-fdt.c | 3 --- common/image.c | 27 --------------------------- include/image.h | 1 - 4 files changed, 34 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 32b3ea8e2d..9493a306cd 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -810,9 +810,6 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, bootstage_mark(BOOTSTAGE_ID_CHECK_MAGIC); - /* copy from dataflash if needed */ - img_addr = genimg_get_image(img_addr); - /* check image type, for FIT images get FIT kernel node */ *os_data = *os_len = 0; buf = map_sysmem(img_addr, 0); diff --git a/common/image-fdt.c b/common/image-fdt.c index a2ef409836..1e946467e3 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -294,9 +294,6 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, debug("## Checking for 'FDT'/'FDT Image' at %08lx\n", fdt_addr); - /* copy from dataflash if needed */ - fdt_addr = genimg_get_image(fdt_addr); - /* * Check if there is an FDT image at the * address provided in the second bootm argument diff --git a/common/image.c b/common/image.c index 01f48bf772..06fdca129c 100644 --- a/common/image.c +++ b/common/image.c @@ -385,9 +385,6 @@ void image_print_contents(const void *ptr) * flag. Verification done covers data and header integrity and os/type/arch * fields checking. * - * If dataflash support is enabled routine checks for dataflash addresses - * and handles required dataflash reads. - * * returns: * pointer to a ramdisk image header, if image was found and valid * otherwise, return NULL @@ -885,23 +882,6 @@ int genimg_get_format(const void *img_addr) return IMAGE_FORMAT_INVALID; } -/** - * genimg_get_image - get image from special storage (if necessary) - * @img_addr: image start address - * - * genimg_get_image() checks if provided image start address is located - * in a dataflash storage. If so, image is moved to a system RAM memory. - * - * returns: - * image start address after possible relocation from special storage - */ -ulong genimg_get_image(ulong img_addr) -{ - ulong ram_addr = img_addr; - - return ram_addr; -} - /** * fit_has_config - check if there is a valid FIT configuration * @images: pointer to the bootm command headers structure @@ -1034,9 +1014,6 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, } #endif - /* copy from dataflash if needed */ - rd_addr = genimg_get_image(rd_addr); - /* * Check if there is an initrd image at the * address provided in the second bootm argument @@ -1268,10 +1245,8 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images, /* * Obtain the os FIT header from the images struct - * copy from dataflash if needed */ tmp_img_addr = map_to_sysmem(images->fit_hdr_os); - tmp_img_addr = genimg_get_image(tmp_img_addr); buf = map_sysmem(tmp_img_addr, 0); /* * Check image type. For FIT images get FIT node @@ -1380,10 +1355,8 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images, /* * Obtain the os FIT header from the images struct - * copy from dataflash if needed */ tmp_img_addr = map_to_sysmem(images->fit_hdr_os); - tmp_img_addr = genimg_get_image(tmp_img_addr); buf = map_sysmem(tmp_img_addr, 0); /* * Check image type. For FIT images get FIT node diff --git a/include/image.h b/include/image.h index 93451dd8a4..127cfc5148 100644 --- a/include/image.h +++ b/include/image.h @@ -558,7 +558,6 @@ ulong genimg_get_kernel_addr_fit(char * const img_addr, ulong genimg_get_kernel_addr(char * const img_addr); int genimg_get_format(const void *img_addr); int genimg_has_config(bootm_headers_t *images); -ulong genimg_get_image(ulong img_addr); int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images, uint8_t arch, const ulong *ld_start, ulong * const ld_len);