From patchwork Mon Jul 4 11:06:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Torsten Koschorrek X-Patchwork-Id: 103089 X-Patchwork-Delegate: sbabic@denx.de 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 63CF0B6F6B for ; Mon, 4 Jul 2011 21:06:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5BDA4280A8; Mon, 4 Jul 2011 13:06:50 +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 Z1hY7pO+jaR0; Mon, 4 Jul 2011 13:06:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 534202809B; Mon, 4 Jul 2011 13:06:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B05F2809B for ; Mon, 4 Jul 2011 13:06:45 +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 C6+CvOEQqDwH for ; Mon, 4 Jul 2011 13:06:43 +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 moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by theia.denx.de (Postfix) with ESMTP id D08D728097 for ; Mon, 4 Jul 2011 13:06:42 +0200 (CEST) Received: from [192.168.1.34] (p578becea.dip0.t-ipconnect.de [87.139.236.234]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MRNhj-1R7kq72Jg7-00Uens; Mon, 04 Jul 2011 13:06:40 +0200 Message-ID: <4E119EBE.7020102@synertronixx.de> Date: Mon, 04 Jul 2011 13:06:38 +0200 From: Torsten Koschorrek User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100308 Mozilla/5.0 MIME-Version: 1.0 To: u-boot@lists.denx.de X-Provags-ID: V02:K0:IP1IvPyRIlIjJ+IuTTeOMGFMPtJV8Cbm3e1AIKGPSu9 0xVMRgP5SeTOKsUrHtmGmFeTrZtgZ6nn5qPkwGGGSySXJjW9Dl fPESoOancv4sLkWQcNqMF2ei/4MabAflIO3N1b7Hz7PjEiddZ+ BtAPsyo6UuXPrI/BOS122fjn6rmy5jU6GoxMe3qe+c7MExTvzS 9TAMH5ArI8qHb5bNKWUY7oQwf7eLP8/Adfksx8ITIk= Subject: [U-Boot] [PATCH v2] scb9328: Add ARM relocation support 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 This patch fixes compiler errors due to missing definitions of CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR. It also does some cleanup: CONFIG_SYS_TEXT_BASE was moved to scb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks. CONFIG_NR_DRAM_BANKS will ever be 1. Signed-off-by: Torsten Koschorrek --- board/scb9328/config.mk | 10 ---------- board/scb9328/scb9328.c | 24 +++++++++--------------- include/configs/scb9328.h | 5 +++++ 3 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 board/scb9328/config.mk diff --git a/board/scb9328/config.mk b/board/scb9328/config.mk deleted file mode 100644 index 7c5e067..0000000 --- a/board/scb9328/config.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# This config file is used for compilation of scb93328 sources -# -# You might change location of U-Boot in memory by setting right CONFIG_SYS_TEXT_BASE. -# This allows for example having one copy located at the end of ram and stored -# in flash device and later on while developing use other location to test -# the code in RAM device only. -# - -CONFIG_SYS_TEXT_BASE = 0x08f00000 diff --git a/board/scb9328/scb9328.c b/board/scb9328/scb9328.c index 428e8c9..e959b99 100644 --- a/board/scb9328/scb9328.c +++ b/board/scb9328/scb9328.c @@ -39,23 +39,17 @@ int board_init (void) int dram_init (void) { -#if ( CONFIG_NR_DRAM_BANKS > 0 ) + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((volatile void *)SCB9328_SDRAM_1, + SCB9328_SDRAM_1_SIZE); + + return 0; +} + +void dram_init_banksize (void) +{ gd->bd->bi_dram[0].start = SCB9328_SDRAM_1; gd->bd->bi_dram[0].size = SCB9328_SDRAM_1_SIZE; -#endif -#if ( CONFIG_NR_DRAM_BANKS > 1 ) - gd->bd->bi_dram[1].start = SCB9328_SDRAM_2; - gd->bd->bi_dram[1].size = SCB9328_SDRAM_2_SIZE; -#endif -#if ( CONFIG_NR_DRAM_BANKS > 2 ) - gd->bd->bi_dram[2].start = SCB9328_SDRAM_3; - gd->bd->bi_dram[2].size = SCB9328_SDRAM_3_SIZE; -#endif -#if ( CONFIG_NR_DRAM_BANKS > 3 ) - gd->bd->bi_dram[3].start = SCB9328_SDRAM_4; - gd->bd->bi_dram[3].size = SCB9328_SDRAM_4_SIZE; -#endif - return 0; } /** diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h index 6a92ec3..839d0e3 100644 --- a/include/configs/scb9328.h +++ b/include/configs/scb9328.h @@ -126,6 +126,11 @@ #define SCB9328_SDRAM_1 0x08000000 /* SDRAM bank #1 */ #define SCB9328_SDRAM_1_SIZE 0x01000000 /* 16 MB */ +#define CONFIG_SYS_TEXT_BASE 0x10000000 + +#define CONFIG_SYS_SDRAM_BASE SCB9328_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR SCB9328_SDRAM_1 + 0xf00000 + /* * Configuration for FLASH memory for the Synertronixx board */ -- 1.7.5.4