All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Flash environment vs EEPROM environment
@ 2005-02-01 17:10 Thomas Schäfer
  2005-02-01 18:45 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Schäfer @ 2005-02-01 17:10 UTC (permalink / raw)
  To: u-boot

Hello u-boot users,

We are in the state of porting u-boot to our PPC405 based custom board and have to decide whether to store the environment in flash or in a serial EEPROM.

Yes, I know that this has been discussed recently and the recommendation is to store the environment in flash, but:

- storing the environment in flash with redundancy means to spend 2 (128 kB in our case) sectors for approx. 1 kB of environment data.

- the problem described for EEPROM storage should also appear when storing other data in EEPROM's (e.g. SPD data etc.) and thus a proper solution should be found for EEPROM storage.

- The solution provided in common/soft_i2c.c sets the SDA line to 1 and issues 9 cycles on the SCL line. Is this an undefined I2C pattern causing a reset on the I2C bus (which is not specified in the I2C specification)? Why is it not sufficient to issue a simple Start/Stop sequence on the bus?

- Are there conditions known to cause similar effects with flash chips as described for EEPROM devices? Could power loss or similar conditions when writing environment sectors cause a flash device to destroy other sectors than the just written one?

Any pointer/comments would be appreciated.

Best regards,

Thomas Sch?fer

____________________________________

Kontron Modular Computers GmbH

Konrad-Zuse-Str. 9
66115 Saarbr?cken

Tel.: + 49 (0)681 / 95916 - 203
Fax:  + 49 (0)681 / 95916 - 100
E-mail: thomas.schaefer at kontron.com 

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [U-Boot-Users] Flash environment vs EEPROM environment
@ 2005-02-01 18:19 Rune Torgersen
  0 siblings, 0 replies; 8+ messages in thread
From: Rune Torgersen @ 2005-02-01 18:19 UTC (permalink / raw)
  To: u-boot

> From: u-boot-users-admin at lists.sourceforge.net 
> [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf 
> Of Thomas Sch?fer
> Sent: Tuesday, February 01, 2005 11:10

> - The solution provided in common/soft_i2c.c sets the SDA 
> line to 1 and issues 9 cycles on the SCL line. Is this an 
> undefined I2C pattern causing a reset on the I2C bus (which 
> is not specified in the I2C specification)? Why is it not 
> sufficient to issue a simple Start/Stop sequence on the bus?

This has the effect of making sure that if a EEPROM (or other device) was in the middle of something when a reset occurred, it will get enough clocks to cycle through its state-machine to a point where it can detect a stop or abort. (24LC64 are notorious for this)
This is only possible to do using the soft i2c. If you are using a hardware I2C, you are SOL if the external device is in the middle of a data-transfer when a reset occurs, because it WILL hang the I2C bus. Only way to reset the I2c device is to use the method soft_i2c uses, or power cycle the device. 

And yes... I have seen this problem, on a PCI card with CPU on it that got reset by the host just as it was reading the onboard EEPROM. Locked the card up solid. Only way to recover was to turn the power off.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [U-Boot-Users] Flash environment vs EEPROM environment
@ 2005-02-02  9:54 Thomas Schäfer
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Schäfer @ 2005-02-02  9:54 UTC (permalink / raw)
  To: u-boot

Hi,

Thanks to all for your comments. I think we will put environment to flash using redundant sectors... :-)

Regarding Rune's answer I checked the _i2c_bus_reset function in cpu/ppc4xx/i2c.c and found a reset sequence using the IIC Direct Control Register of the PPC4xx CPU. Functionality is the same as implemented in the common/soft_i2c.c module. This should prevent the error condition described in doc/I2C_Edge_Conditions, or am I missing something? (We still have to store SPD data et al. in EEPROM).

Best regards,

Thomas Sch?fer

____________________________________

Kontron Modular Computers GmbH

Konrad-Zuse-Str. 9
66115 Saarbr?cken

Tel.: + 49 (0)681 / 95916 - 203
Fax:  + 49 (0)681 / 95916 - 100
E-mail: thomas.schaefer at kontron.com 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-02-02  9:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-01 17:10 [U-Boot-Users] Flash environment vs EEPROM environment Thomas Schäfer
2005-02-01 18:45 ` Wolfgang Denk
2005-02-01 19:06   ` Jerry Van Baren
2005-02-01 21:28     ` Roger Larsson
2005-02-01 22:13       ` Jerry Van Baren
2005-02-01 22:15     ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-02-01 18:19 Rune Torgersen
2005-02-02  9:54 Thomas Schäfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.