From 7b37a27e14975f32528552deed453b56a4149818 Mon Sep 17 00:00:00 2001 From: Ben Gardiner Date: Thu, 23 Sep 2010 09:58:43 -0400 Subject: davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddr 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 lets 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 Tested-by: Nick Thompson Signed-off-by: Ben Warren --- board/davinci/common/misc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/davinci/common/misc.h') diff --git a/board/davinci/common/misc.h b/board/davinci/common/misc.h index 329c369763..a6ac3b9a56 100644 --- a/board/davinci/common/misc.h +++ b/board/davinci/common/misc.h @@ -46,7 +46,7 @@ struct pinmux_resource { } int dvevm_read_mac_address(uint8_t *buf); -void dv_configure_mac_address(uint8_t *rom_enetaddr); +void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr); int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins); int davinci_configure_pin_mux_items(const struct pinmux_resource *item, int n_items); -- cgit v1.2.1