From patchwork Mon Jan 17 04:06:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 79115 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 4DF78B70A9 for ; Mon, 17 Jan 2011 15:12:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5188A28087; Mon, 17 Jan 2011 05:12:09 +0100 (CET) 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 GV8-JzANJ5sj; Mon, 17 Jan 2011 05:12:08 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D0CC328081; Mon, 17 Jan 2011 05:12:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2191628081 for ; Mon, 17 Jan 2011 05:12:04 +0100 (CET) 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 XO-jIhE2ExW6 for ; Mon, 17 Jan 2011 05:12:00 +0100 (CET) X-Greylist: delayed 303 seconds by postgrey-1.27 at theia; Mon, 17 Jan 2011 05:11:58 CET 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 relmlor3.renesas.com (relmlor3.renesas.com [210.160.252.173]) by theia.denx.de (Postfix) with ESMTP id 104A828080 for ; Mon, 17 Jan 2011 05:11:58 +0100 (CET) Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0LF500JF3FFF09C0@relmlor3.idc.renesas.com> for u-boot@lists.denx.de; Mon, 17 Jan 2011 13:06:51 +0900 (JST) Received: from relmlac3.idc.renesas.com ([10.200.69.23]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0LF500E62FFF28E0@relmlir1.idc.renesas.com> for u-boot@lists.denx.de; Mon, 17 Jan 2011 13:06:51 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id C3BE918079; Mon, 17 Jan 2011 13:06:51 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id A3C5A18071; Mon, 17 Jan 2011 13:06:51 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id PAF17209; Mon, 17 Jan 2011 13:06:51 +0900 X-IronPort-AV: E=Sophos;i="4.60,332,1291561200"; d="scan'208";a="6401254" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii2.idc.renesas.com with ESMTP; Mon, 17 Jan 2011 13:06:51 +0900 Message-id: <4D33C05B.2080201@renesas.com> Date: Mon, 17 Jan 2011 13:06:51 +0900 From: Yoshihiro Shimoda User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-version: 1.0 To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] sh: add checking the CONFIG_SYS_NO_FLASH X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Yoshihiro Shimoda --- arch/sh/lib/board.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c index cdac382..b8cd8f3 100644 --- a/arch/sh/lib/board.c +++ b/arch/sh/lib/board.c @@ -43,6 +43,7 @@ const char version_string[] = U_BOOT_VERSION" ("U_BOOT_DATE" - "U_BOOT_TIME")"; unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN; +#if !defined(CONFIG_SYS_NO_FLASH) static int sh_flash_init(void) { gd->bd->bi_flashsize = flash_init(); @@ -54,6 +55,7 @@ static int sh_flash_init(void) return 0; } +#endif #if defined(CONFIG_CMD_NAND) # include @@ -125,7 +127,9 @@ init_fnc_t *init_sequence[] = dram_init, /* SDRAM init */ timer_init, /* SuperH Timer (TCNT0 only) init */ sh_mem_env_init, +#if !defined(CONFIG_SYS_NO_FLASH) sh_flash_init, /* Flash memory(NOR) init*/ +#endif INIT_FUNC_NAND_INIT/* Flash memory (NAND) init */ INIT_FUNC_PCI_INIT /* PCI init */ stdio_init, @@ -157,7 +161,9 @@ void sh_generic_init(void) bd = gd->bd; bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; +#if !defined(CONFIG_SYS_NO_FLASH) bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; +#endif #if defined(CONFIG_SYS_SRAM_BASE) && defined(CONFIG_SYS_SRAM_SIZE) bd->bi_sramstart = CONFIG_SYS_SRAM_BASE; bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;