From patchwork Fri Aug 24 23:58:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 179932 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 16E5F2C00D3 for ; Sat, 25 Aug 2012 10:00:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D912280F0; Sat, 25 Aug 2012 02:00:38 +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 tip83uYhuXGh; Sat, 25 Aug 2012 02:00:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22905280CE; Sat, 25 Aug 2012 02:00:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37FD52809F for ; Sat, 25 Aug 2012 01:59: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 m9G1RIsYEkxY for ; Sat, 25 Aug 2012 01:59:32 +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 419B2280AC for ; Sat, 25 Aug 2012 01:58:56 +0200 (CEST) Received: by mail-pb0-f44.google.com with SMTP id rr4so4207992pbb.3 for ; Fri, 24 Aug 2012 16:58:55 -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=QDdeFQfi/LgmJBtZAV2krMXt/sNEBvDMvWQ6PHrkQgs=; b=Cf1t4EvDi2G4b2qrx2StARZvPESQu3sVS6ANPCgWBq77L/8U6an0A7QWTspy4t4yY3 ae7E6F5jp2lrLheam/+30UE04fL6195SAyG46tA7VeUL6IVutiFl2K4TykwZhKRpvVgW sPud/6Ao6rtRBg/blppGEjDBjgwHc9ko+Z5gn7QsytlAPB+JzSBL2Y9HYKBkKEy6iYPC WwkCEsgsX2HDqDJohgNh9u6j1xOsS3+z4IVaVNFwUk66Gcar+PTN5ydd4JocbVKXUjhS LxhGNmpctyNR5pZCjclMltWUIYDjWBGbna0/4Hhkyn56Kv6Lc4nY2BLHbfGS65VYoCb1 sZMw== Received: by 10.68.203.200 with SMTP id ks8mr16704014pbc.142.1345852735932; Fri, 24 Aug 2012 16:58:55 -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 pg9sm9274015pbb.26.2012.08.24.16.58.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Aug 2012 16:58:55 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 24 Aug 2012 16:58:27 -0700 Message-Id: <1345852714-13138-14-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345852714-13138-1-git-send-email-trini@ti.com> References: <1345852714-13138-1-git-send-email-trini@ti.com> Cc: Sudhakar Rajashekhara , Christian Riesch Subject: [U-Boot] [PATCH v4 13/20] ARM: SPL: Move gpmc_init() to spl_board_init() 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 This is an OMAP/related-specific function, move calling it to spl_board_init() and turn on CONFIG_SPL_BOARD_INIT on the boards that enabled NAND and didn't enable this already. Signed-off-by: Tom Rini --- arch/arm/cpu/armv7/omap-common/boot-common.c | 7 +++++++ arch/arm/cpu/armv7/omap-common/spl_nand.c | 1 - arch/arm/cpu/armv7/omap3/board.c | 3 +++ include/configs/am3517_crane.h | 1 + include/configs/am3517_evm.h | 1 + include/configs/mcx.h | 1 + include/configs/tam3517-common.h | 1 + 7 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c index 3406cfb..ed398fd 100644 --- a/arch/arm/cpu/armv7/omap-common/boot-common.c +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c @@ -49,6 +49,13 @@ u32 spl_boot_mode(void) return omap_bootmode; } +void spl_board_init(void) +{ +#ifdef CONFIG_SPL_NAND_SUPPORT + gpmc_init(); +#endif +} + int board_mmc_init(bd_t *bis) { switch (spl_boot_device()) { diff --git a/arch/arm/cpu/armv7/omap-common/spl_nand.c b/arch/arm/cpu/armv7/omap-common/spl_nand.c index 3e2f359..1e6b5f0 100644 --- a/arch/arm/cpu/armv7/omap-common/spl_nand.c +++ b/arch/arm/cpu/armv7/omap-common/spl_nand.c @@ -35,7 +35,6 @@ void spl_nand_load_image(void) int *dst __attribute__((unused)); debug("spl: nand - using hw ecc\n"); - gpmc_init(); nand_init(); /*use CONFIG_SYS_TEXT_BASE as temporary storage area */ diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c index 3d74f09..52196c8 100644 --- a/arch/arm/cpu/armv7/omap3/board.c +++ b/arch/arm/cpu/armv7/omap3/board.c @@ -106,6 +106,9 @@ int board_mmc_init(bd_t *bis) void spl_board_init(void) { +#ifdef CONFIG_SPL_NAND_SUPPORT + gpmc_init(); +#endif #ifdef CONFIG_SPL_I2C_SUPPORT i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); #endif diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index 54ab3eb..b312028 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h @@ -322,6 +322,7 @@ /* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_TEXT_BASE 0x40200800 #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index ed0a601..ab2ddc0 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -321,6 +321,7 @@ /* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_TEXT_BASE 0x40200800 #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ diff --git a/include/configs/mcx.h b/include/configs/mcx.h index 970c882..d9cfc10 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -309,6 +309,7 @@ /* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_NAND_SOFTECC diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 777f77c..e194b46 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -241,6 +241,7 @@ /* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_CONSOLE #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_NAND_SOFTECC