Patchwork [U-Boot] Adding dataflash support for at91sam9m10g45ek

login
register
mail settings
Submitter Bo Shen
Date May 14, 2012, 5:26 a.m.
Message ID <4FB0977F.3000404@gmail.com>
Download mbox | patch
Permalink /patch/158902/
State Not Applicable
Delegated to: Andreas BieƟmann
Headers show

Comments

Bo Shen - May 14, 2012, 5:26 a.m.
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



> Thanks,
>
> Thad Phetteplace
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Patch

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