From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Tue, 29 Sep 2009 10:05:57 -0700 Subject: [U-Boot] [PATCH v3] TI: DaVinci DM365: Enabling network Support on DM365 EVM In-Reply-To: <1254232055-13562-1-git-send-email-s-paulraj@ti.com> References: <1254232055-13562-1-git-send-email-s-paulraj@ti.com> Message-ID: <4AC23E75.6070503@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Sandeep, s-paulraj at ti.com wrote: > From: Sandeep Paulraj > > This patch enables EMAC on the DM365 EVM. > > Signed-off-by: Sandeep Paulraj > --- > > + /* Read Ethernet MAC address from EEPROM */ > + if (dvevm_read_mac_address(eeprom_enetaddr)) > + dv_configure_mac_address(eeprom_enetaddr); > + > You should get rid of this function (dv_configure_mac_address), as it duplicates logic already present in net/eth.c, albeit in a different order. Mike Frysinger has invested a lot of effort in cleaning this up (and documenting it too). The correct behavior is as follows: 1. davinci_emac_initialize() should read programmed MAC address from ROM and stuff it into dev->enetaddr 2. eth_initialize() (in net/eth.c) reads from the environment and compares to the value in dev->enetaddr, warning on mismatch. > + davinci_emac_initialize(); > + > + return 0; > +} > +#endif > + > #ifdef CONFIG_NAND_DAVINCI > static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip) > { > regards, Ben