Skip to contentSkip to conversation

Spansion Flash configuration words

PATCH New Marc Leeman 3 participants 9 messages Jul 4, 2006 – Oct 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Spansion Flash configuration words

This is one of the first patches that will add support for a new 834x board (based on the 834x sys board).

CHANGELOG:

* Add the configuration words for the Spansion flash S29GL128N, S29GL256N and S29GL512N
Patch by Marc Leeman, 4 Jul 2006

Signature · 40 lines
  greetz, marc
Long enough for me to see your blue backside meditating, but not long
enough for you to touch me.
	Rygel - PK Tech Girl
scorpius.homelinux.org 2.6.17 #2 PREEMPT Thu Jun 22 07:18:33 CEST 2006 GNU/Linux
-------------- next part --------------
Index: u-boot-20060627/include/flash.h
===================================================================
--- u-boot-20060627.orig/include/flash.h	2006-06-27 17:03:01.000000000 +0200
+++ u-boot-20060627/include/flash.h	2006-07-03 06:02:44.658366000 +0200
@@ -209,6 +209,12 @@
 #define AMD_ID_GL064M_3 0x22012201	/* 3rd ID word for S29GL064M-R6 */
 #define AMD_ID_GL064MT_2 0x22102210	/* 2nd ID word for S29GL064M-R3 (top boot sector) */
 #define AMD_ID_GL064MT_3 0x22012201	/* 3rd ID word for S29GL064M-R3 (top boot sector) */
+#define AMD_ID_GL128N_2 0x22212221	/* 2nd ID word for S29GL128N */
+#define AMD_ID_GL128N_3 0x22012201	/* 3nd ID word for S29GL128N */
+#define AMD_ID_GL256N_2 0x22222222	/* 2nd ID word for S29GL256N */
+#define AMD_ID_GL256N_3 0x22012201	/* 3nd ID word for S29GL256N */
+#define AMD_ID_GL512N_2 0x22232223	/* 2nd ID word for S29GL512N */
+#define AMD_ID_GL512N_3 0x22012201	/* 3nd ID word for S29GL512N */
 
 #define AMD_ID_LV320B_2 0x221A221A	/* 2d ID word for AM29LV320MB at 0x38 */
 #define AMD_ID_LV320B_3 0x22002200	/* 3d ID word for AM29LV320MB at 0x3c */
@@ -417,6 +423,9 @@
 #define FLASH_FUJLV650	0x00D0		/* Fujitsu MBM 29LV650UE/651UE		*/
 #define FLASH_MT28S4M16LC 0x00E1	/* Micron MT28S4M16LC			*/
 #define FLASH_S29GL064M 0x00F0		/* Spansion S29GL064M-R6		*/
+#define FLASH_S29GL128N 0x00F2		/* Spansion S29GL128N			*/
+#define FLASH_S29GL256N 0x00F4		/* Spansion S29GL256N			*/
+#define FLASH_S29GL512N 0x00F6		/* Spansion S29GL512N			*/
 
 #define FLASH_UNKNOWN	0xFFFF		/* unknown flash type			*/
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060704/a4ffe9d7/attachment.pgp 
#1 lore raw

PATCH 1/1 Spansion Flash configuration words

Quoted 8 lines · Marc Leeman

This is one of the first patches that will add support for a new 834x board (based on the 834x sys board).

CHANGELOG:

* Add the configuration words for the Spansion flash S29GL128N, S29GL256N and S29GL512N
Patch by Marc Leeman, 4 Jul 2006

Why do you need those?
Those Spansion flashes work perfectly fine with the CFI driver!

Cheers
Anders

#2 lore raw

PATCH 1/1 Spansion Flash configuration words

Quoted 1 line

Why do you need those?

U-Boot 1.1.4 (Jul 5 2006 - 13:26:03) MPC83XX

Clock configuration:
Coherent System Bus: 264 MHz
Core: 396 MHz
Local Bus: 33 MHz

CPU:   MPC83xx, Rev: 1.1 at 396 MHz
Board: Barco BARCO8347G1 Platform
I2C:   ready
DRAM:  Initializing

SDRAM on Local Bus is NOT available!

DDR RAM: 256 MB
FLASH:

Quoted 1 line

Those Spansion flashes work perfectly fine with the CFI driver!

What flashes are you using and what version of U-Boot are you using?

I am using a git snapshot from 20060623 (to have the last mpc8349sys code).

I just switched the config to use the CFI driver and it's just stuck on detecting the flash.

[mleeman at neo u-boot-20060627]$ diff ~/no_backup/build-svc2.2.6.continuous-20060705-132011/build/u-boot-20060627/include/configs/BARCO8347G1.h include/configs/BARCO8347G1.h
133,134c133,134
< #undef CFG_FLASH_CFI /* use the Common Flash Interface */
< #undef CFG_FLASH_CFI_DRIVER /* use the CFI driver */
---

Quoted 2 lines

#define CFG_FLASH_CFI /* use the Common Flash Interface */
#define CFG_FLASH_CFI_DRIVER /* use the CFI driver */

I wouldn't have added this if I didn't need a flash.c file for my platform (after having tested the default MPC8349EDMS config), but I'm always eager to correct any errors on my side and remove unneeded code:

U-Boot 1.1.4 (Jul 5 2006 - 12:05:58) MPC83XX

Clock configuration:
Coherent System Bus: 264 MHz
Core: 396 MHz
Local Bus: 33 MHz

CPU:   MPC83xx, Rev: 1.1 at 396 MHz
Board: Barco BARCO8347G1 Platform
I2C:   ready
DRAM:  Initializing

SDRAM on Local Bus is NOT available!
DDR RAM: 256 MB
FLASH: Chip: S29GL128N
16 MB

In:    serial
Out:   serial
Err:   serial
Net:   TSEC0, TSEC1

Type run net_nfs to get kernel via tftpboot
and mount root filesystem over NFS

Hit any key to stop autoboot: 0
=>

Signature · 11 lines
  greetz, marc
Always a party.
	Crichton - A Bug's Life
scorpius.homelinux.org 2.6.17 #2 PREEMPT Thu Jun 22 07:18:33 CEST 2006 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060705/2e124d36/attachment.pgp 
#3 lore raw

PATCH 1/1 Spansion Flash configuration words

Quoted 3 lines · Marc Leeman
Quoted 1 line

Those Spansion flashes work perfectly fine with the CFI driver!

What flashes are you using and what version of U-Boot are you using?

Spansion S29GL128N90TFIR2, U-Boot has been working with this one for the past year.

U-Boot 1.1.4 (Apr 28 2006 - 16:11:24)

DRAM:  32 MB
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial

U-Boot> flinfo

Bank # 1: CFI conformant FLASH (16 x 16) Size: 16 MB in 128 Sectors
Erase timeout 16384 ms, write timeout 2 ms, buffer write timeout 5 ms, buffer size 32

Quoted 2 lines

I just switched the config to use the CFI driver and it's just stuck on detecting the flash.

Strange.
I'll check if current git HEAD still works on our board and report back.

Cheers
Anders

#4 lore raw

PATCH 1/1 Spansion Flash configuration words

Quoted 2 lines

Spansion S29GL128N90TFIR2, U-Boot has been working with this one for the past year.

S29GL128N11FFI010 here

It must be the difference between the 90 and 110 ns access time that actus up.

Signature · 12 lines
  greetz, marc
Flying through wormholes ain't like dusting crops, farm boy. It takes
a little finesse.
	Crichton - Into the Lion's Den - Wolf in Sheep's Clothing
scorpius.homelinux.org 2.6.17 #2 PREEMPT Thu Jun 22 07:18:33 CEST 2006 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060706/12f9212b/attachment.pgp 
#5 lore raw

PATCH 1/1 Spansion Flash configuration words

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 3 lines

Spansion S29GL128N90TFIR2, U-Boot has been working with this one for the past year.

S29GL128N11FFI010 here

It must be the difference between the 90 and 110 ns access time that actus up.

If this is the case, then you probably have some memroy controller init problem, which you are just hushing up by using a custom flash driver.

I think you should fix this problem.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I object to intellect without discipline;  I object to power without
constructive purpose.
	-- Spock, "The Squire of Gothos", stardate 2124.5
#6 lore raw

PATCH 1/1 Spansion Flash configuration words

Quoted 3 lines

If this is the case, then you probably have some memroy controller init problem, which you are just hushing up by using a custom flash driver.

The memory controller init from the 834x? Oh, you mean the OR0 register for the flash?

Quoted 1 line

I think you should fix this problem.

Thanks for the pointer. This might well be the case: we've been adjusting these registers and the 834x clocks in order to have access to the flash and get the timing right (and adjusting wait cycles).

I'll have another look with my collegues that were working on that. Tnx Wolfgang and Anders for pointing this out.

Signature · 12 lines
  greetz, marc
I'm only judging on my experience with you, but I've never seen such
a deficient species.
	Pilot - Crackers Don't Matter
scorpius.homelinux.org 2.6.17 #2 PREEMPT Thu Jun 22 07:18:33 CEST 2006 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060706/5e290343/attachment.pgp 
#7 lore raw

PATCH 1/1 Spansion Flash configuration words

In reply to Anders Larsen
Quoted 6 lines · Anders Larsen
Quoted 2 lines · Marc Leeman

I just switched the config to use the CFI driver and it's just stuck on detecting the flash.

Strange.
I'll check if current git HEAD still works on our board and report back.

For the record:
I just rebuilt U-Boot from current git HEAD and it still detects our Spansion flashes just fine (HW: ARM little-endian).

Cheers
Anders

#8 lore raw

PATCH 1/1 Spansion Flash configuration words

In reply to Marc Leeman
Quoted 4 lines · In message <[email protected]> you wrote:

* Add the configuration words for the Spansion flash S29GL128N, S29GL256N and S29GL512N
Patch by Marc Leeman, 4 Jul 2006

I reject this patch. First, it adds unreferences defintions - these are used nowhere in the code.

Second, as Anders Larsen already pointed out, you should use the CFI flash driver on such devices which does not need these defines.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Einstein argued that there must be simplified explanations of nature,
because God is not capricious or arbitrary. No  such  faith  comforts
the software engineer.                             - Fred Brooks, Jr.