[U-Boot] ramtron f-ram

Ran Shalit ranshalit at gmail.com
Tue Apr 12 15:23:21 CEST 2011


Hello,

I use the spi interfaces with more then one flash in the U-Boot. Actually I
use one spi fram(ramtron) and one spi flash (stmicro).
I first thought that configuring both flags is just what I need:
CONFIG_SPI_FLASH_STMICRO
CONFIG_SPI_FLASH_RAMTRON
But since the ramtron implementation change the value of IDCODE_CONT_LEN, I
will get that this constant (IDCODE_CONT_LEN)
is OK for one flash but wrong in the other. I had no choice but to make
changes in the code for my case. just wandered if there is
really such limitation (that I cannot use ramtron & other spi flash
together).
Best Regards,
Ran

+++ b/drivers/mtd/spi/spi_flash.c
@@ -146,10 +146,18 @@ static const struct {
 #ifdef CONFIG_SPI_FLASH_WINBOND
  { 0, 0xef, spi_flash_probe_winbond, },
 #endif
+#ifdef CONFIG_SPI_FRAM_RAMTRON
+ { 6, 0xc2, spi_fram_probe_ramtron, },
*+# undef IDCODE_CONT_LEN
+# define IDCODE_CONT_LEN 6
*+#endif


More information about the U-Boot mailing list