From patchwork Wed Feb 2 07:49:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 81432 X-Patchwork-Delegate: info@emk-elektronik.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 A5D38B7128 for ; Wed, 2 Feb 2011 18:46:31 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A69D52827C; Wed, 2 Feb 2011 08:46:26 +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 Ac1WVpKMpk28; Wed, 2 Feb 2011 08:46:26 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA76528261; Wed, 2 Feb 2011 08:46:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1BE1528261 for ; Wed, 2 Feb 2011 08:46:23 +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 BzN2V4EJESqO for ; Wed, 2 Feb 2011 08:46:21 +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 0705E28260 for ; Wed, 2 Feb 2011 08:46:18 +0100 (CET) Received: by fxm9 with SMTP id 9so8190131fxm.3 for ; Tue, 01 Feb 2011 23:46:18 -0800 (PST) Received: by 10.223.83.16 with SMTP id d16mr3487111fal.148.1296632778109; Tue, 01 Feb 2011 23:46:18 -0800 (PST) Received: from mashiro.localnet ([188.175.34.22]) by mx.google.com with ESMTPS id n7sm8196996fam.35.2011.02.01.23.46.16 (version=SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 23:46:17 -0800 (PST) From: Marek Vasut To: "u-boot" Date: Wed, 2 Feb 2011 08:49:36 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.37-trunk-amd64; KDE/4.4.5; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201102020849.36451.marek.vasut@gmail.com> Subject: [U-Boot] at91sam9263_nandflash build issues 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 The problem is clear from this IRC log, where "vickylinuxer" described his grief (so I included the log, the board really doesn't build). I also did a quick and dirty patch (follows the log, it might give you an idea where it breaks, but it's a mess -- not all is relevant and it probably breaks it even more). Cheers //-------- LOG --------- 05:01 < vickylinuxer> guys i am making u-boot for at91sam9263 with ubifs support...which u-boot version i can prefer... 05:02 < vickylinuxer> because u-boot-12-2010 gave so many compilation problems... 05:06 < Marex> vickylinuxer: look ... what's the problem ? what board did you config it for ? 05:06 < Marex> vickylinuxer: give me the exact xyz for xyz_config 05:10 < vickylinuxer> at91sam9263_nandflash 05:11 < vickylinuxer> atmel board 05:11 < Marex> compiling, checking ... please wait 05:12 < Marex> I see 05:12 < Marex> vickylinuxer: it'll take a bit to fix it all ... wanna tinker with it and assist in fixing ? 05:38 < vickylinuxer> yes marex i want to update from ver 2010.09 to 2010.12..but 09 is working good... 05:39 < vickylinuxer> but when compiling uboot-12 i m getting sdram error and so on... 05:51 < Marex> vickylinuxer: ok well ... there seems to be more breakage than I expected 05:57 < Marex> vickylinuxer: try this http://pastebin.com/2Rq92nNg //-------- DIFF --------- #ifdef CONFIG_USE_IRQ diff --git a/config.mk b/config.mk index 5147c35..fe1d40c 100644 --- a/config.mk +++ b/config.mk @@ -261,7 +261,7 @@ $(obj)%.s: %.c # If the list of objects to link is empty, just create an empty built-in.o cmd_link_o_target = $(if $(strip $1),\ - $(LD) $(LDFLAGS) -r -o $@ $1,\ + $(LD) -r -o $@ $1,\ rm -f $@; $(AR) rcs $@ ) ######################################################################### diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index bfa1f3a..1cc8bc0 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -23,6 +23,7 @@ #include #include +#include #include #if defined(CONFIG_USART0) diff --git a/drivers/spi/atmel_dataflash_spi.c b/drivers/spi/atmel_dataflash_spi.c index 4a5c4aa..d5215c0 100644 --- a/drivers/spi/atmel_dataflash_spi.c +++ b/drivers/spi/atmel_dataflash_spi.c @@ -158,12 +158,12 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc) } /* arm simple, non interrupt dependent timer */ - reset_timer_masked(); + reset_timer(); timeout = 0; writel(AT91_SPI_TXTEN + AT91_SPI_RXTEN, AT91_BASE_SPI + AT91_SPI_PTCR); while (!(readl(AT91_BASE_SPI + AT91_SPI_SR) & AT91_SPI_RXBUFF) && - ((timeout = get_timer_masked()) < CONFIG_SYS_SPI_WRITE_TOUT)); + ((timeout = get_timer(0)) < CONFIG_SYS_SPI_WRITE_TOUT)); writel(AT91_SPI_TXTDIS + AT91_SPI_RXTDIS, AT91_BASE_SPI + AT91_SPI_PTCR); pDesc->state = IDLE; diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h index f6cb406..3db8bd0 100644 --- a/include/configs/at91sam9263ek.h +++ b/include/configs/at91sam9263ek.h @@ -27,6 +27,9 @@ #ifndef __CONFIG_H #define __CONFIG_H +#define CONFIG_AT91_LEGACY +#define CONFIG_AT91FAMILY + /* ARM asynchronous clock */ #define CONFIG_SYS_AT91_MAIN_CLOCK 16367660 /* 16.367 MHz crystal */ #define CONFIG_SYS_HZ 1000 @@ -341,6 +344,10 @@ */ #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + GENERATED_GBL_DATA_SIZE) + #define CONFIG_STACKSIZE (32*1024) /* regular stack */