public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] at91sam9263_nandflash build issues
Date: Wed, 2 Feb 2011 08:49:36 +0100	[thread overview]
Message-ID: <201102020849.36451.marek.vasut@gmail.com> (raw)

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 ---------

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 <asm/io.h>
 #include <asm/arch/clk.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/memory-map.h>
 
 #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 */
 
 #ifdef CONFIG_USE_IRQ

             reply	other threads:[~2011-02-02  7:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02  7:49 Marek Vasut [this message]
2011-02-02  8:16 ` [U-Boot] at91sam9263_nandflash build issues Reinhard Meyer
2011-02-02  8:18   ` [U-Boot] AT91: dataflash: was " Reinhard Meyer
2011-02-02  9:06   ` [U-Boot] " Marek Vasut
2011-02-02 11:14 ` Wolfgang Denk
2011-02-02 19:43 ` Scott Wood
2011-02-02 23:57   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201102020849.36451.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox