From patchwork Fri Aug 31 18:03: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: 181021 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 B601B2C038B for ; Sat, 1 Sep 2012 04:09:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D869280DE; Fri, 31 Aug 2012 20:07:56 +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 GyCPER1TfF2J; Fri, 31 Aug 2012 20:07:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8FF1A280CC; Fri, 31 Aug 2012 20:06:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE664280D2 for ; Fri, 31 Aug 2012 20:04:59 +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 kDBjjIsJtrl6 for ; Fri, 31 Aug 2012 20:04:58 +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-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id A01CC2807F for ; Fri, 31 Aug 2012 20:04:12 +0200 (CEST) Received: by mail-pb0-f44.google.com with SMTP id rr4so5184775pbb.3 for ; Fri, 31 Aug 2012 11:04:12 -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=DtYz/APRUe2m6FWzAKod8jAsc6Psuas2+AXFrkBwBVk=; b=cVXNEBvNL/ULdT/oNl7ugOeM0AVO7T70Tf2x8L4T9kKqKtFW4DVNxMt5o7PscIQEf8 uln8Nb/rYNTvP5+4d/xHerhOgaa6kHPWpHTio9lN0SIGXn9hVA2PNDG+aSh3idgmj4Sn jIeHZ6r6Q0iXmqKH+EWvmYQoOOehoROGZTEFpuAG0yZezw7FYCgQB38Ir2qUQQV3WOmh XEOHUYGz1N9VuveOCOPmRqO9N0HnDI7nkjpXWTGoHAijf1vW2LT8ID38I1dnRUK1GdFM ckjDF6ipKTD9wVsAiTkTCYz5ASJAczfHlDzHdey9XZs/8e8mDEc3oK8erVGrWmZQDI7t H9yQ== Received: by 10.68.203.196 with SMTP id ks4mr18628000pbc.107.1346436252097; Fri, 31 Aug 2012 11:04:12 -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 sr4sm3887134pbc.24.2012.08.31.11.04.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 31 Aug 2012 11:04:10 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 31 Aug 2012 11:03:06 -0700 Message-Id: <1346436196-27742-20-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346436196-27742-1-git-send-email-trini@ti.com> References: <1346436196-27742-1-git-send-email-trini@ti.com> Cc: Sudhakar Rajashekhara , Scott Wood , Christian Riesch Subject: [U-Boot] [PATCH v6 19/29] SPL: NAND: Move arch/arm/cpu/armv7/omap-common/spl_nand.c to common/spl 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 We move the spl_nand_load_image function to common/spl. This will allow for easier integration of SPL-boots-Linux code on other arches. Signed-off-by: Tom Rini --- Changes in v4: - Leave nand_spl_load.c alone, move the new load into nand_spl_simple.c Changes in v5: - Move the file to common/spl/ rather than integrate with another file, after talking with Scott Wood Changes in v6: - Make common/spl/spl_nand.o build for CONFIG_SPL_NAND_SUPPORT (noticed by Scott Wood) arch/arm/cpu/armv7/omap-common/Makefile | 6 ------ common/spl/Makefile | 1 + .../armv7/omap-common => common/spl}/spl_nand.c | 10 ++++------ 3 files changed, 5 insertions(+), 12 deletions(-) rename {arch/arm/cpu/armv7/omap-common => common/spl}/spl_nand.c (94%) diff --git a/arch/arm/cpu/armv7/omap-common/Makefile b/arch/arm/cpu/armv7/omap-common/Makefile index 837e22e..0e0b641 100644 --- a/arch/arm/cpu/armv7/omap-common/Makefile +++ b/arch/arm/cpu/armv7/omap-common/Makefile @@ -45,12 +45,6 @@ COBJS += boot-common.o SOBJS += lowlevel_init.o endif -ifdef CONFIG_SPL_BUILD -ifdef CONFIG_SPL_NAND_SUPPORT -COBJS += spl_nand.o -endif -endif - ifndef CONFIG_SPL_BUILD ifneq ($(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) COBJS += mem-common.o diff --git a/common/spl/Makefile b/common/spl/Makefile index b61b438..b9c9fd8 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -16,6 +16,7 @@ LIB = $(obj)libspl.o ifdef CONFIG_SPL_BUILD COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o +COBJS-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o endif COBJS := $(sort $(COBJS-y)) diff --git a/arch/arm/cpu/armv7/omap-common/spl_nand.c b/common/spl/spl_nand.c similarity index 94% rename from arch/arm/cpu/armv7/omap-common/spl_nand.c rename to common/spl/spl_nand.c index 9e9206c..61de5a4 100644 --- a/arch/arm/cpu/armv7/omap-common/spl_nand.c +++ b/common/spl/spl_nand.c @@ -21,12 +21,10 @@ * MA 02111-1307 USA */ #include +#include #include -#include -#include #include #include -#include void spl_nand_load_image(void) { @@ -71,10 +69,10 @@ void spl_nand_load_image(void) nand_deselect(); return; } else { - printf("The Expected Linux image was not" - "found. Please check your NAND" + puts("The Expected Linux image was not " + "found. Please check your NAND " "configuration.\n"); - printf("Trying to start u-boot now...\n"); + puts("Trying to start u-boot now...\n"); } } #endif