From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fsl: verify writes to the MAC address EEPROM
Date: Mon, 2 Aug 2010 16:06:54 -0500 [thread overview]
Message-ID: <4C57336E.7050704@freescale.com> (raw)
In-Reply-To: <20100802210208.40F3CD3CE46@gemini.denx.de>
Wolfgang Denk wrote:
> Why is this i2c_read() needed or actually useful? Should the error
> return code from the i2c_write() above not be sufficient indication
> that the writing failed? If that was the case, then some other parts
> of the code need fixing.
That's just the way the EEPROM chip works. When it's set into write-protect
mode, it cheerfully accepts all of the I2C write commands, and acknowledges
them appropriately, but it doesn't actually store the data into the EEPROM.
The read-back is the only way I've found to verify that the write has
actually occurred.
This patch fixes a real problem with all of our boards that use this EEPROM
chip, which is almost all of our 83xx, 85xx, and 86xx boards. Some of our
boards would be shipped with EEPROM write-protected. The current code
caches the EEPROM contents in memory. After using the "mac save" command,
the code would think that the EEPROM was updated. Issuing the "mac read"
command again would *not* re-read from the EEPROM, because the code would
think that the cached value is up-to-date. The only way you would know if
the EEPROM write failed is to reboot the board.
next prev parent reply other threads:[~2010-08-02 21:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 18:03 [U-Boot] [PATCH] fsl: verify writes to the MAC address EEPROM Timur Tabi
2010-08-02 21:02 ` Wolfgang Denk
2010-08-02 21:06 ` Timur Tabi [this message]
2010-08-02 21:11 ` Wolfgang Denk
2010-08-02 21:14 ` Timur Tabi
2010-08-02 22:12 ` Wolfgang Denk
2010-08-02 22:44 ` Timur Tabi
2010-09-30 13:35 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C57336E.7050704@freescale.com \
--to=timur@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox