From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Mon, 14 May 2012 13:26:23 +0800 Subject: [U-Boot] Adding dataflash support for at91sam9m10g45ek In-Reply-To: References: Message-ID: <4FB0977F.3000404@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 5/12/2012 15:38, Thad Phetteplace wrote: > Hello all, > > I am trying to add dataflash support for the at91sam9m10g45ek to a > recent version of u-boot (2010.06 or later). I have a patched version > of u-boot-1.3.4 from linux4sam that works, and a glance at more recent > code seems to show dataflash supported on other at91 boards in > versions>= 2010.06. Using the linux4sam code and other atmel boards > as a reference, I've added dataflash support for the at91sam9m10g45ek. > It almost works, but I'm getting occasional bad reads leading to CRC > failures and occasionally the SPI bus stops talking completely. After > reviewing code, spec sheets, etc... I'm at a loss as why this is > failing. I am mostly riding on top of the existing Atmel SPI > dataflash support already in u-boot, basically just adding some board > specific calls to init the SPI interface. Anyone here have any ideas? > Any known hardware issues I need to be working around? Patches I > should be looking at? I don't know the detail method you implemented this. Would you please try the following patch and test again diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h index 159857d..af0611c 100644 --- a/include/configs/at91sam9m10g45ek.h +++ b/include/configs/at91sam9m10g45ek.h @@ -125,6 +125,14 @@ /* No NOR flash */ #define CONFIG_SYS_NO_FLASH +/* Serial flash */ +#define CONFIG_CMD_SF +#ifdef CONFIG_CMD_SF +#define CONFIG_ATMEL_SPI +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_ATMEL +#endif + /* NAND flash */ #ifdef CONFIG_CMD_NAND #define CONFIG_NAND_ATMEL > Thanks, > > Thad Phetteplace > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot