From: Wolfgang Denk Date: Fri, 03 Feb 2012 16:59:36 +0100 Subject: [U-Boot] [PATCH 2/2] da850evm: read mac address from I2C EEPROM on AM18x EVM In-Reply-To: References: <1328190138-5276-1-git-send-email-manjunath.hadli@ti.com> <1328190138-5276-3-git-send-email-manjunath.hadli@ti.com> <20120202221747.2CE4011F9E53@gemini.denx.de> Message-ID: <20120203155936.0FE6618880B9@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 "Hadli, Manjunath", In message you wrote: > > > NAK. This has been discussed a thousand times before, so please look it > up in the archives. > > > > The environment always has precedence. If there are several places to sto > re tha MAC address, and the values don;t match, a warning must be issued. e > tc. > > > This is not a case where we are matching the mac address > with the environment variable. If the environment variable Yes, and this is what I complain about. It should. > is not set we try to get it from either spi or i2c eeprom. > Since da850evm/L138 have mac address stored in spi flash > and am18x in i2c eeprom, picks appropriately from the source > based on the configuration file setting. If we have multiple storage for the MAC address, we should always raise a warning if these contain different information. > > While you are at it, the implementation of davinci_sync_env_enetaddr() sh > ould be cleaned up as well. > Well can you put some more light on it as what cleanup is to be done ? It should test the return code of eth_getenv_enetaddr_by_index(). It should use is_valid_ether_addr(). debug() should probably be a print(). eth_setenv_enetaddr() may also return an error code. 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 You might not be as stupid as you look. This is not hard. Let's think about this. I mean ... I'll think about this, and you can join in when you know the words. - Terry Pratchett, _Men at Arms_