From patchwork Mon Mar 7 07:50:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 85692 X-Patchwork-Delegate: iwamatsu@nigauri.org 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 C6236B70E7 for ; Mon, 7 Mar 2011 18:59:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F2E8D28145; Mon, 7 Mar 2011 08:58:55 +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 AjCtgQU7DVbA; Mon, 7 Mar 2011 08:58:55 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20A2E2812C; Mon, 7 Mar 2011 08:58:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F274F280D0 for ; Mon, 7 Mar 2011 08:58:45 +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 n+Nkzi6uKKzy for ; Mon, 7 Mar 2011 08:58:41 +0100 (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 mail-pv0-f172.google.com (mail-pv0-f172.google.com [74.125.83.172]) by theia.denx.de (Postfix) with ESMTPS id 0B81F280CF for ; Mon, 7 Mar 2011 08:58:39 +0100 (CET) Received: by pve39 with SMTP id 39so729522pve.3 for ; Sun, 06 Mar 2011 23:58:37 -0800 (PST) Received: by 10.142.141.8 with SMTP id o8mr3019490wfd.164.1299484717142; Sun, 06 Mar 2011 23:58:37 -0800 (PST) Received: from localhost.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id p40sm4052043wfc.5.2011.03.06.23.58.35 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 23:58:36 -0800 (PST) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de Date: Mon, 7 Mar 2011 16:50:57 +0900 Message-Id: <1299484258-6042-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.2.3 Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH 1/2] sh: Add handling of CONFIG_SYS_FLASH_BASE for board.c 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Some board of SH does not have flash memoy. This change initializes bi_flashstart, when CONFIG_SYS_FLASH_BASE was defined, Signed-off-by: Nobuhiro Iwamatsu --- 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 968566c..81244ae 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_FLASH_BASE) 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_FLASH_BASE) 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_FLASH_BASE) 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;