Patchwork [U-Boot,1/2] add ST PSD4256G6V to table of supported legacy flashs

login
register
mail settings
Submitter Mike Frysinger
Date July 31, 2012, 7:38 a.m.
Message ID <1343720312-31716-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/174169/
State New
Delegated to: Mike Frysinger
Headers show

Comments

Mike Frysinger - July 31, 2012, 7:38 a.m.
The BF533-EZKIT boards have this old ST flash.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/jedec_flash.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
Stefan Roese - July 31, 2012, 8:50 a.m.
On Tuesday 31 July 2012 09:38:32 Mike Frysinger wrote:
> The BF533-EZKIT boards have this old ST flash.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Acked-by: Stefan Roese <sr@denx.de>

Mike, do you intend to push this via your blackfin repo? If yes, then please 
go ahead. Otherwise I'll queue it up for upstreaming.

Thanks,
Stefan
Mike Frysinger - July 31, 2012, 1:36 p.m.
On Tuesday 31 July 2012 04:50:17 Stefan Roese wrote:
> On Tuesday 31 July 2012 09:38:32 Mike Frysinger wrote:
> > The BF533-EZKIT boards have this old ST flash.
> > 
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> 
> Acked-by: Stefan Roese <sr@denx.de>
> 
> Mike, do you intend to push this via your blackfin repo? If yes, then
> please go ahead. Otherwise I'll queue it up for upstreaming.

will do, thanks!
-mike

Patch

diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index 2350f36..b6cb037 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -30,6 +30,7 @@ 
 /*#define DEBUG*/
 
 #include <common.h>
+#include <mtd/cfi_flash.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
@@ -58,6 +59,9 @@ 
 #define AM29F032B	0x0041
 #define AM29F002T	0x00B0
 
+/* ST - www.st.com */
+#define PSD4256G6V	0x00e9
+
 /* SST */
 #define SST39LF800	0x2781
 #define SST39LF160	0x2782
@@ -367,6 +371,22 @@  static const struct amd_flash_info jedec_table[] = {
 		}
 	},
 #endif
+#ifdef CONFIG_SYS_FLASH_LEGACY_1Mx16
+	{
+		.mfr_id		= (u16)STM_MANUFACT,
+		.dev_id		= 0xff00 | PSD4256G6V,
+		.name		= "ST PSD4256G6V",
+		.uaddr		= {
+			[1] = MTD_UADDR_0x0555_0x0AAA /* x16 */
+		},
+		.DevSize		= SIZE_1MiB,
+		.CmdSet			= CFI_CMDSET_AMD_STANDARD,
+		.NumEraseRegions	= 4,
+		.regions		= {
+			ERASEINFO(0x10000, 16),
+		}
+	},
+#endif
 };
 
 static inline void fill_info(flash_info_t *info, const struct amd_flash_info *jedec_entry, ulong base)