From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 02 Aug 2010 23:11:21 +0200 Subject: [U-Boot] [PATCH] fsl: verify writes to the MAC address EEPROM In-Reply-To: <4C57336E.7050704@freescale.com> References: <1280772203-8859-1-git-send-email-timur@freescale.com> <20100802210208.40F3CD3CE46@gemini.denx.de> <4C57336E.7050704@freescale.com> Message-ID: <20100802211121.2501FD3CE46@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Timur Tabi, In message <4C57336E.7050704@freescale.com> you wrote: > 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. Is it correct to assume the the WP signal is connected to some GPIO pin which can be set / unset in software? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Lots of folks confuse bad management with destiny. -- Frank Hubbard