From patchwork Fri Oct 7 07:38:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 118243 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 77634B70C9 for ; Fri, 7 Oct 2011 18:39:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9EC2328ED6; Fri, 7 Oct 2011 09:39:17 +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 6gH8x4OoVCJS; Fri, 7 Oct 2011 09:39:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 195D128F8C; Fri, 7 Oct 2011 09:39:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 08DCE28F27 for ; Fri, 7 Oct 2011 09:39:06 +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 eKtA8YjOlsfJ for ; Fri, 7 Oct 2011 09:39:04 +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-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id C272528ED4 for ; Fri, 7 Oct 2011 09:39:03 +0200 (CEST) Received: by bkaq10 with SMTP id q10so4098276bka.3 for ; Fri, 07 Oct 2011 00:39:02 -0700 (PDT) Received: by 10.223.5.3 with SMTP id 3mr9052946fat.4.1317973142762; Fri, 07 Oct 2011 00:39:02 -0700 (PDT) Received: from localhost ([178.23.216.97]) by mx.google.com with ESMTPS id o22sm11308851fab.11.2011.10.07.00.39.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Oct 2011 00:39:01 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Fri, 7 Oct 2011 09:38:56 +0200 Message-Id: <1317973139-24315-2-git-send-email-monstr@monstr.eu> X-Mailer: git-send-email 1.5.5.1 In-Reply-To: <1317973139-24315-1-git-send-email-monstr@monstr.eu> References: <1317973139-24315-1-git-send-email-monstr@monstr.eu> Subject: [U-Boot] [PATCH 2/5 v4] microblaze: Support flashes on lower addresses 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 Signed-off-by: Michal Simek --- v2: Change symbol references provided by a linker script v3: Move externs to header v4: Add license and copyright with #ifdef protection --- arch/microblaze/include/asm/processor.h | 32 ++++++++++++++++++++++++++++++- arch/microblaze/lib/board.c | 5 ++++ 2 files changed, 36 insertions(+), 1 deletions(-) diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 78b8976..2295d0a 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h @@ -1 +1,31 @@ -/* FIXME: Implement this! */ +/* + * Copyright (C) 2011 Michal Simek + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __ASM_MICROBLAZE_PROCESSOR_H +#define __ASM_MICROBLAZE_PROCESSOR_H + +/* References to section boundaries */ + +extern char __end[]; +extern char __text_start[]; + +#endif /* __ASM_MICROBLAZE_PROCESSOR_H */ diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 5510c12..df27c1c 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -31,6 +31,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -84,6 +85,8 @@ init_fnc_t *init_sequence[] = { NULL, }; +unsigned long monitor_flash_len; + void board_init (void) { bd_t *bd; @@ -105,6 +108,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