From patchwork Tue Mar 8 13:40:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 86005 X-Patchwork-Delegate: monstr@monstr.eu 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 5E0A8B6EEE for ; Wed, 9 Mar 2011 00:42:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7F1AB280C9; Tue, 8 Mar 2011 14:40:59 +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 1iTS1VMIMz2c; Tue, 8 Mar 2011 14:40:59 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D5C82810A; Tue, 8 Mar 2011 14:40:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EBF0B280BE for ; Tue, 8 Mar 2011 14:40:46 +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 pdKtSprBPs6p for ; Tue, 8 Mar 2011 14:40:44 +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-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 0CDB128229 for ; Tue, 8 Mar 2011 14:40:15 +0100 (CET) Received: by fxm15 with SMTP id 15so5036483fxm.3 for ; Tue, 08 Mar 2011 05:40:14 -0800 (PST) Received: by 10.223.97.1 with SMTP id j1mr1938232fan.86.1299591614620; Tue, 08 Mar 2011 05:40:14 -0800 (PST) Received: from localhost ([178.23.216.97]) by mx.google.com with ESMTPS id b7sm328481faa.18.2011.03.08.05.40.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 05:40:13 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Tue, 8 Mar 2011 14:40:12 +0100 Message-Id: <1299591612-15614-1-git-send-email-monstr@monstr.eu> X-Mailer: git-send-email 1.5.5.1 Subject: [U-Boot] [PATCH] microblaze: Setup monitor_flash_len 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 Flash address on Microblaze systems could be on higher addresses then ram. This patch fixed this assumption and flash can be located on any address. Signed-off-by: Michal Simek --- arch/microblaze/lib/board.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index c5f7ac4..75d3c86 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -54,6 +54,12 @@ extern int timer_init (void); extern void fsl_init2 (void); #endif +/* section symbols */ +extern char *__end; +extern char *__text_start; + +unsigned long monitor_flash_len; + /* * All attempts to come up with a "common" initialization sequence * that works for all boards and architectures failed: some of the @@ -107,6 +113,8 @@ void board_init (void) bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ + monitor_flash_len = __end - __text_start; + /* * The Malloc area is immediately below the monitor copy in DRAM * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off