From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Thompson Date: Tue, 14 Sep 2010 09:37:53 +0100 Subject: [U-Boot] [PATCH v2 1/2] davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddr In-Reply-To: <069a2f130ead95600108775cd6cc5c24d596babf.1284409910.git.bengardiner@nanometrics.ca> References: <069a2f130ead95600108775cd6cc5c24d596babf.1284409910.git.bengardiner@nanometrics.ca> Message-ID: <4C8F3461.1020905@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13/09/10 22:04, Ben Gardiner wrote: > This patch proposes to migrate the davinci_emac driver to using the > eth_device->write_hwaddr function pointer as suggested by Ben Warren. > > All the davinci boards had the behaviour, prior to this patch, of > sync'ing the environment variable enetaddr with the MAC address read > from non-volatile storage on boot -- when the two locations disagreed, > the environment variable value took precendence. This patch keeps the > same behaviour but makes eth_initialize take care of it. > > This patch refactors davinci_emac setup in the boards so that the MAC > address is read from non-volatile storage into the environment variable > and then the environment variable value is use in eth_intialize. The > only exception is the direct call to davinci_eth_set_mac_addr made by > the da830evm board init which was changed into an assignment of the > enetaddr field. > > Signed-off-by: Ben Gardiner > CC: Ben Warren > CC: Nick Thompson This change seem reasonable to me from the da830evm point of view. I don't have access to hardware for the next week or so, so I can't test it now, but the da830 specific changes are minor. Reviewed-by: Nick Thompson